diff --git a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptContext.cs b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptContext.cs index e6ae1fe5fd..e61338a120 100644 --- a/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptContext.cs +++ b/backend/src/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptContext.cs @@ -47,24 +47,12 @@ public NamedContentData? Data set => SetValue(value); } - public NamedContentData? DataOld - { - get => GetValue(); - set => SetValue(value); - } - public Status Status { get => GetValue(); set => SetValue(value); } - public Status StatusOld - { - get => GetValue(); - set => SetValue(value); - } - public string? AppName { get => GetValue(); @@ -77,19 +65,27 @@ public string? Operation set => SetValue(value); } - [Obsolete] - public Status OldStatus + public NamedContentData? DataOld { - get => GetValue("statusOld"); + get => GetValue(); + set + { + SetValue(value, "oldData"); + SetValue(value); + } } - [Obsolete] - public NamedContentData? OldData + public Status StatusOld { - get => GetValue("dataOld"); + get => GetValue(); + 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) { @@ -97,7 +93,7 @@ public void SetValue(object? value, [CallerMemberName] string? key = null) } } - public T GetValue([CallerMemberName] string? key = null) + public T GetValue([CallerMemberNameAttribute] string? key = null) { if (key != null && TryGetValue(key, out var temp) && temp is T result) {