System Library Common Framework
Search Results for

    *.Benchmark*,*.Tests*,*.ApiTests*,*.BaseTest*,DelegateJsonConverter,CalleeCancelledRequestException,ClientResponse,ContentType,OutputCachePolicy
    Show / Hide Table of Contents Show / Hide Table of Contents
    NamespaceSystemLibrary.Common.Framework.Attributes SystemLibrary.Common.Framework.Net.dll

    Marks a property as the placeholder for a decrypted config value.

    The property must be public, instance-level, with both get and set accessors.

    Used internally by Config to locate and decrypt values marked with DecryptAttribute on instantiation.

    Values must be encrypted using the parameterless Encrypt() method. See StringExtensions.Encrypt() for details.

    Remarks
    X

    PropertyName must refer to another property in the same class. The class must inherit from Config.

    Applies only to properties with public get;set;. Safe for external use; no planned breaking changes.

    Decryption occurs once during application startup when the Configuration class is created.

    ConfigDecryptAttribute

    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] public class ConfigDecryptAttribute : Attribute

    Inheritance
    object
    Attribute
    ConfigDecryptAttribute
    Examples
    X

    apiConfig.json:

    {
       token: "An encrypted value of the token, store it safely in git as it is encrypted by a key/IV only you know!"
    }

    ApiConfig.cs:

    class ApiConfig : Config
    {
        public string Token {get;set;} //Encrypted value...
        public string TokenDecrypt {get;set;} // Naming convention decrypting
    
        [ConfigDecrypt(propertyName="Token")]
        public string TokenDec {get;set;} // Attribute convention decrypting
    }
    Arguments
    X

    Constructors

    Pass in the name of the property that will be decrypted

    Remarks
    X

    PropertyName must refer to another property in the same class. The class must inherit from Config.

    Applies only to properties with public get;set;. Safe for external use; no planned breaking changes.

    Decryption occurs once during application startup when the Configuration class is created.

    public ConfigDecryptAttribute(string propertyName = null)

    X
    Methods arguments
    Type Name Description
    string propertyName

    Fields

    Name of the property that will be decrypted

    Remarks
    X

    PropertyName must refer to another property in the same class. The class must inherit from Config.

    Applies only to properties with public get;set;. Safe for external use; no planned breaking changes.

    Decryption occurs once during application startup when the Configuration class is created.

    public string PropertyName

    X
    Field Value
    Type Description
    string

    Extension Methods

    ObjectExtensions.Json(object, bool)
    ObjectExtensions.Json(object, JsonSerializerOptions, bool, params JsonConverter[])
    ObjectExtensions.Json(object, params JsonConverter[])
    ObjectExtensions.Xml(object)

    }

    In This Article
    Package: nuget
    Source: github
    Website: System Library Common Framework