Skip to content

Commit

Permalink
Fixed scripting.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed May 29, 2020
1 parent 66e1af4 commit 3774f26
Showing 1 changed file with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,12 @@ public NamedContentData? Data
set => SetValue(value);
}

public NamedContentData? DataOld
{
get => GetValue<NamedContentData?>();
set => SetValue(value);
}

public Status Status
{
get => GetValue<Status>();
set => SetValue(value);
}

public Status StatusOld
{
get => GetValue<Status>();
set => SetValue(value);
}

public string? AppName
{
get => GetValue<string?>();
Expand All @@ -77,27 +65,35 @@ public string? Operation
set => SetValue(value);
}

[Obsolete]
public Status OldStatus
public NamedContentData? DataOld
{
get => GetValue<Status>("statusOld");
get => GetValue<NamedContentData?>();
set
{
SetValue(value, "oldData");
SetValue(value);
}
}

[Obsolete]
public NamedContentData? OldData
public Status StatusOld
{
get => GetValue<NamedContentData?>("dataOld");
get => GetValue<Status>();
set
{
SetValue(value, "oldStatus");
SetValue(value);
}
}

public void SetValue(object? value, [CallerMemberName] string? key = null)
public void SetValue(object? value, [CallerMemberNameAttribute] string? key = null)
{
if (key != null)
{
this[key] = value;
}
}

public T GetValue<T>([CallerMemberName] string? key = null)
public T GetValue<T>([CallerMemberNameAttribute] string? key = null)
{
if (key != null && TryGetValue(key, out var temp) && temp is T result)
{
Expand Down

0 comments on commit 3774f26

Please sign in to comment.