Friday, 12 January 2018

What is ServiceRuntime in Azure Object Model.



ServiceRuntime:
This static class that provides methods to register reliable services with service fabric run-time.

Registers a reliable stateful service with Service Fabric runtime.
Registers a reliable stateless service with Service Fabric runtime.

This component contains classes and interfaces that allows your roles to interact with the windows azure environment.



ServiceRuntime commonly we can find in Program.cs of service fabric project.


//Tells Azure Service Fabric Runtime about project ( project name ) 
ServiceRuntime.RegisterServiceAsync("ProjectName",context => new ProductCataLog(context)).GetAwaiter().GetResult();

No comments:

Post a Comment