internal static void SetMetadataHeaders(IRequest request, MetadataCollection metadata) { foreach (var name in metadata.Keys) request.Headers[name] = metadata[name]; }
private Metadata ActualMetadata(MetadataCollection m, string versionId, DateTime modified, long size, string contentType, string eTag) { var metadata = new Metadata(m.Keys.ToDictionary(s => s.Replace("x-amz-meta-", string.Empty), s => m[s])); metadata.StoredContentType = contentType; metadata.StoredContentLength = size; metadata.ETag = eTag; metadata.Snapshot = versionId; metadata.StoredLastModified = modified; if (!metadata.LastModified.HasValue) { metadata.LastModified = modified; } return metadata; }