public static void Unregister(string name, Func <Dictionary <string, object>, object> reference) { CoreServiceContainer.GetInstance().GetService(CoreListener.REMOVE_LISTENER) .AddParam(CoreListener.NAME, name) .AddParam(CoreListener.REFERENCE, reference) .Execute(); }
public static void addCallbacks(ICoreBaseObject target, string group, List <IExecutable> callbacks) { CoreServiceContainer.GetInstance().GetService(target.Name + ADD_CALLBACK) .AddParam(GROUP, group) .AddParam(CALLBACK, callbacks) .Execute(); }
public static CoreNotification CreateNotification(string name) { Console.WriteLine("NOTIFICATION NAME:" + name); return((CoreNotification)CoreServiceContainer.GetInstance().GetService(CoreNotification.CREATE_NOTIFICATION) .AddParam(CoreNotification.NAME, name) .Execute()); }
public static void Construct(ICoreBaseObject _instance) { _instance.Sc = CoreServiceContainer.GetInstance(); _instance.Context = CoreContext.GetInstance(); _instance.Sc.RegisterService(_instance.Name + ".add.callback", _instance.ServiceAddCallback); _instance.Sc.RegisterService(_instance.Name + ".add.callbacks", _instance.ServiceAddCallbacks); }
public static void Register(string name, Func <Dictionary <string, object>, object> reference) { CoreListener listener = new CoreListener(name, reference); CoreServiceContainer.GetInstance().GetService(CoreListener.REGISTER_LISTENER) .AddParam(CoreListener.LISTENER, listener) .AddParam(CoreListener.NAME, name) .Execute(); }
public CoreContext() { this.Sc = CoreServiceContainer.GetInstance(); }