示例#1
0
 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();
 }
示例#2
0
 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();
 }
示例#3
0
 public static CoreNotification CreateNotification(string name)
 {
     Console.WriteLine("NOTIFICATION NAME:" + name);
     return((CoreNotification)CoreServiceContainer.GetInstance().GetService(CoreNotification.CREATE_NOTIFICATION)
            .AddParam(CoreNotification.NAME, name)
            .Execute());
 }
示例#4
0
        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);
        }
示例#5
0
        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();
        }
示例#6
0
 public CoreContext()
 {
     this.Sc = CoreServiceContainer.GetInstance();
 }