Show / Hide Table of Contents

    Class GuidReferenceAttribute

    Attribute that links a type to an identifier. It is used by the GuidReferenceHelper to link data together without using a hard reference. It should be used on string fields that represent the datas id. Ultimately, this id is later used by the IDataService to look up the data.

    Inheritance
    Object
    GuidReferenceAttribute
    Namespace: IdleKit.Core
    Assembly: cs.temp.dll.dll
    Syntax
    public class GuidReferenceAttribute : PropertyAttribute
    Examples

    This sample shows the recommended usage

    [SerializeField, GuidReference(typeof(ICurrencyData))]
    private string _currencyId;
    
    [SerializeField, GuidReference(typeof(ICurrencyData), typeof(ICardData))]
    private string[] _requirementIds;

    Constructors

    GuidReferenceAttribute()

    Link to all Types registered in the GuidReferenceHelper

    Declaration
    public GuidReferenceAttribute()

    GuidReferenceAttribute(Type[])

    Link to provided Types

    Declaration
    public GuidReferenceAttribute(params Type[] types)
    Parameters
    Type Name Description
    Type[] types

    The Types to include

    GuidReferenceAttribute(Type[], Type[])

    Link to provided Types. Exclude types in Excludes

    Declaration
    public GuidReferenceAttribute(Type[] types, Type[] excludes)
    Parameters
    Type Name Description
    Type[] types

    The Types to include

    Type[] excludes

    The Types to exclude

    Properties

    Excludes

    Declaration
    public Type[] Excludes { get; }
    Property Value
    Type Description
    Type[]

    Types

    Declaration
    public Type[] Types { get; }
    Property Value
    Type Description
    Type[]
    Back to top Copyright © 2020 East Side Games Inc.