示例#1
0
        public static IVersionedMetadataTextStore CreateBlobStore(CloudBlobClient client, string containerName,
                                                                  string directoryName)
        {
            IConcurrentMetadataTextStore innerStore = ConcurrentTextStore.CreateBlobStore(client, containerName,
                                                                                          directoryName);
            IVersionMetadataMapper versionMapper = VersionMetadataMapper.Instance;

            return(new VersionedMetadataTextStore(innerStore, versionMapper));
        }
        public VersionedMetadataTextStore(IConcurrentMetadataTextStore innerStore, IVersionMetadataMapper versionMapper)
        {
            if (innerStore == null)
            {
                throw new ArgumentNullException("innerStore");
            }
            else if (versionMapper == null)
            {
                throw new ArgumentNullException("versionMapper");
            }

            _innerStore    = innerStore;
            _versionMapper = versionMapper;
        }
        public VersionedMetadataTextStore(IConcurrentMetadataTextStore innerStore, IVersionMetadataMapper versionMapper)
        {
            if (innerStore == null)
            {
                throw new ArgumentNullException("innerStore");
            }
            else if (versionMapper == null)
            {
                throw new ArgumentNullException("versionMapper");
            }

            _innerStore = innerStore;
            _versionMapper = versionMapper;
        }
        private FunctionIndexReader(CloudBlobDirectory functionsDirectory, CloudBlobDirectory versionDirectory,
            IVersionMetadataMapper versionMapper)
        {
            if (functionsDirectory == null)
            {
                throw new ArgumentNullException("functionsDirectory");
            }
            else if (versionDirectory == null)
            {
                throw new ArgumentNullException("versionDirectory");
            }
            else if (versionMapper == null)
            {
                throw new ArgumentNullException("versionMapper");
            }

            _functionsContainer = functionsDirectory.Container;
            _functionsPrefix = functionsDirectory.Prefix;
            _versionDirectory = versionDirectory;
            _versionMapper = versionMapper;
        }
示例#5
0
        private FunctionIndexReader(CloudBlobDirectory functionsDirectory, CloudBlobDirectory versionDirectory,
                                    IVersionMetadataMapper versionMapper)
        {
            if (functionsDirectory == null)
            {
                throw new ArgumentNullException("functionsDirectory");
            }
            else if (versionDirectory == null)
            {
                throw new ArgumentNullException("versionDirectory");
            }
            else if (versionMapper == null)
            {
                throw new ArgumentNullException("versionMapper");
            }

            _functionsContainer = functionsDirectory.Container;
            _functionsPrefix    = functionsDirectory.Prefix;
            _versionDirectory   = versionDirectory;
            _versionMapper      = versionMapper;
        }
 private static IDictionary<string, string> CreateMetadata(DateTimeOffset version, IVersionMetadataMapper mapper,
     string otherKey, string otherValue)
 {
     Dictionary<string, string> metadata = new Dictionary<string, string>();
     mapper.SetVersion(version, metadata);
     metadata.Add(otherKey, otherValue);
     return metadata;
 }
 private static IDictionary<string, string> CreateMetadata(DateTimeOffset version, IVersionMetadataMapper mapper,
     IDictionary<string, string> otherMetadata)
 {
     Dictionary<string, string> combinedMetadata = new Dictionary<string, string>(otherMetadata);
     mapper.SetVersion(version, combinedMetadata);
     return combinedMetadata;
 }
 private static IDictionary<string, string> CreateMetadata(DateTimeOffset version, IVersionMetadataMapper mapper)
 {
     Dictionary<string, string> metadata = new Dictionary<string, string>();
     mapper.SetVersion(version, metadata);
     return metadata;
 }
 private static VersionedMetadataTextStore CreateProductUnderTest(IConcurrentMetadataTextStore innerStore,
     IVersionMetadataMapper metadataMapper)
 {
     return new VersionedMetadataTextStore(innerStore, metadataMapper);
 }