コード例 #1
0
ファイル: StorageAccount.cs プロジェクト: RhysC/API
        public StorageAccount(
                string serviceName,
                string description,
                string locationOrAffinityGroup,
                LocationType locationType,
                StorageAccountGeoReplication geoReplication)
            : this()
        {
            Contract.Requires(!string.IsNullOrWhiteSpace(serviceName));
            Contract.Requires(!string.IsNullOrWhiteSpace(description));
            Contract.Requires(!string.IsNullOrWhiteSpace(locationOrAffinityGroup));

            ServiceName = Label = serviceName;
            Description = description;
            if (locationType == LocationType.Region)
            {
                Location = locationOrAffinityGroup;
            }
            else
            {
                AffinityGroup = locationOrAffinityGroup;
            }
            GeoReplicationEnabled = geoReplication != StorageAccountGeoReplication.Disabled;
            SecondaryReadEnabled = geoReplication == StorageAccountGeoReplication.ReadAccessEnabled;
            ExtendedProperties = new Dictionary<string, string>();
            Endpoints = new List<Uri>();
            SecondaryEndpoints = new List<Uri>();
        }
コード例 #2
0
ファイル: StorageAccount.cs プロジェクト: Drewan/API
        public StorageAccount(
            string serviceName,
            string description,
            string locationOrAffinityGroup,
            LocationType locationType,
            StorageAccountGeoReplication geoReplication)
            : this()
        {
            Contract.Requires(!string.IsNullOrWhiteSpace(serviceName));
            Contract.Requires(!string.IsNullOrWhiteSpace(description));
            Contract.Requires(!string.IsNullOrWhiteSpace(locationOrAffinityGroup));

            ServiceName = Label = serviceName;
            Description = description;
            if (locationType == LocationType.Region)
            {
                Location = locationOrAffinityGroup;
            }
            else
            {
                AffinityGroup = locationOrAffinityGroup;
            }
            GeoReplicationEnabled = geoReplication != StorageAccountGeoReplication.Disabled;
            SecondaryReadEnabled  = geoReplication == StorageAccountGeoReplication.ReadAccessEnabled;
            ExtendedProperties    = new Dictionary <string, string>();
            Endpoints             = new List <Uri>();
            SecondaryEndpoints    = new List <Uri>();
        }