using System; namespace Uigenx.Binding { /// /// Marks a class the studio should reflect into its data schema. The editor schema reflector /// walks every type carrying this attribute and reports its bindable paths. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)] public sealed class UgxDataSourceAttribute : Attribute { /// Name the studio shows. Defaults to the type name. public string Name { get; set; } public string Description { get; set; } public UgxDataSourceAttribute() { } public UgxDataSourceAttribute(string name) => Name = name; } /// /// Opts one member into the studio data schema, and out of it with . /// Members without it are still reported when they are public and readable. /// [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false)] public sealed class UgxBindableAttribute : Attribute { public bool Ignore { get; set; } /// Overrides the path segment. Defaults to the member name with a lowercase first letter. public string Path { get; set; } public string Description { get; set; } public UgxBindableAttribute() { } public UgxBindableAttribute(string path) => Path = path; } }