docs.unity.cn
    Show / Hide Table of Contents

    Class KeyValueCollectionPropertyBag<TDictionary, TKey, TValue>

    An IPropertyBag<TContainer> implementation for a generic collection of key/value pairs using the IDictionary<TKey,TValue> interface.

    Inheritance
    Object
    PropertyBag<TDictionary>
    KeyValueCollectionPropertyBag<TDictionary, TKey, TValue>
    DictionaryPropertyBag<TKey, TValue>
    Inherited Members
    PropertyBag<TDictionary>.Accept(ITypeVisitor)
    PropertyBag<TDictionary>.IPropertyBag.Accept(IPropertyBagVisitor, Object)
    PropertyBag<TDictionary>.IPropertyBag<TDictionary>.Accept(IPropertyBagVisitor, TDictionary)
    PropertyBag<TDictionary>.IPropertyBag<TDictionary>.GetProperties()
    PropertyBag<TDictionary>.IPropertyBag<TDictionary>.GetProperties(TDictionary)
    PropertyBag<TDictionary>.InstantiationKind
    PropertyBag<TDictionary>.Instantiate()
    PropertyBag<TDictionary>.CreateInstance()
    PropertyBag<TDictionary>.TryCreateInstance(TDictionary)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Properties
    Syntax
    public class KeyValueCollectionPropertyBag<TDictionary, TKey, TValue> : PropertyBag<TDictionary>, IPropertyBagRegister, IConstructor<TDictionary>, IConstructor, IDictionaryPropertyBag<TDictionary, TKey, TValue>, ICollectionPropertyBag<TDictionary, KeyValuePair<TKey, TValue>>, IPropertyBag<TDictionary>, IPropertyBag, ICollectionPropertyBagAccept<TDictionary>, IDictionaryPropertyBagAccept<TDictionary>, IDictionaryPropertyAccept<TDictionary>, IKeyedProperties<TDictionary, object> where TDictionary : IDictionary<TKey, TValue>
    Type Parameters
    Name Description
    TDictionary

    The key/value collection type.

    TKey

    The key type.

    TValue

    The value type.

    Methods

    GetProperties()

    Returns an enumerator that iterates through all static properties for the type.

    Declaration
    public override PropertyCollection<TDictionary> GetProperties()
    Returns
    Type Description
    PropertyCollection<TDictionary>

    A IEnumerator<T> structure for all properties.

    Overrides
    Unity.Properties.PropertyBag<TDictionary>.GetProperties()
    Implements
    IPropertyBag<TContainer>.GetProperties()
    Remarks

    This should return a subset properties returned by GetProperties(ref TContainer).

    GetProperties(ref TDictionary)

    Returns an enumerator that iterates through all static and dynamic properties for the given container.

    Declaration
    public override PropertyCollection<TDictionary> GetProperties(ref TDictionary container)
    Parameters
    Type Name Description
    TDictionary container
    Returns
    Type Description
    PropertyCollection<TDictionary>

    A IEnumerator<T> structure for all properties.

    Overrides
    Unity.Properties.PropertyBag<TDictionary>.GetProperties(TDictionary)
    Implements
    IPropertyBag<TContainer>.GetProperties(ref TContainer)
    Remarks

    This should return all static properties returned by GetProperties() in addition to any dynamic properties. If the container is a collection type all elements will be iterated.

    Explicit Interface Implementations

    ICollectionPropertyBagAccept<TDictionary>.Accept(ICollectionPropertyBagVisitor, ref TDictionary)

    Call this method to invoke Visit<TCollection, TElement>(ICollectionPropertyBag<TCollection, TElement>, ref TCollection) with the strongly typed container.

    Declaration
    void ICollectionPropertyBagAccept<TDictionary>.Accept(ICollectionPropertyBagVisitor visitor, ref TDictionary container)
    Parameters
    Type Name Description
    ICollectionPropertyBagVisitor visitor

    The visitor being run.

    TDictionary container
    Implements
    ICollectionPropertyBagAccept<TContainer>.Accept(ICollectionPropertyBagVisitor, ref TContainer)

    IDictionaryPropertyAccept<TDictionary>.Accept<TContainer>(IDictionaryPropertyVisitor, Property<TContainer, TDictionary>, ref TContainer, ref TDictionary)

    Call this method to invoke Visit<TContainer, TDictionary, TKey, TValue>(Property<TContainer, TDictionary>, ref TContainer, ref TDictionary).

    Declaration
    void IDictionaryPropertyAccept<TDictionary>.Accept<TContainer>(IDictionaryPropertyVisitor visitor, Property<TContainer, TDictionary> property, ref TContainer container, ref TDictionary dictionary)
    Parameters
    Type Name Description
    IDictionaryPropertyVisitor visitor

    The visitor being run.

    Property<TContainer, TDictionary> property

    The property being visited.

    TContainer container

    The container being visited.

    TDictionary dictionary

    The dictionary value.

    Type Parameters
    Name Description
    TContainer

    The container type.

    Implements
    IDictionaryPropertyAccept<TDictionary>.Accept<TContainer>(IDictionaryPropertyVisitor, Property<TContainer, TDictionary>, ref TContainer, ref TDictionary)
    Remarks

    This method is used to join the container, the key and the value type.

    IDictionaryPropertyBagAccept<TDictionary>.Accept(IDictionaryPropertyBagVisitor, ref TDictionary)

    Call this method to invoke Visit<TDictionary, TKey, TValue>(IDictionaryPropertyBag<TDictionary, TKey, TValue>, ref TDictionary) with the strongly typed container.

    Declaration
    void IDictionaryPropertyBagAccept<TDictionary>.Accept(IDictionaryPropertyBagVisitor visitor, ref TDictionary container)
    Parameters
    Type Name Description
    IDictionaryPropertyBagVisitor visitor

    The visitor being run.

    TDictionary container
    Implements
    IDictionaryPropertyBagAccept<TContainer>.Accept(IDictionaryPropertyBagVisitor, ref TContainer)

    IKeyedProperties<TDictionary, Object>.TryGetProperty(ref TDictionary, Object, out IProperty<TDictionary>)

    Gets the property associated with the specified name.

    Declaration
    bool IKeyedProperties<TDictionary, object>.TryGetProperty(ref TDictionary container, object key, out IProperty<TDictionary> property)
    Parameters
    Type Name Description
    TDictionary container
    Object key
    IProperty<TDictionary> property
    Returns
    Type Description
    Boolean

    true if the INamedProperties<TContainer> contains a property with the specified name; otherwise, false.

    Implements
    IKeyedProperties<TContainer, TKey>.TryGetProperty(ref TContainer, TKey, out IProperty<TContainer>)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, July 26, 2023