コード例 #1
0
ファイル: GangCommandExtensions.cs プロジェクト: MrAntix/gang
 public static IGangCommandExecutor <TStateData> RegisterHandler <TStateData, TCommandData>(
     this IGangCommandExecutor <TStateData> executor,
     Func <GangCommand <TCommandData>, GangState <TStateData> > action
     )
     where TStateData : class, new()
     where TCommandData : class
 {
     return(executor.RegisterHandler <TCommandData>(
                GangCommandHandler <TStateData> .From(action)
                ));
 }
コード例 #2
0
ファイル: GangCommandExtensions.cs プロジェクト: MrAntix/gang
 public static IGangCommandExecutor <TStateData> RegisterHandler <TStateData, TCommandData>(
     this IGangCommandExecutor <TStateData> executor,
     IGangCommandHandler <TStateData, TCommandData> handler
     )
     where TStateData : class, new()
     where TCommandData : class
 {
     return(executor.RegisterHandler <TCommandData>(
                GangCommandHandler <TStateData> .From(handler)
                ));
 }