Configuration options that apply to the entire SDK.
コード例 #1
0
 public V4ClientSectionRoot(XElement section)
 {
     if (section != null)
     {
         S3 = AWSConfigs.GetObject <V4ClientSection>(section, "s3");
     }
 }
コード例 #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
        }
コード例 #3
0
ファイル: AWSConfigsS3.cs プロジェクト: Bectinced-aeN/vrcsdk
        static AWSConfigsS3()
        {
            //IL_002a: Unknown result type (might be due to invalid IL or missing references)
            _useSignatureVersion4 = false;
            UseSigV4SetExplicitly = false;
            string config = AWSConfigs.GetConfig("AWS.S3.UseSignatureVersion4");

            if (!string.IsNullOrEmpty(config))
            {
                UseSignatureVersion4 = bool.Parse(config);
            }
            XElement serviceSection = new RootConfig().GetServiceSection("s3");

            if (serviceSection != null)
            {
                V4ClientSectionRoot v4ClientSectionRoot = new V4ClientSectionRoot(serviceSection);
                if (v4ClientSectionRoot.S3 != null)
                {
                    V4ClientSection s = v4ClientSectionRoot.S3;
                    if (s.get_ElementInformation().get_IsPresent() && s.UseSignatureVersion4.HasValue)
                    {
                        UseSignatureVersion4 = s.UseSignatureVersion4.Value;
                    }
                }
            }
        }
コード例 #4
0
        public V4ClientSectionRoot(XElement section)
        {
            if (section == null)
                return;

            this.S3 = AWSConfigs.GetObject<V4ClientSection>(section, s3Key);
        }
コード例 #5
0
        public MobileAnalyticsConfigSectionRoot(XElement section)
        {
            if (section == null)
            {
                return;
            }

            this.MobileAnalytics = AWSConfigs.GetObject <MobileAnalyticsConfigSection>(section, mobileAnalyticsKey);
        }
コード例 #6
0
        public void Awake()
        {
            lock (_lock)
            {
                if (_instance == null)
                {
                    // singleton instance
                    _instance = this;

                    if (_mainThread == null || !_mainThread.Equals(Thread.CurrentThread))
                    {
                        _mainThread = Thread.CurrentThread;
                    }


                    // preventing the instance from getting destroyed between scenes
                    DontDestroyOnLoad(this);

                    //initialize the logger
                    TraceListener tracelistener = new UnityDebugTraceListener("UnityDebug");
                    AWSConfigs.AddTraceListener("Amazon", tracelistener);

                    // Associate the main thread dispatcher
                    _instance.gameObject.AddComponent <UnityMainThreadDispatcher>();

                    // add callback for Editor Mode change
#if UNITY_EDITOR
                    IsEditorPlaying = EditorApplication.isPlaying;
                    EditorApplication.playmodeStateChanged += this.HandleEditorPlayModeChange;
#endif
                    AmazonHookedPlatformInfo.Instance.Init();
                }
                else
                {
                    if (this != _instance)
                    {
#if UNITY_EDITOR
                        DestroyImmediate(this.gameObject);
#else
                        Destroy(this.gameObject);
#endif
                    }
                }
            }
        }
コード例 #7
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
        }
コード例 #8
0
 public void Awake()
 {
     lock (_lock)
     {
         if (_instance == null)
         {
             _instance = this;
             if (_mainThread == null || !_mainThread.Equals(Thread.CurrentThread))
             {
                 _mainThread = Thread.CurrentThread;
             }
             AmazonHookedPlatformInfo.Instance.Init();
             Object.DontDestroyOnLoad(this);
             TraceListener listener = new UnityDebugTraceListener("UnityDebug");
             AWSConfigs.AddTraceListener("Amazon", listener);
             _instance.get_gameObject().AddComponent <UnityMainThreadDispatcher>();
         }
         else if (this != _instance)
         {
             Object.DestroyObject(this);
         }
     }
 }
コード例 #9
0
        public void Awake()
        {
            lock (_lock)
            {
                if (_instance == null)
                {
                    // singleton instance
                    _instance = this;

                    if (_mainThread == null || !_mainThread.Equals(Thread.CurrentThread))
                    {
                        _mainThread = Thread.CurrentThread;
                    }

                    AmazonHookedPlatformInfo.Instance.Init();

                    // preventing the instance from getting destroyed between scenes
                    DontDestroyOnLoad(this);

                    //initialize the logger
                    TraceListener tracelistener = new UnityDebugTraceListener("UnityDebug");
                    AWSConfigs.AddTraceListener("Amazon", tracelistener);

                    // Associate the main thread dispatcher
                    _instance.gameObject.AddComponent <UnityMainThreadDispatcher>();
                }
                else
                {
                    if (this != _instance)
                    {
                        //destroy the new instance
                        DestroyObject(this);
                    }
                }
            }
        }
コード例 #10
0
ファイル: TestDriver.cs プロジェクト: aws/aws-sdk-net
        public void OnTestFinished(AWSConfigs.HttpClientOption hco, HashSet<string> failedTestCases)
        {
            bool retry = retryCount < 3 && failedTestCases.Count > 0;

            Debug.LogFormat(@"the following test cases {0} for {1} = {2}",
                retry ? "will be retried" : "failed",
                hco,
                string.Join(",", failedTestCases.ToArray<string>()));

            if (retryCount < 3 && failedTestCases.Count > 0)
            {
                retryCount++;
                EnsureBackgroundExecution(() =>
                {
                    if (hco == AWSConfigs.HttpClientOption.UnityWWW)
                    {
                        runner.HttpClient = hco;
                        runner.RunTestsWithCategory("WWW", failedTestCases);

                    }
                    else
                    {
                        runner.HttpClient = hco;
                        runner.RunTestsWithName(failedTestCases);
                    }
                });
                return;
            }

            if (hco == AWSConfigs.HttpClientOption.UnityWWW)
            {
                finalFailedWWWTests = new HashSet<string>(failedTestCases);
            }
            else if (hco == AWSConfigs.HttpClientOption.UnityWebRequest)
            {
                finalFailedUWRTests = new HashSet<string>(failedTestCases);
            }

            if (finalFailedUWRTests != null && finalFailedWWWTests != null)
            {
                mainThread.Enqueue(() =>
                {
                    Debug.Log("OnTestFinished");

                    if (finalFailedUWRTests.Count > 0 || finalFailedWWWTests.Count > 0)
                        PrintResult("SOME TESTS FAILED");
                    else
                        PrintResult("ALL TESTS PASSED");
                });
            }
        }