Root AWS config
예제 #1
0
        static AWSConfigsS3()
        {
#if BCL || CORECLR
            _useSignatureVersion4 = true;
#else
            _useSignatureVersion4 = false;
#endif
            UseSigV4SetExplicitly = false;

#if BCL || UNITY

            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

        }