public object Get(GetIcon request) { using (var response = _dlnaManager.GetIcon(request.Filename)) { using (var ms = _memoryStreamProvider.CreateNew()) { response.Stream.CopyTo(ms); ms.Position = 0; var bytes = ms.ToArray(); return(ResultFactory.GetResult(bytes, "image/" + response.Format.ToString().ToLower())); } } }
public object Get(GetIcon request) { using (var response = _dlnaManager.GetIcon(request.Filename)) { using (var ms = new MemoryStream()) { response.Stream.CopyTo(ms); ms.Position = 0; var bytes = ms.ToArray(); return ResultFactory.GetResult(bytes, "image/" + response.Format.ToString().ToLower()); } } }