public S3MetadataCollectionFactory(AmazonS3DataBusOptions options)
        {
            _delimiter = options.MetadataDelimiter;

            var knownKeys = new HashSet <string> {
                MetadataKeys.ContentEncoding,
                MetadataKeys.Length,
                MetadataKeys.ReadTime,
                MetadataKeys.SaveTime
            };

            if (options.KnownMetadataKeys != null)
            {
                foreach (var key in options.KnownMetadataKeys)
                {
                    knownKeys.Add(key);
                }
            }

            _knownKeyEncoder = new KnownKeyEncoder(knownKeys);
        }
Пример #2
0
 /// <summary>
 /// Create new empty metadata manager
 /// </summary>
 /// <param name="delimiter">Delimiter used to encode and decode metadata</param>
 /// <param name="knownKeyEncoder">Key encoder used for known keys</param>
 public S3MetadataCollection(char delimiter, KnownKeyEncoder knownKeyEncoder)
 {
     _delimiter       = delimiter;
     _knownKeyEncoder = knownKeyEncoder;
 }