public SceneBuilder(GraphicsDevice device, EntityController entityController, SkyboxBuilder skyboxBuilder, LightsFactory lightsFactory, OpaqueModelFactory opaqueModelFactory, TransparentModelFactory transparentModelFactory, ProjectorFactory projectorFactory, AdditiveEmitterFactory additiveEmitterFactory, AveragedEmitterFactory averagedEmitterFactory, DynamicTextureFactory dynamicTextureFactory, DebugInfoFactory debugInfoFactory, WaypointFactory waypointFactory, PipelineBuilder pipelineBuilder) { this.EntityController = entityController; this.SkyboxBuilder = skyboxBuilder; this.LightsFactory = lightsFactory; this.OpaqueModelFactory = opaqueModelFactory; this.TransparentModelFactory = transparentModelFactory; this.ProjectorFactory = projectorFactory; this.AdditiveEmitterFactory = additiveEmitterFactory; this.AveragedEmitterFactory = averagedEmitterFactory; this.DynamicTextureFactory = dynamicTextureFactory; this.DebugInfoFactory = debugInfoFactory; this.WaypointFactory = waypointFactory; this.PipelineBuilder = pipelineBuilder; }
public CreateMenu(DebugInfoFactory outLineFactory, WaypointFactory waypointFactory, ProjectorFactory projectorFactory, ContentManager content, LightsController lightsController) { this.OutlineFactory = outLineFactory; this.WaypointFactory = waypointFactory; this.ProjectorFactory = projectorFactory; this.Texture = content.Load <Texture2D>("Debug"); this.LightsController = lightsController; this.State = new UIState(); }
public static Func <double, double, Func <string, string> > MakerZipper(ProjectorFactory facX, ProjectorFactory facY) => (x, y) => { if (!double.IsNaN(x)) { return(facX.Make(x)); } if (!double.IsNaN(y)) { return(facY.Make(y)); } return(facX.MakeDefault()); };
public static Func <double, double, Color?> ColorZipper(ProjectorFactory facX, ProjectorFactory facY) => (x, y) => { if (!double.IsNaN(x)) { return(facX.Project(x).HslToColor()); } if (!double.IsNaN(y)) { return(facY.Project(y).HslToColor()); } return(null); };
public static Func <double, double, string, string> RenderZipper(ProjectorFactory facX, ProjectorFactory facY) => (x, y, tx) => { if (!double.IsNaN(x)) { return(facX.Render(x, tx)); } if (!double.IsNaN(y)) { return(facY.Render(y, tx)); } return(facX.Render(double.NaN, tx)); };
public void Test() { var bound = (0, 5); var preset = Presets.Fresh; var effects = new Effect[] { }; var factory = ProjectorFactory.Build(bound, preset, effects); foreach (var i in Enumerable.Range(0, 5)) { var dye = factory.Make(i); Console.WriteLine($"[{i}]: {dye("some")}"); } }
public Solution(IEventRepository eventRepository, ISnapshotRepository snapshotRepository) { var eventStore = new EventStore.EventStore(eventRepository); var snapshotStore = new SnapshotStore(snapshotRepository); var serviceCollection = new ServiceCollection(); serviceCollection.AddSingleton <SolutionContext>(); serviceCollection.AddSingleton <ICommandBus>(new CommandBus(eventStore)); serviceCollection.AddSingleton <IQueryBus>(new QueryBus()); serviceCollection.AddSingleton <IEventBus>(new EventBus()); serviceCollection.AddSingleton <IEventStore>(eventStore); serviceCollection.AddSingleton <ISnapshotStore>(snapshotStore); ServiceProvider = serviceCollection.BuildServiceProvider(); ProjectorFactory.Init(EventStore); }
public void TestFixtureSetUp() { var connectionString = ConfigurationManager.ConnectionStrings["eventstore"].ConnectionString; var url = new MongoUrl(connectionString); var client = new MongoClient(url); _db = client.GetDatabase(url.DatabaseName); client.DropDatabase(url.DatabaseName); _identityConverter = new IdentityManager(new InMemoryCounterService()); _identityConverter.RegisterIdentitiesFromAssembly(GetType().Assembly); var loggerFactory = Substitute.For <ILoggerFactory>(); loggerFactory.Create(Arg.Any <Type>()).Returns(NullLogger.Instance); _eventStore = Substitute.For <IStoreEvents>(); _factory = new ProjectorFactory(Substitute.For <IKernel>()); }
public async Task LoadProjection() { Projector = await ProjectorFactory.GetProjector <TProjector>(AggregateId); }
public static Func <double, string, string> RenderMapper(ProjectorFactory facX) => facX.Render;
public static Func <double, Color?> ColorMapper(ProjectorFactory facX) => x => double.IsNaN(x) ? null : (Color?)facX.Project(x).HslToColor();
public static Func <double, Func <string, string> > MakerMapper(ProjectorFactory facX) => x => double.IsNaN(x) ? facX.MakeDefault() : facX.Make(x);