public override Task <RemoveModuleResponse> RemoveModule(RemoveModuleRequest request, ServerCallContext context) { RemoteTarget target = GrpcLookupUtils.GetTarget(request.Target, _targetStore); SbModule module = _moduleStore.GetObject(request.Module.Id); return(Task.FromResult( new RemoveModuleResponse { Result = target.RemoveModule(module) })); }
public override Task <GetFileSpecResponse> GetFileSpec( GetFileSpecRequest request, ServerCallContext context) { var module = moduleStore.GetObject(request.Module.Id); var response = new GetFileSpecResponse(); var fileSpec = module.GetFileSpec(); if (fileSpec != null) { response.FileSpec = new GrpcSbFileSpec { Filename = fileSpec.GetFilename(), Directory = fileSpec.GetDirectory(), }; } return(Task.FromResult(response)); }