//----------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Activities.Statements { using System; using System.Activities.DynamicUpdate; using System.Activities.Validation; using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Collections; using System.Windows.Markup; using System.Collections.ObjectModel; [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { IList actionArguments; public InvokeAction() { this.actionArguments = new ValidatingCollection { // disallow null values OnAddValidationCallback = item => { if (item == null) { throw FxTrace.Exception.ArgumentNull("item"); } } }; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void CacheMetadata(NativeActivityMetadata metadata) { metadata.AddDelegate(this.Action); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void CacheMetadata(NativeActivityMetadata metadata) { metadata.AddDelegate(this.Action); RuntimeArgument runtimeArgument = new RuntimeArgument("Argument", typeof(T), ArgumentDirection.In, true); metadata.Bind(this.Argument, runtimeArgument); metadata.SetArgumentsCollection(new Collection { runtimeArgument }); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) // no-op { return; } context.ScheduleAction(Action, Argument.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) // no-op { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [RequiredArgument] public InArgument Argument7 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context), Argument7.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [RequiredArgument] public InArgument Argument7 { get; set; } [RequiredArgument] public InArgument Argument8 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context), Argument7.Get(context), Argument8.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [RequiredArgument] public InArgument Argument7 { get; set; } [RequiredArgument] public InArgument Argument8 { get; set; } [RequiredArgument] public InArgument Argument9 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context), Argument7.Get(context), Argument8.Get(context), Argument9.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [RequiredArgument] public InArgument Argument7 { get; set; } [RequiredArgument] public InArgument Argument8 { get; set; } [RequiredArgument] public InArgument Argument9 { get; set; } [RequiredArgument] public InArgument Argument10 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context), Argument7.Get(context), Argument8.Get(context), Argument9.Get(context), Argument10.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [RequiredArgument] public InArgument Argument7 { get; set; } [RequiredArgument] public InArgument Argument8 { get; set; } [RequiredArgument] public InArgument Argument9 { get; set; } [RequiredArgument] public InArgument Argument10 { get; set; } [RequiredArgument] public InArgument Argument11 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context), Argument7.Get(context), Argument8.Get(context), Argument9.Get(context), Argument10.Get(context), Argument11.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [RequiredArgument] public InArgument Argument7 { get; set; } [RequiredArgument] public InArgument Argument8 { get; set; } [RequiredArgument] public InArgument Argument9 { get; set; } [RequiredArgument] public InArgument Argument10 { get; set; } [RequiredArgument] public InArgument Argument11 { get; set; } [RequiredArgument] public InArgument Argument12 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context), Argument7.Get(context), Argument8.Get(context), Argument9.Get(context), Argument10.Get(context), Argument11.Get(context), Argument12.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [RequiredArgument] public InArgument Argument7 { get; set; } [RequiredArgument] public InArgument Argument8 { get; set; } [RequiredArgument] public InArgument Argument9 { get; set; } [RequiredArgument] public InArgument Argument10 { get; set; } [RequiredArgument] public InArgument Argument11 { get; set; } [RequiredArgument] public InArgument Argument12 { get; set; } [RequiredArgument] public InArgument Argument13 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context), Argument7.Get(context), Argument8.Get(context), Argument9.Get(context), Argument10.Get(context), Argument11.Get(context), Argument12.Get(context), Argument13.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [RequiredArgument] public InArgument Argument7 { get; set; } [RequiredArgument] public InArgument Argument8 { get; set; } [RequiredArgument] public InArgument Argument9 { get; set; } [RequiredArgument] public InArgument Argument10 { get; set; } [RequiredArgument] public InArgument Argument11 { get; set; } [RequiredArgument] public InArgument Argument12 { get; set; } [RequiredArgument] public InArgument Argument13 { get; set; } [RequiredArgument] public InArgument Argument14 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context), Argument7.Get(context), Argument8.Get(context), Argument9.Get(context), Argument10.Get(context), Argument11.Get(context), Argument12.Get(context), Argument13.Get(context), Argument14.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [RequiredArgument] public InArgument Argument7 { get; set; } [RequiredArgument] public InArgument Argument8 { get; set; } [RequiredArgument] public InArgument Argument9 { get; set; } [RequiredArgument] public InArgument Argument10 { get; set; } [RequiredArgument] public InArgument Argument11 { get; set; } [RequiredArgument] public InArgument Argument12 { get; set; } [RequiredArgument] public InArgument Argument13 { get; set; } [RequiredArgument] public InArgument Argument14 { get; set; } [RequiredArgument] public InArgument Argument15 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context), Argument7.Get(context), Argument8.Get(context), Argument9.Get(context), Argument10.Get(context), Argument11.Get(context), Argument12.Get(context), Argument13.Get(context), Argument14.Get(context), Argument15.Get(context)); } } [ContentProperty("Action")] public sealed class InvokeAction : NativeActivity { public InvokeAction() { } [RequiredArgument] public InArgument Argument1 { get; set; } [RequiredArgument] public InArgument Argument2 { get; set; } [RequiredArgument] public InArgument Argument3 { get; set; } [RequiredArgument] public InArgument Argument4 { get; set; } [RequiredArgument] public InArgument Argument5 { get; set; } [RequiredArgument] public InArgument Argument6 { get; set; } [RequiredArgument] public InArgument Argument7 { get; set; } [RequiredArgument] public InArgument Argument8 { get; set; } [RequiredArgument] public InArgument Argument9 { get; set; } [RequiredArgument] public InArgument Argument10 { get; set; } [RequiredArgument] public InArgument Argument11 { get; set; } [RequiredArgument] public InArgument Argument12 { get; set; } [RequiredArgument] public InArgument Argument13 { get; set; } [RequiredArgument] public InArgument Argument14 { get; set; } [RequiredArgument] public InArgument Argument15 { get; set; } [RequiredArgument] public InArgument Argument16 { get; set; } [DefaultValue(null)] public ActivityAction Action { get; set; } protected override void OnCreateDynamicUpdateMap(NativeActivityUpdateMapMetadata metadata, Activity originalActivity) { metadata.AllowUpdateInsideThisActivity(); } protected override void Execute(NativeActivityContext context) { if (Action == null || Action.Handler == null) { return; } context.ScheduleAction(Action, Argument1.Get(context), Argument2.Get(context), Argument3.Get(context), Argument4.Get(context), Argument5.Get(context), Argument6.Get(context), Argument7.Get(context), Argument8.Get(context), Argument9.Get(context), Argument10.Get(context), Argument11.Get(context), Argument12.Get(context), Argument13.Get(context), Argument14.Get(context), Argument15.Get(context), Argument16.Get(context)); } } }