public override Task <GetDescriptionResponse> GetDescription(GetDescriptionRequest request, ServerCallContext context) { var returnObject = returnObjectStore.GetObject(request.ReturnObject.Id); return(Task.FromResult(new GetDescriptionResponse { Description = returnObject.GetDescription() })); }
/// <summary> /// Return cached object without deserialization to .NET object. Used to process data at json level /// </summary> /// <param name="query"></param> /// <returns></returns> public IList <CachedObject> GetObjectDescriptions(OrQuery query) { var exceptions = new List <ExceptionResponse>(); var result = new List <CachedObject>(); var request = new GetDescriptionRequest(query); Channel.SendStreamRequest(request, (CachedObject item, int currentItem, int totalItems) => result.Add(item), exceptions.Add); if (exceptions.Count > 0) { throw new CacheException("Error in GetObjectDescriptions", exceptions[0].Message, exceptions[0].CallStack); } return(result); }
public async Task <GetDescriptionResponse> GetDescription([FromUri] GetDescriptionRequest request) { return(await Invoke(request, Repository.GetDescription)); }