コード例 #1
0
        public _IEXResult MountGroup()
        {
            PlatformContext  gatewayContext = GetGatewayContext();
            _Platform        GW             = gatewayContext.Platform;
            List <_Platform> Clients        = GetClientsList();

            _IEXResult res = null;

            if (DebugMode)
            {
                foreach (_Platform client in Clients)
                {
                    string temp;
                    client.IEX.IR.SendIR("MENU", out temp, 10000);
                }
                return(null);
            }

            int  Retries    = 0;
            bool HasFailure = false;

            do
            {
                HasFailure = false;
                lock (GatewayLocker)
                {
                    if (!gatewayContext.isMount && GW != null)
                    {
                        res = GW.EA.MountGw(_mountFlag);
                        if (!res.CommandSucceeded)
                        {
                            GW.IEX.LogComment("Failed to Mount Gateway: " + res.FailureReason, isBold: true, size: "12", colour: "Red");
                            return(res);
                        }
                    }
                    gatewayContext.isMount = true;
                }

                try
                {
                    Parallel.ForEach(Clients, CL =>
                    {
                        res = CL.EA.MountClient(_mountFlag, 1);
                        if (!res.CommandSucceeded && HasFailure == false)
                        {
                            CL.IEX.LogComment("Failed to Mount Client: " + res.FailureReason, isBold: true, size: "12", colour: "Red");
                            HasFailure = true;
                        }
                    });
                }
                catch (Exception)
                {
                    HasFailure = true;
                }

                Retries++;
            } while (HasFailure && Retries < 3);

            return(res);
        }
コード例 #2
0
        public _IEXResult MountSingle()
        {
            PlatformContext gatewayContext = GetGatewayIsClientContext();
            _Platform       GW             = gatewayContext.Platform;
            _IEXResult      res            = null;

            if (DebugMode)
            {
                string temp;
                GW.IEX.IR.SendIR("MENU", out temp, 10000);
                return(null);
            }

            lock (GatewayLocker)
            {
                if (!gatewayContext.isMount && GW != null)
                {
                    res = GW.EA.MountGw(_mountFlag);
                    if (!res.CommandSucceeded)
                    {
                        GW.IEX.LogComment("Failed to Mount Gateway: " + res.FailureReason, isBold: true, size: "12", colour: "Red");
                        return(res);
                    }
                }
                gatewayContext.isMount = true;
            }
            return(res);
        }
コード例 #3
0
 private void TearDown(_Platform p)
 {
     try
     {
         p.EA.TearDown();
         p.IEX.Disconnect();
         platformsAlreadyTearedDown.Add(p.IEX.IEXServerNumber);
         int timeOut = 2000;
         do
         {
             Thread.Sleep(2000);
             timeOut += 2000;
         } while (timeOut < 30000 && p.IEX.IsConnected);
     }
     finally
     {
         if (p.IEX.IsConnected)
         {
             throw new Exception("Failed to Disconnect IEX Server " + p.IEX.IEXServerNumber.ToString());
         }
     }
 }
コード例 #4
0
ファイル: _Step.cs プロジェクト: rameshkooragayala/CI_Build
 public void LogCommentInfo(_Platform platform, string text)
 {
     platform.IEX.LogComment(text, isBold: false, size: "10", colour: "Blue");
     Tracer.Write(Tracer.TraceLevel.INFO, text, "TEST");
 }
コード例 #5
0
ファイル: _Step.cs プロジェクト: rameshkooragayala/CI_Build
 public void LogComment(_Platform platform, string text, bool isBold = false, string size = "", string colour = "Black")
 {
     platform.IEX.LogComment(text, isBold: isBold, size: size, colour: colour);
     Tracer.Write(Tracer.TraceLevel.INFO, text, "TEST");
 }
コード例 #6
0
ファイル: _Step.cs プロジェクト: rameshkooragayala/CI_Build
        public void FailStep(_Platform platform, IEXGateway._IEXResult res, string reason = "", bool exitTest = true)
        {
            string msg = "[" + res.FailureCode + "] " + reason + " " + res.FailureReason;

            this.FailStep(platform, msg, exitTest);
        }
コード例 #7
0
ファイル: _Step.cs プロジェクト: rameshkooragayala/CI_Build
 public void LogCommentFailure(_Platform platform, string text)
 {
     platform.IEX.LogComment(text, isBold: true, size: "10", colour: "Red");
     Tracer.Write(Tracer.TraceLevel.ERROR, text, "TEST");
 }
コード例 #8
0
ファイル: _Step.cs プロジェクト: rameshkooragayala/CI_Build
 public void LogCommentWarning(_Platform platform, string text)
 {
     platform.IEX.LogComment(text, isBold: true, size: "10", colour: "Orange");
     Tracer.Write(Tracer.TraceLevel.WARN, text, "TEST");
 }
コード例 #9
0
ファイル: _Step.cs プロジェクト: rameshkooragayala/CI_Build
 public void LogCommentImportant(_Platform platform, string text)
 {
     platform.IEX.LogComment(text, isBold: true, size: "10", colour: "Purple");
     Tracer.Write(Tracer.TraceLevel.MIL, text, "TEST");
 }