예제 #1
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(SyncManagerBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_GetLastSyncBlock, serviceImpl.GetLastSyncBlock)
            .AddMethod(__Method_GetDeltaSyncBlocks, serviceImpl.GetDeltaSyncBlocks)
            .AddMethod(__Method_GetAllCombinedRegistryBlocksPerSync, serviceImpl.GetAllCombinedRegistryBlocksPerSync)
            .AddMethod(__Method_GetAllCombinedRegistryBlocksSinceSync, serviceImpl.GetAllCombinedRegistryBlocksSinceSync)
            .AddMethod(__Method_GetCombinedRegistryBlocksInfoSinceHeight, serviceImpl.GetCombinedRegistryBlocksInfoSinceHeight)
            .AddMethod(__Method_GetCombinedRegistryBlocksContentSinceHeight, serviceImpl.GetCombinedRegistryBlocksContentSinceHeight)
            .AddMethod(__Method_GetTransactionRegistryBlockInfos, serviceImpl.GetTransactionRegistryBlockInfos)
            .AddMethod(__Method_GetFullRegistryBlock, serviceImpl.GetFullRegistryBlock).Build());
 }
예제 #2
0
 /// <summary>Register service method implementations with a service binder. Useful when customizing the service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, SyncManagerBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_GetLastSyncBlock, serviceImpl.GetLastSyncBlock);
     serviceBinder.AddMethod(__Method_GetDeltaSyncBlocks, serviceImpl.GetDeltaSyncBlocks);
     serviceBinder.AddMethod(__Method_GetAllCombinedRegistryBlocksPerSync, serviceImpl.GetAllCombinedRegistryBlocksPerSync);
     serviceBinder.AddMethod(__Method_GetAllCombinedRegistryBlocksSinceSync, serviceImpl.GetAllCombinedRegistryBlocksSinceSync);
     serviceBinder.AddMethod(__Method_GetCombinedRegistryBlocksInfoSinceHeight, serviceImpl.GetCombinedRegistryBlocksInfoSinceHeight);
     serviceBinder.AddMethod(__Method_GetCombinedRegistryBlocksContentSinceHeight, serviceImpl.GetCombinedRegistryBlocksContentSinceHeight);
     serviceBinder.AddMethod(__Method_GetTransactionRegistryBlockInfos, serviceImpl.GetTransactionRegistryBlockInfos);
     serviceBinder.AddMethod(__Method_GetFullRegistryBlock, serviceImpl.GetFullRegistryBlock);
     serviceBinder.AddMethod(__Method_IsKeyImageWitnessed, serviceImpl.IsKeyImageWitnessed);
 }