static AWSConfigsDynamoDB()
        {
            try
            {
#if BCL || AWSSDK_UNITY
                var root    = new RootConfig();
                var section = root.GetServiceSection(dynamoDBKey);
                if (section == null)
                {
                    return;
                }

                var rootSection = new DynamoDBSectionRoot(section);
                if (rootSection.DynamoDB != null)
                {
                    AWSConfigsDynamoDB.Configure(rootSection.DynamoDB);
                }
#endif
            }
            finally
            {
                // If no configuration exist at least
                // configure the context config to the default.
                if (Context == null)
                {
                    Context          = new DynamoDBContextConfig();
                    ConversionSchema = ConversionSchema.V1;;
                }
            }
        }
Exemple #2
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
        }
Exemple #3
0
        static AWSConfigsMobileAnalytics()
        {
#if BCL || AWSSDK_UNITY
            var root    = new RootConfig();
            var section = root.GetServiceSection(mobileAnalyticsKey);
            if (section == null)
            {
                return;
            }

            var rootSection = new MobileAnalyticsConfigSectionRoot(section);
            if (rootSection.MobileAnalytics != null)
            {
                AWSConfigsMobileAnalytics.Configure(rootSection.MobileAnalytics);
            }
#endif
        }
        static AWSConfigsDynamoDB()
        {
            Context          = new DynamoDBContextConfig();
            ConversionSchema = ConversionSchema.V1;

#if BCL || AWSSDK_UNITY
            var root    = new RootConfig();
            var section = root.GetServiceSection(dynamoDBKey);
            if (section == null)
            {
                return;
            }

            var rootSection = new DynamoDBSectionRoot(section);
            if (rootSection.DynamoDB != null)
            {
                AWSConfigsDynamoDB.Configure(rootSection.DynamoDB);
            }
#endif
        }
Exemple #5
0
        static AWSConfigsS3()
        {
#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)
            {
                AWSConfigsS3.Configure(rootSection.S3);
            }
#endif
        }