Amazon.AWSConfigs.GetConfig C# (CSharp) Метод

GetConfig() приватный статический Метод

private static GetConfig ( string name ) : string
name string
Результат string
        private static string GetConfig(string name)
        {
            NameValueCollection appConfig = ConfigurationManager.AppSettings;
            if (appConfig == null)
                return null;
            string value = appConfig[name];
            return value;
        }
    }

Usage Example

Пример #1
0
        static AWSConfigsS3()
        {
            _useSignatureVersion4 = true;
            UseSigV4SetExplicitly = false;

#if BCL
            var appSettingValue = AWSConfigs.GetConfig(S3UseSignatureVersion4Key);
            if (!string.IsNullOrEmpty(appSettingValue))
            {
                UseSignatureVersion4 = bool.Parse(appSettingValue);
            }

            var root    = new RootConfig();
            var section = root.GetServiceSection(s3Key);
            if (section == null)
            {
                return;
            }

            var rootSection = new V4ClientSectionRoot(section);
            if (rootSection.S3 != null)
            {
                var s3Section = rootSection.S3;
                if (s3Section.ElementInformation.IsPresent)
                {
                    if (s3Section.UseSignatureVersion4.HasValue)
                    {
                        UseSignatureVersion4 = s3Section.UseSignatureVersion4.Value;
                    }
                }
            }
#endif
        }
All Usage Examples Of Amazon.AWSConfigs::GetConfig
AWSConfigs