Class ServiceRuntime
The class that provides methods to register a reliable service with the Copper runtime.
Inheritance
System.Object
ServiceRuntime
Namespace: Copper.ServiceFabric.Services.Runtime
Assembly: Copper.Fabric.dll
Syntax
public class ServiceRuntime
Constructors
View SourceServiceRuntime(FabricRuntime, StatelessServiceContext)
Initializes a new instance of the ServiceRuntime class.
Declaration
public ServiceRuntime(FabricRuntime fabricRuntime, StatelessServiceContext statelessServiceContext)
Parameters
Type | Name | Description |
---|---|---|
FabricRuntime | fabricRuntime | The fabric runtime. |
StatelessServiceContext | statelessServiceContext | The stateless service context. |
Methods
View SourceRegisterServiceAsync(String, Func<StatelessServiceContext, StatelessService>)
Registers a reliable stateless service with the Copper runtime.
Declaration
public Task RegisterServiceAsync(string serviceTypeName, Func<StatelessServiceContext, StatelessService> statelessServiceFactory)
Parameters
Type | Name | Description |
---|---|---|
System.String | serviceTypeName | The service type name as provied in service manifest. |
System.Func<StatelessServiceContext, StatelessService> | statelessServiceFactory | A factory method to create stateless service objects. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous register operation. |