public GetStorageItemResponse CreateStorageItem(ICloudFilesRequest request)
        {
            HttpStatusCode statusCode;
            Stream responseStream;
            WebHeaderCollection headerCollection = GetHeaderCollection(request, out statusCode, out responseStream);

            var response = new GetStorageItemResponse()
            {
                Headers = headerCollection,
                Status = statusCode,
                ContentStream = responseStream
            };

            return response;
        }
Esempio n. 2
0
 private Dictionary<string, string> GetMetadata(GetStorageItemResponse getStorageItemResponse)
 {
     var metadata = new Dictionary<string, string>();
     var headers = getStorageItemResponse.Headers;
     foreach (var key in headers.AllKeys)
     {
         if (key.IndexOf(Constants.META_DATA_HEADER) > -1)
             metadata.Add(key, headers[key]);
     }
     return metadata;
 }