public override Task <GetSectionAtIndexResponse> GetSectionAtIndex( GetSectionAtIndexRequest request, ServerCallContext context) { var module = moduleStore.GetObject(request.Module.Id); var section = module.GetSectionAtIndex(request.Index); var response = new GetSectionAtIndexResponse(); if (section != null) { response.Section = new GrpcSbSection { Id = sectionStore.AddObject(section) }; } return(Task.FromResult(response)); }
public SbSection GetSectionAtIndex(ulong index) { GetSectionAtIndexResponse response = null; if (connection.InvokeRpc(() => { response = client.GetSectionAtIndex( new GetSectionAtIndexRequest { Module = grpcSbModule, Index = index, }); })) { if (response.Section != null && response.Section.Id != 0) { return(sectionFactory.Create(connection, response.Section)); } } return(null); }