Пример #1
0
        protected ServiceCenterBase(ServiceCenterName name, bool isIntranet)
        {
            _name = name;

            switch (name)
            {
            case ServiceCenterName.Beijing:                     //北京服务中心
                _alias = "cn-beijing";
                _path  = isIntranet ? "beijing-internal.aliyuncs.com" : "beijing.aliyuncs.com";
                break;

            case ServiceCenterName.Qingdao:                     //青岛服务中心
                _alias = "cn-qingdao";
                _path  = isIntranet ? "qingdao-internal.aliyuncs.com" : "qingdao.aliyuncs.com";
                break;

            case ServiceCenterName.Hangzhou:                     //杭州服务中心
                _alias = "cn-hangzhou";
                _path  = isIntranet ? "hangzhou-internal.aliyuncs.com" : "hangzhou.aliyuncs.com";
                break;

            case ServiceCenterName.Shenzhen:                     //深圳服务中心
                _alias = "cn-shenzhen";
                _path  = isIntranet ? "shenzhen-internal.aliyuncs.com" : "shenzhen.aliyuncs.com";
                break;

            case ServiceCenterName.Hongkong:                     //香港服务中心
                _alias = "cn-hongkong";
                _path  = isIntranet ? "hongkong-internal.aliyuncs.com" : "hongkong.aliyuncs.com";
                break;
            }
        }
		public static MessageQueueServiceCenter GetInstance(ServiceCenterName name, bool isInternal = true)
		{
			switch(name)
			{
				case ServiceCenterName.Beijing:
					return isInternal ? Internal.Beijing : Public.Beijing;
				case ServiceCenterName.Qingdao:
					return isInternal ? Internal.Qingdao : Public.Qingdao;
				case ServiceCenterName.Hangzhou:
					return isInternal ? Internal.Hangzhou : Public.Hangzhou;
				case ServiceCenterName.Shenzhen:
					return isInternal ? Internal.Shenzhen : Public.Shenzhen;
				case ServiceCenterName.Hongkong:
					return isInternal ? Internal.Hongkong : Public.Hongkong;
			}

			throw new NotSupportedException();
		}
Пример #3
0
        public static PushingServiceCenter GetInstance(ServiceCenterName name)
        {
            switch (name)
            {
            case ServiceCenterName.Beijing:
                return(Beijing);

            case ServiceCenterName.Qingdao:
                return(Qingdao);

            case ServiceCenterName.Hangzhou:
                return(Hangzhou);

            case ServiceCenterName.Shenzhen:
                return(Shenzhen);

            case ServiceCenterName.Hongkong:
                return(Hongkong);
            }

            return(null);
        }
        public static StorageServiceCenter GetInstance(ServiceCenterName name, bool isInternal = true)
        {
            switch (name)
            {
            case ServiceCenterName.Beijing:
                return(isInternal ? Internal.Beijing : External.Beijing);

            case ServiceCenterName.Qingdao:
                return(isInternal ? Internal.Qingdao : External.Qingdao);

            case ServiceCenterName.Hangzhou:
                return(isInternal ? Internal.Hangzhou : External.Hangzhou);

            case ServiceCenterName.Shenzhen:
                return(isInternal ? Internal.Shenzhen : External.Shenzhen);

            case ServiceCenterName.Hongkong:
                return(isInternal ? Internal.Hongkong : External.Hongkong);
            }

            throw new NotSupportedException();
        }
Пример #5
0
        public static ServiceCenter GetInstance(ServiceCenterName name, bool isIntranet = false)
        {
            switch (name)
            {
            case ServiceCenterName.Beijing:
                return(isIntranet ? Intranet.Beijing : Internet.Beijing);

            case ServiceCenterName.Qingdao:
                return(isIntranet ? Intranet.Qingdao : Internet.Qingdao);

            case ServiceCenterName.Hangzhou:
                return(isIntranet ? Intranet.Hangzhou : Internet.Hangzhou);

            case ServiceCenterName.Shenzhen:
                return(isIntranet ? Intranet.Shenzhen : Internet.Shenzhen);

            case ServiceCenterName.Hongkong:
                return(isIntranet ? Intranet.Hongkong : Internet.Hongkong);
            }

            throw new NotSupportedException();
        }
		protected ServiceCenter(ServiceCenterName name, bool isInternal)
		{
			_name = name;

			switch(name)
			{
				case ServiceCenterName.Beijing: //北京服务中心
					_path = isInternal ? "beijing-internal.aliyuncs.com" : "beijing.aliyuncs.com";
					break;
				case ServiceCenterName.Qingdao: //青岛服务中心
					_path = isInternal ? "qingdao-internal.aliyuncs.com" : "qingdao.aliyuncs.com";
					break;
				case ServiceCenterName.Hangzhou: //杭州服务中心
					_path = isInternal ? "hangzhou-internal.aliyuncs.com" : "hangzhou.aliyuncs.com";
					break;
				case ServiceCenterName.Shenzhen: //深圳服务中心
					_path = isInternal ? "shenzhen-internal.aliyuncs.com" : "shenzhen.aliyuncs.com";
					break;
				case ServiceCenterName.Hongkong: //香港服务中心
					_path = isInternal ? "hongkong-internal.aliyuncs.com" : "hongkong.aliyuncs.com";
					break;
			}
		}
Пример #7
0
 private PushingServiceCenter(ServiceCenterName name) : base(name, false)
 {
     this.Path = "cloudpush.aliyuncs.com";
 }
		private StorageServiceCenter(ServiceCenterName name, bool isInternal) : base(name, isInternal)
		{
			this.Path = OSS_CN_PREFIX + base.Path;
		}
 private StorageServiceCenter(ServiceCenterName name, bool isInternal) : base(name, isInternal)
 {
     this.Path = OSS_CN_PREFIX + base.Path;
 }
Пример #10
0
 private ServiceCenter(ServiceCenterName name, bool isIntranet) : base(name, isIntranet)
 {
     this.Path = MNS_CN_PREFIX + base.Path;
 }