예제 #1
0
 public static IntentManager GetIntentManager(IntentRepositoryContract _intentRepo = null)
 {
     if (_intentManager == null)
     {
         _intentManager = new IntentManager(_intentRepo);
     }
     return(_intentManager);
 }
예제 #2
0
        public new UserIntent getIntent()
        {
            UserIntent intent = new UserIntent();

            intent.type = this.GetType();
            if (this.action == null)
            {
                this.action = IntentManager.GetIntentManager().GetIntent <TData>(this.trigger, this.name).action;
            }
            intent.action = (data) =>
            {
                this.action.Invoke((TData)data);
            };
            intent.name    = this.name;
            intent.trigger = this.trigger;
            intent.data    = this.data;
            return(intent);
        }