Skip to content

SettingsStorage.SetOrCreate(T, string?) method

Defined in

Type: SettingsStorage Namespace: ReactiveMarbles.CacheDatabase.Settings.Core Assembly: ReactiveMarbles.CacheDatabase.EncryptedSettings.dll

Applies to

netstandard2.0, netstandard2.0

protected void SetOrCreate<T>(T value, string? key = null)

View source

Summary: Overwrites the existing value or creates a new settings entry. The value is serialized via the Json.Net serializer.

Type parameters

NameDescription
TThe type of the value to set or create.

Parameters

NameTypeDescription
valueTThe value to be set or created.
key = nullstring?The key of the setting. Automatically set through the CallerMemberNameAttribute.