Show / Hide Table of Contents

Class TemplateChangesValueProvider

Provides a method to get a value from an object, excluding any items from its parent template.

Inheritance
object
TemplateChangesValueProvider
Implements
IValueProvider
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 TemplateChangesValueProvider : IValueProvider
Remarks

This ensures a specific serialization behavior of templated lists, where children are added to the parent.

Constructors

View Source

TemplateChangesValueProvider(IValueProvider, Func<object, object?>)

Provides a method to get a value from an object, excluding any items from its parent template.

Declaration
public TemplateChangesValueProvider(IValueProvider valueProvider, Func<object, object?> getBasedOn)
Parameters
Type Name Description
IValueProvider valueProvider

The default value provider.

Func<object, object> getBasedOn

Determines the template a given object is based on.

Remarks

This ensures a specific serialization behavior of templated lists, where children are added to the parent.

Methods

View Source

GetValue(object)

Gets the value.

Declaration
public object? GetValue(object target)
Parameters
Type Name Description
object target

The target to get the value from.

Returns
Type Description
object

The value.

View Source

SetValue(object, object?)

Sets the value.

Declaration
public void SetValue(object target, object? value)
Parameters
Type Name Description
object target

The target to set the value on.

object value

The value to set on the target.

Implements

Newtonsoft.Json.Serialization.IValueProvider
  • View Source
In this article
Back to top Generated by DocFX