public CloudState RegisterEventSourcedEntity( IEventSourcedEntityHandlerFactory factory, ServiceDescriptor descriptor, string persistenceId, int snapshotEvery, params FileDescriptor[] additionalDescriptors ) { StatefulServices.Add( descriptor.FullName, new EventSourcedStatefulService( factory, descriptor, NewAnySupport(additionalDescriptors), persistenceId, snapshotEvery ) ); return(this); }
internal EventSourcedStatefulService(IEventSourcedEntityHandlerFactory factory, ServiceDescriptor serviceDescriptor, AnySupport anySupport, string persistenceId = null, int snapshotEvery = 0) : base(factory, serviceDescriptor, anySupport, persistenceId) { SnapshotEvery = snapshotEvery; }