/// <summary>
 /// Initializes a new instance of the <see cref="Mt4AccountAllOf" /> class.
 /// </summary>
 /// <param name="reality">reality.</param>
 /// <param name="login">Corseponding Account.</param>
 /// <param name="currency">currency.</param>
 /// <param name="leverage">Leverage multiplier.</param>
 public Mt4AccountAllOf(Reality reality = default(Reality), int login = default(int), string currency = default(string), int leverage = default(int))
 {
     this.Reality  = reality;
     this.Login    = login;
     this.Currency = currency;
     this.Leverage = leverage;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="InlineObject3" /> class.
        /// </summary>
        /// <param name="login">Corseponding Account (required).</param>
        /// <param name="reality">reality (required).</param>
        /// <param name="timeFrom">Milliseconds since unix epoch (required).</param>
        /// <param name="timeTo">timeTo (required).</param>
        public InlineObject3(int login = default(int), Reality reality = default(Reality), decimal timeFrom = default(decimal), decimal timeTo = default(decimal))
        {
            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for InlineObject3 and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Reality = reality;
            // to ensure "timeFrom" is required (not null)
            if (timeFrom == null)
            {
                throw new InvalidDataException("timeFrom is a required property for InlineObject3 and cannot be null");
            }
            else
            {
                this.TimeFrom = timeFrom;
            }

            // to ensure "timeTo" is required (not null)
            if (timeTo == null)
            {
                throw new InvalidDataException("timeTo is a required property for InlineObject3 and cannot be null");
            }
            else
            {
                this.TimeTo = timeTo;
            }
        }
예제 #3
0
        public Spectre(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.spectre_spectral_dagger, x => this.dagger = new NukeAbility(x) },
                { AbilityId.spectre_reality, x => this.reality = new Reality(x) },
                { AbilityId.spectre_haunt, x => this.haunt = new Haunt(x) },
                { (AbilityId)7851, x => this.shadowStep = new TargetableAbility(x) },

                { AbilityId.item_phase_boots, x => this.phase = new SpeedBuffAbility(x) },
                { AbilityId.item_diffusal_blade, x => this.diffusal = new DebuffAbility(x) },
                { AbilityId.item_abyssal_blade, x => this.abyssal = new DisableAbility(x) },
                { AbilityId.item_manta, x => this.manta = new BuffAbility(x) },
                { AbilityId.item_spirit_vessel, x => this.vessel = new DebuffAbility(x) },
                { AbilityId.item_urn_of_shadows, x => this.urn = new DebuffAbility(x) },
                { AbilityId.item_black_king_bar, x => this.bkb = new ShieldAbility(x) },
                { AbilityId.item_sheepstick, x => this.hex = new DisableAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_nullifier, x => this.nullifier = new Nullifier(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.spectre_spectral_dagger, x => this.daggerMove = new DaggerMove(x));
        }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InlineObject1" /> class.
 /// </summary>
 /// <param name="login">Corseponding Account.</param>
 /// <param name="reality">reality.</param>
 /// <param name="id">Position id..</param>
 /// <param name="takeProfit">takeProfit.</param>
 /// <param name="stopLoss">stopLoss.</param>
 public InlineObject1(int login = default(int), Reality reality = default(Reality), decimal id = default(decimal), decimal takeProfit = default(decimal), decimal stopLoss = default(decimal))
 {
     this.Login      = login;
     this.Reality    = reality;
     this.Id         = id;
     this.TakeProfit = takeProfit;
     this.StopLoss   = stopLoss;
 }
예제 #5
0
 public ActionResult Post([FromBody] Reality reality)
 {
     if (ModelState.IsValid)
     {
         this._context.Reality.Add(reality);
         this._context.SaveChanges();
         return(Created($"api/peliculas/{reality.Reality_Id}", reality));
     }
     // System.Console.WriteLine("11");
     return(BadRequest());
 }
예제 #6
0
        public GameState(GameMode mode)
        {
            reality = new Reality();

            if (mode == GameMode.New)
            {
                reality.Day    = 1;
                reality.Season = Season.spring;
                reality.Hour   = 7;
                reality.Minute = 0;
            }
        }
예제 #7
0
        protected override async Task KillStealAsync(CancellationToken token)
        {
            if (Game.IsPaused || !this.Owner.IsAlive || !AbilityExtensions.CanBeCasted(this.SpectralDagger))
            {
                await Task.Delay(125, token);

                return;
            }

            var killstealTarget = EntityManager <Hero> .Entities.FirstOrDefault(
                x => x.IsAlive && x.Team != this.Owner.Team && AbilityExtensions.CanBeCasted(this.SpectralDagger) &&
                AbilityExtensions.CanHit(this.SpectralDagger, x) &&
                !x.IsIllusion &&
                x.Health < SpectralDaggerDamage(this.SpectralDagger.Level - 1, x));

            var hauntIllusions = EntityManager <Unit> .Entities.Where(x => x.Name == this.Owner.Name && x.IsAlive && x.IsIllusion && !x.IsInvulnerable() &&
                                                                      x.IsAlly(this.Owner) && x.HasModifier("modifier_spectre_haunt")).ToList();

            if (killstealTarget != null)
            {
                if (hauntIllusions.Count != 0)
                {
                    if (Reality.UseAbility(killstealTarget.NetworkPosition))
                    {
                        var castDelay = AbilityExtensions.GetCastDelay(this.Reality, this.Owner, killstealTarget);
                        await this.AwaitKillstealDelay((int)castDelay + 20, token);
                    }
                }
                else if (AbilityExtensions.CanBeCasted(this.Haunt) && KillstealWithUlti && this.Owner.Distance2D(killstealTarget) > this.SpectralDagger.CastRange)
                {
                    if (this.Haunt.UseAbility())
                    {
                        var castDelay = AbilityExtensions.GetCastDelay(this.Haunt, this.Owner, killstealTarget);
                        await this.AwaitKillstealDelay((int)castDelay + 20, token);

                        this.Reality.UseAbility(killstealTarget.NetworkPosition);
                    }
                }

                if (killstealTarget.Distance2D(this.Owner) <= this.SpectralDagger.CastRange)
                {
                    if (this.SpectralDagger.UseAbility(killstealTarget))
                    {
                        var castDelay = AbilityExtensions.GetCastDelay(this.SpectralDagger, this.Owner, killstealTarget);
                        await this.AwaitKillstealDelay((int)castDelay, token);
                    }
                }
            }

            await Task.Delay(125, token);
        }
 void OnTriggerStay2D(Collider2D obj)
 {
     switch (obj.tag) {
     case "RED_X":
         reality = Reality.RED_X;
         break;
     case "YELLOW_Y":
         reality = Reality.YELLOW_Y;
         break;
     case "BLUE_Z":
         reality = Reality.BLUE_Z;
         break;
     }
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="InlineObject2" /> class.
        /// </summary>
        /// <param name="login">Corseponding Account (required).</param>
        /// <param name="reality">reality (required).</param>
        public InlineObject2(int login = default(int), Reality reality = default(Reality))
        {
            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for InlineObject2 and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Reality = reality;
        }
예제 #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenMarketOrderModel" /> class.
        /// </summary>
        /// <param name="reality">reality (required).</param>
        /// <param name="login">Corseponding Account (required).</param>
        /// <param name="symbol">symbol (required).</param>
        /// <param name="side">side (required).</param>
        /// <param name="volume">volume (required).</param>
        /// <param name="isFIFO">FIFO requests closes opposite positions before opening new one. NonFIFO order will open new position regardles if client owns opposite position. (required).</param>
        /// <param name="takeProfit">takeProfit.</param>
        /// <param name="stopLoss">stopLoss.</param>
        /// <param name="requestId">Client defined requestId. Server wiil populate this id in response and trade events..</param>
        public OpenMarketOrderModel(Reality reality = default(Reality), int login = default(int), string symbol = default(string), Side side = default(Side), double volume = default(double), bool isFIFO = default(bool), double takeProfit = default(double), double stopLoss = default(double), string requestId = default(string))
        {
            this.Reality = reality;
            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for OpenMarketOrderModel and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            // to ensure "symbol" is required (not null)
            if (symbol == null)
            {
                throw new InvalidDataException("symbol is a required property for OpenMarketOrderModel and cannot be null");
            }
            else
            {
                this.Symbol = symbol;
            }

            this.Side = side;
            // to ensure "volume" is required (not null)
            if (volume == null)
            {
                throw new InvalidDataException("volume is a required property for OpenMarketOrderModel and cannot be null");
            }
            else
            {
                this.Volume = volume;
            }

            // to ensure "isFIFO" is required (not null)
            if (isFIFO == null)
            {
                throw new InvalidDataException("isFIFO is a required property for OpenMarketOrderModel and cannot be null");
            }
            else
            {
                this.IsFIFO = isFIFO;
            }

            this.TakeProfit = takeProfit;
            this.StopLoss   = stopLoss;
            this.RequestId  = requestId;
        }
예제 #11
0
        public ActionResult Put(int id, [FromBody] Reality reality)
        {
            var target = this._context.Reality.FirstOrDefault(p => p.Reality_Id == id);

            if (target == null)
            {
                return(NotFound());
            }
            else if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            else
            {
                this._context.Entry(target).CurrentValues.SetValues(reality);
                this._context.SaveChanges();
                return(Ok());
            }
        }
예제 #12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PendingOrder" /> class.
        /// </summary>
        /// <param name="id">Id of this position. (required).</param>
        /// <param name="symbol">Instrument symbol (ticker) (required).</param>
        /// <param name="reality">reality (required).</param>
        /// <param name="login">Corseponding Account (required).</param>
        /// <param name="side">side (required).</param>
        /// <param name="volume">volume (required).</param>
        /// <param name="takeProfit">takeProfit.</param>
        /// <param name="stopLoss">stopLoss.</param>
        /// <param name="comment">comment.</param>
        /// <param name="closeTime">Epoch milisesonds. This field indicates that position is already closed..</param>
        /// <param name="activationPrice">price at which this order executes at market (required).</param>
        /// <param name="direction">direction (required).</param>
        /// <param name="createTime">Unix time in miliseconds. (required).</param>
        /// <param name="expiryTime">Miliseconds since eopch, when this order ewill be automaticly removed..</param>
        public PendingOrder(decimal id = default(decimal), string symbol = default(string), Reality reality = default(Reality), int login = default(int), Side side = default(Side), double volume = default(double), double takeProfit = default(double), double stopLoss = default(double), string comment = default(string), decimal closeTime = default(decimal), decimal activationPrice = default(decimal), Direction direction = default(Direction), decimal createTime = default(decimal), decimal expiryTime = default(decimal))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for PendingOrder and cannot be null");
            }
            else
            {
                this.Id = id;
            }

            // to ensure "symbol" is required (not null)
            if (symbol == null)
            {
                throw new InvalidDataException("symbol is a required property for PendingOrder and cannot be null");
            }
            else
            {
                this.Symbol = symbol;
            }

            this.Reality = reality;
            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for PendingOrder and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Side = side;
            // to ensure "volume" is required (not null)
            if (volume == null)
            {
                throw new InvalidDataException("volume is a required property for PendingOrder and cannot be null");
            }
            else
            {
                this.Volume = volume;
            }

            // to ensure "activationPrice" is required (not null)
            if (activationPrice == null)
            {
                throw new InvalidDataException("activationPrice is a required property for PendingOrder and cannot be null");
            }
            else
            {
                this.ActivationPrice = activationPrice;
            }

            this.Direction = direction;
            // to ensure "createTime" is required (not null)
            if (createTime == null)
            {
                throw new InvalidDataException("createTime is a required property for PendingOrder and cannot be null");
            }
            else
            {
                this.CreateTime = createTime;
            }

            this.TakeProfit = takeProfit;
            this.StopLoss   = stopLoss;
            this.Comment    = comment;
            this.CloseTime  = closeTime;
            this.ExpiryTime = expiryTime;
        }
예제 #13
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MarketOrder" /> class.
        /// </summary>
        /// <param name="id">Id of this position. (required).</param>
        /// <param name="symbol">Instrument symbol (ticker) (required).</param>
        /// <param name="reality">reality (required).</param>
        /// <param name="login">Corseponding Account (required).</param>
        /// <param name="side">side (required).</param>
        /// <param name="volume">volume (required).</param>
        /// <param name="takeProfit">takeProfit.</param>
        /// <param name="stopLoss">stopLoss.</param>
        /// <param name="comment">comment.</param>
        /// <param name="closeTime">Epoch milisesonds. This field indicates that position is already closed..</param>
        /// <param name="openTime">unixtimestamp in miliseconds (required).</param>
        /// <param name="openPrice">openPrice (required).</param>
        /// <param name="margin">Balance blocked for this position. (required).</param>
        /// <param name="profit">current profit/loss from this position. (required).</param>
        /// <param name="swaps">Overnight maintence of this position. (required).</param>
        /// <param name="openConversionRate">Convertion rate from position currency to account currency (required).</param>
        /// <param name="closeConversionRate">closeConversionRate.</param>
        public MarketOrder(decimal id = default(decimal), string symbol = default(string), Reality reality = default(Reality), int login = default(int), Side side = default(Side), double volume = default(double), double takeProfit = default(double), double stopLoss = default(double), string comment = default(string), decimal closeTime = default(decimal), decimal openTime = default(decimal), decimal openPrice = default(decimal), double margin = default(double), double profit = default(double), double swaps = default(double), double openConversionRate = default(double), double closeConversionRate = default(double))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for MarketOrder and cannot be null");
            }
            else
            {
                this.Id = id;
            }

            // to ensure "symbol" is required (not null)
            if (symbol == null)
            {
                throw new InvalidDataException("symbol is a required property for MarketOrder and cannot be null");
            }
            else
            {
                this.Symbol = symbol;
            }

            this.Reality = reality;
            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for MarketOrder and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Side = side;
            // to ensure "volume" is required (not null)
            if (volume == null)
            {
                throw new InvalidDataException("volume is a required property for MarketOrder and cannot be null");
            }
            else
            {
                this.Volume = volume;
            }

            // to ensure "openTime" is required (not null)
            if (openTime == null)
            {
                throw new InvalidDataException("openTime is a required property for MarketOrder and cannot be null");
            }
            else
            {
                this.OpenTime = openTime;
            }

            // to ensure "openPrice" is required (not null)
            if (openPrice == null)
            {
                throw new InvalidDataException("openPrice is a required property for MarketOrder and cannot be null");
            }
            else
            {
                this.OpenPrice = openPrice;
            }

            // to ensure "margin" is required (not null)
            if (margin == null)
            {
                throw new InvalidDataException("margin is a required property for MarketOrder and cannot be null");
            }
            else
            {
                this.Margin = margin;
            }

            // to ensure "profit" is required (not null)
            if (profit == null)
            {
                throw new InvalidDataException("profit is a required property for MarketOrder and cannot be null");
            }
            else
            {
                this.Profit = profit;
            }

            // to ensure "swaps" is required (not null)
            if (swaps == null)
            {
                throw new InvalidDataException("swaps is a required property for MarketOrder and cannot be null");
            }
            else
            {
                this.Swaps = swaps;
            }

            // to ensure "openConversionRate" is required (not null)
            if (openConversionRate == null)
            {
                throw new InvalidDataException("openConversionRate is a required property for MarketOrder and cannot be null");
            }
            else
            {
                this.OpenConversionRate = openConversionRate;
            }

            this.TakeProfit          = takeProfit;
            this.StopLoss            = stopLoss;
            this.Comment             = comment;
            this.CloseTime           = closeTime;
            this.CloseConversionRate = closeConversionRate;
        }
예제 #14
0
        /// <summary>
        /// Get status of an account This Request is limmited.  It can not be called more than once per 5 minutes.  Client shall store and track account status returned with trade execution report.
        /// </summary>
        /// <exception cref="SimpleFx.Client.Generated.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="reality"></param>
        /// <param name="account"></param>
        /// <returns>Task of ApiResponse (InlineResponse2003)</returns>
        public async System.Threading.Tasks.Task <SimpleFx.Client.Generated.Client.ApiResponse <InlineResponse2003> > V3AccountsGetAccountAsyncWithHttpInfo(Reality reality, int account)
        {
            // verify the required parameter 'reality' is set
            if (reality == null)
            {
                throw new SimpleFx.Client.Generated.Client.ApiException(400, "Missing required parameter 'reality' when calling AccountsApi->V3AccountsGetAccount");
            }

            // verify the required parameter 'account' is set
            if (account == null)
            {
                throw new SimpleFx.Client.Generated.Client.ApiException(400, "Missing required parameter 'account' when calling AccountsApi->V3AccountsGetAccount");
            }


            SimpleFx.Client.Generated.Client.RequestOptions localVarRequestOptions = new SimpleFx.Client.Generated.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            if (reality != null)
            {
                localVarRequestOptions.PathParameters.Add("reality", SimpleFx.Client.Generated.Client.ClientUtils.ParameterToString(reality)); // path parameter
            }
            if (account != null)
            {
                localVarRequestOptions.PathParameters.Add("account", SimpleFx.Client.Generated.Client.ClientUtils.ParameterToString(account)); // path parameter
            }
            // authentication (bearerAuth) required
            // http basic authentication required
            if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + SimpleFx.Client.Generated.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <InlineResponse2003>("/api/v3/accounts/{reality}/{account}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("V3AccountsGetAccount", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
예제 #15
0
        /// <summary>
        /// Get status of an account This Request is limmited.  It can not be called more than once per 5 minutes.  Client shall store and track account status returned with trade execution report.
        /// </summary>
        /// <exception cref="SimpleFx.Client.Generated.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="reality"></param>
        /// <param name="account"></param>
        /// <returns>Task of InlineResponse2003</returns>
        public async System.Threading.Tasks.Task <InlineResponse2003> V3AccountsGetAccountAsync(Reality reality, int account)
        {
            SimpleFx.Client.Generated.Client.ApiResponse <InlineResponse2003> localVarResponse = await V3AccountsGetAccountAsyncWithHttpInfo(reality, account);

            return(localVarResponse.Data);
        }
예제 #16
0
 /// <summary>
 /// Get status of an account This Request is limmited.  It can not be called more than once per 5 minutes.  Client shall store and track account status returned with trade execution report.
 /// </summary>
 /// <exception cref="SimpleFx.Client.Generated.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="reality"></param>
 /// <param name="account"></param>
 /// <returns>InlineResponse2003</returns>
 public InlineResponse2003 V3AccountsGetAccount(Reality reality, int account)
 {
     SimpleFx.Client.Generated.Client.ApiResponse <InlineResponse2003> localVarResponse = V3AccountsGetAccountWithHttpInfo(reality, account);
     return(localVarResponse.Data);
 }
예제 #17
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OrderBase" /> class.
        /// </summary>
        /// <param name="id">Id of this position. (required).</param>
        /// <param name="symbol">Instrument symbol (ticker) (required).</param>
        /// <param name="reality">reality (required).</param>
        /// <param name="login">Corseponding Account (required).</param>
        /// <param name="side">side (required).</param>
        /// <param name="volume">volume (required).</param>
        /// <param name="takeProfit">takeProfit.</param>
        /// <param name="stopLoss">stopLoss.</param>
        /// <param name="comment">comment.</param>
        /// <param name="closeTime">Epoch milisesonds. This field indicates that position is already closed..</param>
        public OrderBase(decimal id = default(decimal), string symbol = default(string), Reality reality = default(Reality), int login = default(int), Side side = default(Side), double volume = default(double), double takeProfit = default(double), double stopLoss = default(double), string comment = default(string), decimal closeTime = default(decimal))
        {
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for OrderBase and cannot be null");
            }
            else
            {
                this.Id = id;
            }

            // to ensure "symbol" is required (not null)
            if (symbol == null)
            {
                throw new InvalidDataException("symbol is a required property for OrderBase and cannot be null");
            }
            else
            {
                this.Symbol = symbol;
            }

            this.Reality = reality;
            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for OrderBase and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            this.Side = side;
            // to ensure "volume" is required (not null)
            if (volume == null)
            {
                throw new InvalidDataException("volume is a required property for OrderBase and cannot be null");
            }
            else
            {
                this.Volume = volume;
            }

            this.TakeProfit = takeProfit;
            this.StopLoss   = stopLoss;
            this.Comment    = comment;
            this.CloseTime  = closeTime;
        }
예제 #18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Mt4Account" /> class.
        /// </summary>
        /// <param name="balance">Current account balance. (required).</param>
        /// <param name="equity">Balance + profit of opened positions. Depends on current market price. (required).</param>
        /// <param name="margin">Amount blocked for opened positions. (required).</param>
        /// <param name="freeMargin">Equity - margin, amount free for opening new positions. (required).</param>
        /// <param name="marginLevel">Margin level in percentage. Margin level of 100 mean all positions are covered, but there is no free margin for new positions. (required).</param>
        /// <param name="reality">reality (required).</param>
        /// <param name="login">Corseponding Account (required).</param>
        /// <param name="currency">currency.</param>
        /// <param name="leverage">Leverage multiplier (required).</param>
        public Mt4Account(decimal balance = default(decimal), decimal equity = default(decimal), decimal margin = default(decimal), decimal freeMargin = default(decimal), double marginLevel = default(double), Reality reality = default(Reality), int login = default(int), string currency = default(string), int leverage = default(int))
        {
            // to ensure "balance" is required (not null)
            if (balance == null)
            {
                throw new InvalidDataException("balance is a required property for Mt4Account and cannot be null");
            }
            else
            {
                this.Balance = balance;
            }

            // to ensure "equity" is required (not null)
            if (equity == null)
            {
                throw new InvalidDataException("equity is a required property for Mt4Account and cannot be null");
            }
            else
            {
                this.Equity = equity;
            }

            // to ensure "margin" is required (not null)
            if (margin == null)
            {
                throw new InvalidDataException("margin is a required property for Mt4Account and cannot be null");
            }
            else
            {
                this.Margin = margin;
            }

            // to ensure "freeMargin" is required (not null)
            if (freeMargin == null)
            {
                throw new InvalidDataException("freeMargin is a required property for Mt4Account and cannot be null");
            }
            else
            {
                this.FreeMargin = freeMargin;
            }

            // to ensure "marginLevel" is required (not null)
            if (marginLevel == null)
            {
                throw new InvalidDataException("marginLevel is a required property for Mt4Account and cannot be null");
            }
            else
            {
                this.MarginLevel = marginLevel;
            }

            this.Reality = reality;
            // to ensure "login" is required (not null)
            if (login == null)
            {
                throw new InvalidDataException("login is a required property for Mt4Account and cannot be null");
            }
            else
            {
                this.Login = login;
            }

            // to ensure "leverage" is required (not null)
            if (leverage == null)
            {
                throw new InvalidDataException("leverage is a required property for Mt4Account and cannot be null");
            }
            else
            {
                this.Leverage = leverage;
            }

            this.Currency = currency;
        }
예제 #19
0
 internal static void BroadcastMessage(Reality.Communication.ServerMessage serverMessage, bool p)
 {
     throw new NotImplementedException();
 }