JsonProperty GetJsonProperty(Type type, JsonProperty mappedProperty, SensitiveDataAttribute attribute)
 {
     return new JsonProperty()
     {
         DeclaringType = type,
         PropertyName = GetEmittedPropertyName(mappedProperty, attribute),
         UnderlyingName = mappedProperty.UnderlyingName,
         PropertyType = typeof(string),
         ValueProvider = new SensitiveDataValueProvider(mappedProperty.UnderlyingName, SaltGenerator),
         Readable = true,
     };
 }
Exemple #2
0
 JsonProperty GetJsonProperty(Type type, JsonProperty mappedProperty, SensitiveDataAttribute attribute)
 {
     return(new JsonProperty()
     {
         DeclaringType = type,
         PropertyName = GetEmittedPropertyName(mappedProperty, attribute),
         UnderlyingName = mappedProperty.UnderlyingName,
         PropertyType = typeof(string),
         ValueProvider = new SensitiveDataValueProvider(mappedProperty.UnderlyingName, SaltGenerator),
         Readable = true,
     });
 }
 private string GetEmittedPropertyName(JsonProperty originalProperty, SensitiveDataAttribute attribute)
 {
     return attribute.EmittedPropertyName.Clear() ?? $"{originalProperty.PropertyName}_encr";
 }
Exemple #4
0
 private string GetEmittedPropertyName(JsonProperty originalProperty, SensitiveDataAttribute attribute)
 {
     return(attribute.EmittedPropertyName.Clear() ?? $"{originalProperty.PropertyName}_encr");
 }