public static IntentManager GetIntentManager(IntentRepositoryContract _intentRepo = null) { if (_intentManager == null) { _intentManager = new IntentManager(_intentRepo); } return(_intentManager); }
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); }