Hello Community!
There is no way to set emitEnabled to true in the CreateContinuousAsync method. Additionally - not in accordance with its name - the method not only creates, but also starts the projection. Only the UpdateAsync method has the emitEnabled option. So, to create and run a projection with emitEnabled == true, you need to create a “do nothing” projection and update it later. Is this the recommended way?
var nonExistentStreamName = Guid.NewGuid();
var doNothingBody = "fromStream('"+nonExistentStreamName+"').when({foo: function(state, event){}})";
projectionManagementClient.CreateContinuousAsync(projectionName, doNothingBody).Wait();
projectionManagementClient.DisableAsync(projectionName).Wait();
projectionManagementClient.UpdateAsync(projectionName, originalBody, emitEnabled: true).Wait();
projectionManagementClient.EnableAsync(projectionName).Wait();