Show / Hide Table of Contents

Class ReflectionParameterManager

A parameter manager implemented using reflection.

Inheritance
object
ReflectionParameterManager
Implements
IParameterManager
IEnumerable<KeyValuePair<string, object>>
IEnumerable
IEquatable<IParameterManager>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.BotBrain
Assembly: BotBrain.Core.dll
Syntax
public class ReflectionParameterManager : IParameterManager, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IEquatable<IParameterManager?>
Remarks

Initializes a new instance of the ReflectionParameterManager class.

Constructors

View Source

ReflectionParameterManager(object)

A parameter manager implemented using reflection.

Declaration
public ReflectionParameterManager(object owner)
Parameters
Type Name Description
object owner

The object to retrieve parameters from.

Remarks

Initializes a new instance of the ReflectionParameterManager class.

Properties

View Source

Fallbacks

Gets a list of fallback parameter managers.

Declaration
public IReadOnlyList<IParameterManager> Fallbacks { get; }
Property Value
Type Description
IReadOnlyList<IParameterManager>
View Source

this[string]

Retrieves a parameter value by name, checking the fallbacks if the parameter is not defined in this manager.

Declaration
public object? this[string parameterName] { get; set; }
Parameters
Type Name Description
string parameterName

The parameter name.

Property Value
Type Description
object

The parameter value.

View Source

OwnParameters

Gets a dictionary of parameters defined in this manager.

Declaration
public IDictionary<string, object> OwnParameters { get; }
Property Value
Type Description
IDictionary<string, object>

Methods

View Source

ContainsKey(string)

Gets whether or not the parameter is defined in this manager or in its fallbacks.

Declaration
public bool ContainsKey(string parameterName)
Parameters
Type Name Description
string parameterName

The parameter name.

Returns
Type Description
bool

True if the parameter was found.

View Source

Equals(IParameterManager?)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(IParameterManager? other)
Parameters
Type Name Description
IParameterManager other

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the other parameter; otherwise, false.

View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Returns
Type Description
IEnumerator<KeyValuePair<string, object>>

An enumerator that can be used to iterate through the collection.

View Source

RemoveOwnKey(string)

Removes the given parameter from this manager, while leaving fallbacks unchanged.

Declaration
public void RemoveOwnKey(string parameterName)
Parameters
Type Name Description
string parameterName

The parameter name.

Implements

IParameterManager
IEnumerable<T>
IEnumerable
IEquatable<T>

Extension Methods

IParameterManagerExtensions.Get<T>(IParameterManager, IEnumerable<string>, JsonSerializer?)
IParameterManagerExtensions.Get<T>(IParameterManager, string, JsonSerializer?)
IParameterManagerExtensions.TryGetValue(IParameterManager, string, out object?)
IParameterManagerExtensions.TryGet<T>(IParameterManager, IEnumerable<string>, out T, JsonSerializer?)
IParameterManagerExtensions.TryGet<T>(IParameterManager, string, out T, JsonSerializer?)
IEnumerableExtensions.WithoutLast<T>(IEnumerable<T>)
  • View Source
In this article
Back to top Generated by DocFX