Class ParameterSerialization
Contains metadata for a parameter.
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain
Assembly: BotBrain.Core.dll
Syntax
public static class ParameterSerialization
Fields
View SourceJsonSettings
The JSON.NET settings to make the first letter of parameter names lowercase.
Declaration
public static readonly JsonSerializerSettings JsonSettings
Field Value
Type | Description |
---|---|
JsonSerializerSettings |
Methods
View SourceGetParameterNames(object?)
Gets the parameter names used by the given object.
Declaration
public static IEnumerable<string> GetParameterNames(object? item)
Parameters
Type | Name | Description |
---|---|---|
object | item | An object which is associated with parameters. |
Returns
Type | Description |
---|---|
IEnumerable<string> | An enumeration of parameter names. |
GetParameterNames(Type?)
Gets the parameter names used by the given type.
Declaration
public static IEnumerable<string> GetParameterNames(Type? type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | A type which is annotated with UsesParameterAttribute. |
Returns
Type | Description |
---|---|
IEnumerable<string> | An enumeration of parameter names. |
GetParameterNames<T>()
Gets the parameter names used by the given type.
Declaration
public static IEnumerable<string> GetParameterNames<T>()
Returns
Type | Description |
---|---|
IEnumerable<string> | An enumeration of parameter names. |
Type Parameters
Name | Description |
---|---|
T | A type which is annotated with UsesParameterAttribute. |
LoadParametersFromFile(string)
Loads a dictionary of parameter metadata from a JSON file.
Declaration
public static IDictionary<string, ParameterMetadata> LoadParametersFromFile(string filepath)
Parameters
Type | Name | Description |
---|---|---|
string | filepath | The file path. |
Returns
Type | Description |
---|---|
IDictionary<string, ParameterMetadata> | A dictionary mapping parameter name to metadata. |
LoadParametersFromString(string)
Loads a dictionary of parameter metadata from a JSON string.
Declaration
public static IDictionary<string, ParameterMetadata> LoadParametersFromString(string input)
Parameters
Type | Name | Description |
---|---|---|
string | input | The JSON string containing an array of parameters. |
Returns
Type | Description |
---|---|
IDictionary<string, ParameterMetadata> | A dictionary mapping parameter name to metadata. |