Class ChainableDictionary
- Namespace
- Dynamitey.DynamicObjects
- Assembly
- Dynamitey.Community.dll
Adds extra syntax to initialize properties to match up with clay
public class ChainableDictionary : Dictionary, IDynamicMetaObjectProvider, IEquivalentType, INotifyPropertyChanged, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable
- Inheritance
-
ChainableDictionary
- Implements
- Inherited Members
- Extension Methods
Constructors
ChainableDictionary()
Initializes a new instance of the ChainableDictionary class.
[RequiresDynamicCode("Constructing any BaseObject-derived type instantiates System.Dynamic.DynamicObject, whose default constructor requires the DLR's runtime code generation; not supported when AOT-compiled.")]
public ChainableDictionary()
ChainableDictionary(IEnumerable<KeyValuePair<string, object>>)
Initializes a new instance of the Dictionary class.
[RequiresDynamicCode("Constructing any BaseObject-derived type instantiates System.Dynamic.DynamicObject, whose default constructor requires the DLR's runtime code generation; not supported when AOT-compiled.")]
public ChainableDictionary(IEnumerable<KeyValuePair<string, object>> dict)
Parameters
dictIEnumerable<KeyValuePair<string, object>>The dict.
Methods
TryInvokeMember(InvokeMemberBinder, object?[]?, out object?)
Provides the implementation for operations that invoke a member. Classes derived from the DynamicObject class can override this method to specify dynamic behavior for operations such as calling a method.
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Constructs the annotated List when a multi-arg call falls through to it. This is a DynamicObject.TryInvokeMember override: it can't carry [RequiresUnreferencedCode] itself without mismatching the unannotated base member, and the DLR invokes it only after the consumer's own dynamic call site already triggered the framework's warning.")]
[UnconditionalSuppressMessage("AOT", "IL3050", Justification = "Same List construction as above; see the IL2026 suppression on this member.")]
public override bool TryInvokeMember(InvokeMemberBinder binder, object?[]? args, out object? result)
Parameters
binderInvokeMemberBinderProvides information about the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the statement sampleObject.SampleMethod(100), where sampleObject is an instance of the class derived from the DynamicObject class, binder.Name returns "SampleMethod". The binder.IgnoreCase property specifies whether the member name is case-sensitive.
argsobject[]The arguments that are passed to the object member during the invoke operation. For example, for the statement sampleObject.SampleMethod(100), where sampleObject is derived from the DynamicObject class,
args[0] is equal to 100.resultobjectThe result of the member invocation.
Returns
- bool
true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.)