docs.unity.cn
    Show / Hide Table of Contents

    Class SetPropertyBagBase<TSet, TElement>

    A IPropertyBag<TContainer> implementation for a generic set of elements using the ISet<T> interface.

    Inheritance
    Object
    PropertyBag<TSet>
    SetPropertyBagBase<TSet, TElement>
    HashSetPropertyBag<TElement>
    Inherited Members
    PropertyBag<TSet>.Accept(ITypeVisitor)
    PropertyBag<TSet>.IPropertyBag.Accept(IPropertyBagVisitor, Object)
    PropertyBag<TSet>.IPropertyBag<TSet>.Accept(IPropertyBagVisitor, TSet)
    PropertyBag<TSet>.IPropertyBag<TSet>.GetProperties()
    PropertyBag<TSet>.IPropertyBag<TSet>.GetProperties(TSet)
    PropertyBag<TSet>.InstantiationKind
    PropertyBag<TSet>.Instantiate()
    PropertyBag<TSet>.CreateInstance()
    PropertyBag<TSet>.TryCreateInstance(TSet)
    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 SetPropertyBagBase<TSet, TElement> : PropertyBag<TSet>, IPropertyBagRegister, IConstructor<TSet>, IConstructor, ISetPropertyBag<TSet, TElement>, ICollectionPropertyBag<TSet, TElement>, IPropertyBag<TSet>, IPropertyBag, ICollectionPropertyBagAccept<TSet>, ISetPropertyBagAccept<TSet>, ISetPropertyAccept<TSet>, IKeyedProperties<TSet, object> where TSet : ISet<TElement>
    Type Parameters
    Name Description
    TSet

    The collection type.

    TElement

    The element type.

    Methods

    GetProperties()

    Implement this method to return a PropertyCollection<TContainer> that can enumerate through all properties for the TContainer.

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

    A PropertyCollection<TContainer> structure which can enumerate each property.

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

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

    GetProperties(ref TSet)

    Implement this method to return a PropertyCollection<TContainer> that can enumerate through all properties for the TContainer.

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

    A PropertyCollection<TContainer> structure which can enumerate each property.

    Overrides
    Unity.Properties.PropertyBag<TSet>.GetProperties(TSet)
    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.

    TryGetProperty(ref TSet, Object, out IProperty<TSet>)

    Gets the property associated with the specified name.

    Declaration
    public bool TryGetProperty(ref TSet container, object key, out IProperty<TSet> property)
    Parameters
    Type Name Description
    TSet container

    The container hosting the data.

    Object key

    The key to lookup.

    IProperty<TSet> property

    When this method returns, contains the property associated with the specified name, if the name is found; otherwise, null.

    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>)

    Explicit Interface Implementations

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

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

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

    The visitor being run.

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

    ISetPropertyAccept<TSet>.Accept<TContainer>(ISetPropertyVisitor, Property<TContainer, TSet>, ref TContainer, ref TSet)

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

    Declaration
    void ISetPropertyAccept<TSet>.Accept<TContainer>(ISetPropertyVisitor visitor, Property<TContainer, TSet> property, ref TContainer container, ref TSet dictionary)
    Parameters
    Type Name Description
    ISetPropertyVisitor visitor

    The visitor being run.

    Property<TContainer, TSet> property

    The property being visited.

    TContainer container

    The container being visited.

    TSet dictionary
    Type Parameters
    Name Description
    TContainer

    The container type.

    Implements
    ISetPropertyAccept<TSet>.Accept<TContainer>(ISetPropertyVisitor, Property<TContainer, TSet>, ref TContainer, ref TSet)
    Remarks

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

    ISetPropertyBagAccept<TSet>.Accept(ISetPropertyBagVisitor, ref TSet)

    Call this method to invoke Visit<TSet, TValue>(ISetPropertyBag<TSet, TValue>, ref TSet) with the strongly typed container.

    Declaration
    void ISetPropertyBagAccept<TSet>.Accept(ISetPropertyBagVisitor visitor, ref TSet container)
    Parameters
    Type Name Description
    ISetPropertyBagVisitor visitor

    The visitor being run.

    TSet container
    Implements
    ISetPropertyBagAccept<TContainer>.Accept(ISetPropertyBagVisitor, ref TContainer)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, July 26, 2023