protected ProjectionManagementMessage.ProjectionConfig GetProjectionConfig(ManagedProjection mp)
 {
     ProjectionManagementMessage.ProjectionConfig getConfigResult = null;
     mp.Handle(new ProjectionManagementMessage.Command.GetConfig(
                   new CallbackEnvelope(m => getConfigResult = (ProjectionManagementMessage.ProjectionConfig)m), "name",
                   SerializedRunAs.SerializePrincipal(ProjectionManagementMessage.RunAs.Anonymous)));
     return(getConfigResult);
 }
        protected override void Given()
        {
            _timeProvider = new FakeTimeProvider();
            _mp           = CreateManagedProjection();

            _mp.InitializeNew(
                _persistedState,
                null);
            _mp.Handle(new CoreProjectionStatusMessage.Prepared(_projectionId, new ProjectionSourceDefinition()));

            // Complete write of persisted state to start projection
            OneWriteCompletes();
            _config = GetProjectionConfig(_mp);
        }
예제 #3
0
 private ResponseConfiguration ProjectionConfigConfigurator(ICodec codec,
                                                            ProjectionManagementMessage.ProjectionConfig state)
 {
     return(Configure.Ok("application/json", Helper.UTF8NoBom, null, null, false));
 }
예제 #4
0
 private string ProjectionConfigFormatter(ICodec codec, ProjectionManagementMessage.ProjectionConfig config)
 {
     return(config.ToJson());
 }