Aether Utilities Aether Utilities
Aether Utilities Aether Utilities
DocFX + Singulink = ♥

Search Results for

    Edit this page

    Class ConfigAttribute

    Namespace
    AetherUtils.Core.Attributes
    Assembly
    AetherUtils.Core.dll
    Specifies the name of a property in a YAML configuration file, an optional comment description, and an optional default value to apply. [Config("connectionString", "The connection string used for connecting to a database.", "host=;port=;user=;password=;database=;")]
    public string ConnectionString { get; set; } = string.Empty;
    The name of the property as it will appear in the YAML file. A description of the property that will appear as a comment above the property in YAML. The default value that should be applied to the property in the YAML file.
    [AttributeUsage(AttributeTargets.Property)]
    public sealed class ConfigAttribute : Attribute
    Inheritance
    object
    Attribute
    ConfigAttribute
    Inherited Members
    Attribute.Equals(object)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetHashCode()
    Attribute.IsDefaultAttribute()
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.Match(object)
    Attribute.TypeId
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Extension Methods
    TypeExtensions.CanSerializeJson<T>(T)
    TypeExtensions.CanSerializeXml<T>(T)
    TypeExtensions.SerializeJson<T>(T)
    TypeExtensions.SerializeXml<T>(T)

    Constructors

    ConfigAttribute(string, string?, object?)

    Specifies the name of a property in a YAML configuration file, an optional comment description, and an optional default value to apply. [Config("connectionString", "The connection string used for connecting to a database.", "host=;port=;user=;password=;database=;")]
    public string ConnectionString { get; set; } = string.Empty;
    The name of the property as it will appear in the YAML file. A description of the property that will appear as a comment above the property in YAML. The default value that should be applied to the property in the YAML file.
    public ConfigAttribute(string name, string? description = null, object? defaultValue = null)

    Parameters

    name string
    description string
    defaultValue object

    Properties

    DefaultValue

    An optional default value for this configuration option. Defaults to null if not specified.
    public object? DefaultValue { get; }

    Property Value

    object

    Description

    An optional description that will be written as a comment above the config name in the YAML file.
    public string? Description { get; }

    Property Value

    string

    Name

    The YAML name of the property in the configuration file.
    public string Name { get; }

    Property Value

    string
    (c) 2024 Ethan Hann. All rights reserved.