Skip to content
Tsuyoshi Ushio edited this page Aug 9, 2016 · 7 revisions

Programming Microsoft Azure Service Fabric source code revision history

  1. Chapter 2

1.1. P34: The first version

CalculatorService.cs

         protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners()
         {
              return new[]
              {
                  new ServiceInstanceListener(context =>
                     this.CreateServiceRemotingListener(context))
              };
          }

Code Sample

1.2. P38: RegisterServiceType

Program.cs

                ServiceRuntime.RegisterServiceAsync("CalculatorServiceType",
                    context => new CalculatorService(context)).GetAwaiter().GetResult();

[Code Sample] (Code Sample)[https://github.com/TsuyoshiUshio/AzureServiceFabricSample/blob/4cf37a68634018072b2efeaa6d47709820067e96/Chapter02/CalculatorApplication/CalculatorService/Program.cs#L24-L25]

Clone this wiki locally