public override void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, ActionContext.ActionResponder responder) { if (string.IsNullOrWhiteSpace(name)) { CompatibilityLayer.LogError($"Empty name parameter."); return; } if (args == null) { CompatibilityLayer.LogError($"Args cannot be null."); return; } var ad = new ActionDefinition(); ad.Name = name; ad.Kind = kind; ad.Args = args; ad.Options = options; if (responder != null) { ad.Responder += responder; } VarCache.RegisterActionDefinition(ad); }
public override void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, ActionContext.ActionResponder responder) { if (name == null) { return; } if (responder != null) { ActionRespondersDictionary.Add(name, responder); } string argString = args == null ? null : args.ToJSON(); string optionString = options == null ? null : Json.Serialize(options); lp_defineAction(name, (int)kind, argString, optionString); }
public override void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, Action responder) { if (name == null) { return; } if (responder != null) { ActionRespondersDictionary.Add("ActionResponder:" + name, responder); } string argString = args == null ? null : args.ToJSON(); string optionString = options == null ? null : Json.Serialize(options); int kindInt = (int)kind; NativeSDK.CallStatic("defineAction", name, kindInt, argString, optionString); }
public static void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, ActionContext.ActionResponder responder) { LeanplumFactory.SDK.DefineAction(name, kind, args, options, responder); }
public static void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options) { LeanplumFactory.SDK.DefineAction(name, kind, args, options, null); }
public static void DefineAction(string name, Constants.ActionKind kind, ActionArgs args) { LeanplumFactory.SDK.DefineAction(name, kind, args, null, null); }
public override void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, Action responder) { }
public abstract void DefineAction(string name, Constants.ActionKind kind, ActionArgs args, IDictionary <string, object> options, ActionContext.ActionResponder responder);