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); }
private ResponseConfiguration ProjectionConfigConfigurator(ICodec codec, ProjectionManagementMessage.ProjectionConfig state) { return(Configure.Ok("application/json", Helper.UTF8NoBom, null, null, false)); }
private string ProjectionConfigFormatter(ICodec codec, ProjectionManagementMessage.ProjectionConfig config) { return(config.ToJson()); }