NamespaceSystemLibrary.Common.Net.Attributes
Mark a property as the Decrypted value of an Encrypted Configuration Property
The property marked must be Public, Instance, Get and Set.
This attribute goes hand in hand with Config class, when a Config class is created it looks for which properties has this attribute and decrypts accordingly
To decrypt, properties must be encrypted through Encrypt() extension in this library that takes no Key/IV, but the "default" you've specified by configuration/convention. Read more in StringExtensions.Encrypt method how to encrypt.Remarks
The PropertyName must be a property within the same class that this attribute was used, and class must inherit Config to work automatically
This class attribute exists to read Config Properties that are public get;set;, but feel free to use ConfigDecrypt attribute yourself as it is not subject for breaking changes in near future
The decryption occurs only once for the app life time, at the creation of the Configuration classConfigDecryptAttribute
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] public class ConfigDecryptAttribute : Attribute
Inheritance
System.Object
System.Attribute
ConfigDecryptAttribute
Constructors
Fields
Field Value
Type | Description |
---|---|
System.String |
Extension Methods
}