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, }; }
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"; }
private string GetEmittedPropertyName(JsonProperty originalProperty, SensitiveDataAttribute attribute) { return(attribute.EmittedPropertyName.Clear() ?? $"{originalProperty.PropertyName}_encr"); }