Пример #1
0
 public Model(System.Func <MessagingContext> messagingBuilder,
              System.Func <PlatformContext> platformBuilder,
              System.Func <WorldRuntimeContext> worldBuilder,
              System.Func <HUDContext> hudBuilder)
 {
     this.messaging = messagingBuilder();
     this.platform  = platformBuilder();
     this.world     = worldBuilder();
     this.hud       = hudBuilder();
 }
Пример #2
0
            public Model(System.Func <MessagingContext> messagingBuilder = null,
                         System.Func <PlatformContext> platformBuilder   = null,
                         System.Func <WorldRuntimeContext> worldBuilder  = null)
            {
                messagingBuilder = messagingBuilder ?? MessagingContextFactory.CreateDefault;
                platformBuilder  = platformBuilder ?? PlatformContextFactory.CreateDefault;
                worldBuilder     = worldBuilder ?? WorldRuntimeContextFactory.CreateDefault;

                this.messaging = messagingBuilder();
                this.platform  = platformBuilder();
                this.world     = worldBuilder();
            }