|
|
@ -16,7 +16,7 @@ public interface ICreateEntityAttribute { } |
|
|
|
/// (a globally unique identifier) set equal to their name. If they |
|
|
|
/// (a globally unique identifier) set equal to their name. If they |
|
|
|
/// are also marked with this attribute, the symbol won't be set. |
|
|
|
/// are also marked with this attribute, the symbol won't be set. |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum)] |
|
|
|
public class PrivateAttribute : Attribute { } |
|
|
|
public class PrivateAttribute : Attribute { } |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -51,15 +51,15 @@ public class TagAttribute : AddAttribute<Tag>, ICreateEntityAttribute { } |
|
|
|
/// the "relation" in a pair. However, this attribute is purely informational. |
|
|
|
/// the "relation" in a pair. However, this attribute is purely informational. |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
/// <remarks> |
|
|
|
/// <remarks> |
|
|
|
/// The relationship may have component data associated with |
|
|
|
/// The relationship may have component data associated with |
|
|
|
/// it when added to an entity under these circumstances: |
|
|
|
/// it when added to an entity under these circumstances: |
|
|
|
/// <list type="bullet"> |
|
|
|
/// <list type="bullet"> |
|
|
|
/// <item>If marked as a <see cref="TagAttribute"/>, does not carry data.</item> |
|
|
|
/// <item>If marked as a <see cref="TagAttribute"/>, does not carry data.</item> |
|
|
|
/// <item>If marked as a <see cref="ComponentAttribute"/>, carries the relation's data.</item> |
|
|
|
/// <item>If marked as a <see cref="ComponentAttribute"/>, carries the relation's data.</item> |
|
|
|
/// <item>If marked with neither, will carry the target's data, if it's a component.</item> |
|
|
|
/// <item>If marked with neither, will carry the target's data, if it's a component.</item> |
|
|
|
/// </list> |
|
|
|
/// </list> |
|
|
|
/// </remarks> |
|
|
|
/// </remarks> |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum)] |
|
|
|
public class RelationAttribute : Attribute, ICreateEntityAttribute { } |
|
|
|
public class RelationAttribute : Attribute, ICreateEntityAttribute { } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -67,7 +67,7 @@ public class RelationAttribute : Attribute, ICreateEntityAttribute { } |
|
|
|
public class IsAAttribute<TTarget> : AddAttribute<IsA, TTarget> { } |
|
|
|
public class IsAAttribute<TTarget> : AddAttribute<IsA, TTarget> { } |
|
|
|
|
|
|
|
|
|
|
|
/// <seealso cref="ChildOf"/> |
|
|
|
/// <seealso cref="ChildOf"/> |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum)] |
|
|
|
public class ChildOfAttribute<TTarget> : AddAttribute<ChildOf, TTarget> { } |
|
|
|
public class ChildOfAttribute<TTarget> : AddAttribute<ChildOf, TTarget> { } |
|
|
|
|
|
|
|
|
|
|
|
/// <seealso cref="DependsOn"/> |
|
|
|
/// <seealso cref="DependsOn"/> |
|
|
@ -90,14 +90,14 @@ public class ProxyAttribute : Attribute |
|
|
|
internal ProxyAttribute(Type type) => Type = type; |
|
|
|
internal ProxyAttribute(Type type) => Type = type; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, AllowMultiple = true)] |
|
|
|
public class AddEntityAttribute : Attribute |
|
|
|
public class AddEntityAttribute : Attribute |
|
|
|
{ |
|
|
|
{ |
|
|
|
public Type Entity { get; } |
|
|
|
public Type Entity { get; } |
|
|
|
internal AddEntityAttribute(Type entity) => Entity = entity; |
|
|
|
internal AddEntityAttribute(Type entity) => Entity = entity; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, AllowMultiple = true)] |
|
|
|
public class AddRelationAttribute : Attribute |
|
|
|
public class AddRelationAttribute : Attribute |
|
|
|
{ |
|
|
|
{ |
|
|
|
public Type Relation { get; } |
|
|
|
public Type Relation { get; } |
|
|
|