private void AttemptSeparatorConnection()
        {
            try
            {
                // Initialise the Separator connection
                mySeparatorGateway.InitialiseConnection(myCultureInfo);

                mySeparator = SeparatorGateway.GetInstance().ControlApi;
                myEventSink = SeparatorGateway.GetInstance().EventsApi;

                if (myEventSink != null)
                {
                    myEventSink.ReportInstrumentInformation += new Tesla.Separator.ReportInstrumentInfoDelegate(AtReportInstrumentInformation);
                }

                // Actually connect the UI to the Separator server
                mySeparatorGateway.Connect(true);
            }


            catch (ApplicationException /*aex*/)
            {
                // Allow application exceptions to propagate upwards.  That is, if the
                // InitialiseConnection times out, we use the generated ApplicationException
                // to trigger application shutdown.
            }
            catch (Exception ex)
            {
                LogFile.LogException(System.Diagnostics.TraceLevel.Error, ex);
            }
        }
 protected AHelloWorld(IHello hello, IWorld world, ISeparator separator, IFinisher finisher)
 {
     mHello     = hello;
     mWorld     = world;
     mSeparator = separator;
     mFinisher  = finisher;
 }
Exemplo n.º 3
0
 public MKT(MKT_Config config)
 {
     this.shlpWrapper = config.Shlp;
     this.firstSeparator = config.FirstSeparator;
     secondSeparator = config.SecondSeparator;
     this.generator = config.Generator;
     this.iterations = 3;
     this.bounds = GlobalSettings.GetBounds();
     this.lambda = config.Lambda;
     this.N = config.N;
     this.n = config.n;
     this.fn = GlobalSettings.Fn;
 }
Exemplo n.º 4
0
        private int GetSeparatorInteger(ISeparator<MKT_Point> separator)
        {
            if (separator is BestSeparator<MKT_Point>)
            {
                return (int)SeparatorType.Best;
            }

            if (separator is Roulette<MKT_Point>)
            {
                return (int)SeparatorType.Roulette;
            }

            if (separator is Tournament<MKT_Point>)
            {
                return (int)SeparatorType.Tournament;
            }

            if (separator is Rang<MKT_Point>)
            {
                return (int)SeparatorType.Rang;
            }

            throw new ArgumentOutOfRangeException();
        }
Exemplo n.º 5
0
 public EnglishHelloWorld(IHello hello, IWorld world, ISeparator separator, IFinisher finisher)
     : base(hello, world, separator, finisher)
 {
 }
Exemplo n.º 6
0
 public FizzBuzzFlow(IFizzBuzzCalculator fizzBuzzCalculator, ISeparator iSeparator)
 {
     this.fizzBuzzCalculator = fizzBuzzCalculator;
     this.iSeparator         = iSeparator;
 }