/// <summary> /// Initializes a new instance of the <see cref="TransactionConfigurationMovementDataRequest" /> class. /// </summary> /// <param name="movementTypes">The Movement Types (required).</param> /// <param name="side">The Movement Side (required).</param> /// <param name="direction">The Movement direction (required).</param> /// <param name="properties">properties.</param> /// <param name="mappings">mappings.</param> public TransactionConfigurationMovementDataRequest(MovementTypesEnum movementTypes = default(MovementTypesEnum), SideEnum side = default(SideEnum), int?direction = default(int?), Dictionary <string, PerpetualProperty> properties = default(Dictionary <string, PerpetualProperty>), List <TransactionPropertyMappingRequest> mappings = default(List <TransactionPropertyMappingRequest>)) { // to ensure "movementTypes" is required (not null) if (movementTypes == null) { throw new InvalidDataException("movementTypes is a required property for TransactionConfigurationMovementDataRequest and cannot be null"); } else { this.MovementTypes = movementTypes; } // to ensure "side" is required (not null) if (side == null) { throw new InvalidDataException("side is a required property for TransactionConfigurationMovementDataRequest and cannot be null"); } else { this.Side = side; } // to ensure "direction" is required (not null) if (direction == null) { throw new InvalidDataException("direction is a required property for TransactionConfigurationMovementDataRequest and cannot be null"); } else { this.Direction = direction; } this.Properties = properties; this.Mappings = mappings; }
/// <summary> /// Initializes a new instance of the <see cref="Order" /> class. /// </summary> /// <param name="userId">userId.</param> /// <param name="symbol">symbol.</param> /// <param name="quantity">quantity (required).</param> /// <param name="price">price (required).</param> /// <param name="side">side (required).</param> public Order(string userId = default(string), string symbol = default(string), int?quantity = default(int?), double?price = default(double?), SideEnum side = default(SideEnum)) { // to ensure "quantity" is required (not null) if (quantity == null) { throw new InvalidDataException("quantity is a required property for Order and cannot be null"); } else { this.Quantity = quantity; } // to ensure "price" is required (not null) if (price == null) { throw new InvalidDataException("price is a required property for Order and cannot be null"); } else { this.Price = price; } // to ensure "side" is required (not null) if (side == null) { throw new InvalidDataException("side is a required property for Order and cannot be null"); } else { this.Side = side; } this.UserId = userId; this.Symbol = symbol; }
/// <summary> /// Initializes a new instance of the <see cref="RegisterDto" /> class. /// </summary> /// <param name="login">login (required).</param> /// <param name="password">password (required).</param> /// <param name="side">side (required).</param> public RegisterDto(string login = default(string), string password = default(string), SideEnum side = default(SideEnum)) { // to ensure "login" is required (not null) if (login == null) { throw new InvalidDataException("login is a required property for RegisterDto and cannot be null"); } else { this.Login = login; } // to ensure "password" is required (not null) if (password == null) { throw new InvalidDataException("password is a required property for RegisterDto and cannot be null"); } else { this.Password = password; } // to ensure "side" is required (not null) if (side == null) { throw new InvalidDataException("side is a required property for RegisterDto and cannot be null"); } else { this.Side = side; } }
public void SetupUnit(string name, SideEnum side, Vector3Int position, Loadout loadout) { MyLoadout = loadout; MaxHP = MyLoadout.MaxHP; MaxMovement = MyLoadout.BaseMovement; HP = MaxHP; CurrentMovement = MaxMovement; Name = name; this.transform.position = position; sr.sprite = MyLoadout.Image; Side = side; switch (side) { case SideEnum.Player: baseColor = Color.white; break; case SideEnum.BadGuy: sr.color = Color.red; baseColor = Color.red; break; case SideEnum.Hireling: sr.color = Color.green; baseColor = Color.green; break; default: break; } DisableUI(); }
public async Task GetAttackMediumHostageStrat([Remainder] string text = null) { sideEnum = SideEnum.ATTACK; difficultyEnum = DifficultyEnum.MEDIUM; gameModeEnum = GameModeEnum.HOSTAGE; await GetStrat(text); }
public async Task GetDefendMediumBombStrat([Remainder] string text = null) { sideEnum = SideEnum.ATTACK; difficultyEnum = DifficultyEnum.MEDIUM; gameModeEnum = GameModeEnum.BOMB; await GetStrat(text); }
public Corne(SideEnum side) { switch (side) { case SideEnum.Top: corners.AddLast(Corner.TR); corners.AddLast(Corner.TL); break; case SideEnum.Right: corners.AddLast(Corner.TR); corners.AddLast(Corner.BR); break; case SideEnum.Bottom: corners.AddLast(Corner.BR); corners.AddLast(Corner.BL); break; case SideEnum.Left: corners.AddLast(Corner.BL); corners.AddLast(Corner.TL); break; } }
public static bool InsertData(string symbol, SideEnum side, PriceComparisonEnum evaluator, RatePriceOrFeeEnum ratePriceFee, DateTime expiration, bool usePercentMoney, double bidStrike, double midStrike, double highStrike, string account, double limit, ListenerTypeEnum listenerType, string jobId, string comments) { try { var collection = _db.GetCollection <ProjectMaster>("ProjectMaster"); ProjectMaster t = new ProjectMaster() { Symbol = symbol, Side = Enum.GetName(typeof(SideEnum), side), Evaluator = Enum.GetName(typeof(PriceComparisonEnum), evaluator), RatePriceFee = Enum.GetName(typeof(RatePriceOrFeeEnum), ratePriceFee), Expiration = expiration, UsePercentMoney = usePercentMoney, BidStrike = bidStrike, MidStrike = midStrike, HighStrike = highStrike, Account = account, Limit = limit, ListenerType = Enum.GetName(typeof(ListenerTypeEnum), listenerType), JobId = jobId, Comments = comments, }; collection.InsertOne(t); return(true); } catch (Exception) { return(false); } }
public async Task GetDefendHardSecureAreaStrat([Remainder] string text = null) { sideEnum = SideEnum.ATTACK; difficultyEnum = DifficultyEnum.HARD; gameModeEnum = GameModeEnum.SECURE; await GetStrat(text); }
public GameObject GetAdjacentSideObject(GameObject gameObject, SideEnum side) { BoardFieldScript script = gameObject.GetComponent <BoardFieldScript>(); Vector2 pos = script.GetLocalPos(); return(GetAdjacentObject(pos, side)); }
public static IEnumerable GetRespectiveCorners(SideEnum side) { LinkedList <Corner> corners = new LinkedList <Corner>(); switch (side) { case SideEnum.Top: corners.AddLast(Corner.TR); corners.AddLast(Corner.TL); break; case SideEnum.Right: corners.AddLast(Corner.TR); corners.AddLast(Corner.BR); break; case SideEnum.Bottom: corners.AddLast(Corner.BR); corners.AddLast(Corner.BL); break; case SideEnum.Left: corners.AddLast(Corner.BL); corners.AddLast(Corner.TL); break; default: break; } return(corners); }
public Data(string id, SideEnum side, string value, IHashStrategy hashStrategy) { this.Id = id; this.Side = side; this.Text = value; this._hash = hashStrategy.GetHashAsync(value).Result; }
/// <summary> /// Initializes a new instance of <see cref="PayLoadCreatedEvent"/> with id, correlationid, content and side /// </summary> /// <param name="id"></param> /// <param name="correlationId"></param> /// <param name="content"></param> /// <param name="side"></param> public PayLoadCreatedEvent(Guid id, string correlationId, byte[] content, SideEnum side) { EntityId = id; CorrelationId = correlationId; Content = content; Side = side; }
public async Task GetDefendHardHostageStrat([Remainder] string text = null) { sideEnum = SideEnum.ATTACK; difficultyEnum = DifficultyEnum.HARD; gameModeEnum = GameModeEnum.HOSTAGE; await GetStrat(text); }
/// <summary> /// Получаем сторону, в которую пойдет направление стрелочки. Вверх и низ инвертируем, так как у нас координата по Y перевернута. /// </summary> /// <param name="degreesIn"></param> /// <returns></returns> private SideEnum GetSideByDegrees(float degreesIn) { float degrees = degreesIn > 0 ? degreesIn : 360.0f + degreesIn; SideEnum en = SideEnum.Top; if (degrees >= 45.0f && degrees < 135.0f) { //Снизу en = SideEnum.Bottom; } else if (degrees >= 135.0f && degrees < 225.0f) { //Слева en = SideEnum.Left; } else if (degrees >= 225.0f && degrees < 315.0f) { //Вверх en = SideEnum.Top; } else if (degrees >= 315.0f && degrees <= 360.0f || degrees >= 0 && degrees < 45.0f) { //Справа en = SideEnum.Right; } return(en); }
/// <summary> /// Create an edge ngram token filter. /// </summary> /// <param name="name">Sets the name for the token filter.</param> public EdgeNGramTokenFilter(string name) : base(name, TokenFilterTypeEnum.EdgeNGram) { _MinimumSize = _MINIMUM_SIZE_DEFAULT; _MaximumSize = _MAXIMUM_SIZE_DEFAULT; Side = _SIDE_DEFAULT; }
public async Task GetAttackMediumSecureAreaStrat([Remainder] string text = null) { sideEnum = SideEnum.ATTACK; difficultyEnum = DifficultyEnum.MEDIUM; gameModeEnum = GameModeEnum.SECURE; await GetStrat(text); }
public async Task GetAttackHardBombStrat([Remainder] string text = null) { sideEnum = SideEnum.ATTACK; difficultyEnum = DifficultyEnum.HARD; gameModeEnum = GameModeEnum.BOMB; await GetStrat(text); }
/// <summary> /// Initializes a new instance of the <see cref="RecentTrade" /> class. /// </summary> /// <param name="contractId">This ID uniquely identifies the contract (required).</param> /// <param name="marketId">This ID uniquely identifies the market (required).</param> /// <param name="price"> This price is in percentage basis points.<br> Example: 5000 = 50% <br> To convert it to decimal odds, just divide 10000 by it<br> Example: 10000 / 5000 = 2.0 (decimal odds).<br> This price has to conform to a valid tick on the exchange; an invalid price error will be returned if it does not. (required).</param> /// <param name="quantity"> Quantity is the sum of the total pot (back+lay) in case the order is matched<br> The units are 1/100 of a UK penny.<br> Example: Quantity 1 = 0.0001 GBP<br> To convert it to back stake, just multiply by the price and divide by 100000000<br> Example: 100000 (quantity) * 5000 (price) / 100000000 = 5 GBP back stake (required).</param> /// <param name="side"> side can either be:<ul> <li>buy: backing a contract <li>sell: laying a contract </ul> (required).</param> /// <param name="timestamp">timestamp (required).</param> public RecentTrade(string contractId = default(string), string marketId = default(string), int?price = default(int?), int?quantity = default(int?), SideEnum side = default(SideEnum), DateTime?timestamp = default(DateTime?)) { // to ensure "contractId" is required (not null) if (contractId == null) { throw new InvalidDataException("contractId is a required property for RecentTrade and cannot be null"); } else { this.ContractId = contractId; } // to ensure "marketId" is required (not null) if (marketId == null) { throw new InvalidDataException("marketId is a required property for RecentTrade and cannot be null"); } else { this.MarketId = marketId; } // to ensure "price" is required (not null) if (price == null) { throw new InvalidDataException("price is a required property for RecentTrade and cannot be null"); } else { this.Price = price; } // to ensure "quantity" is required (not null) if (quantity == null) { throw new InvalidDataException("quantity is a required property for RecentTrade and cannot be null"); } else { this.Quantity = quantity; } // to ensure "side" is required (not null) if (side == null) { throw new InvalidDataException("side is a required property for RecentTrade and cannot be null"); } else { this.Side = side; } // to ensure "timestamp" is required (not null) if (timestamp == null) { throw new InvalidDataException("timestamp is a required property for RecentTrade and cannot be null"); } else { this.Timestamp = timestamp; } }
/// <summary> /// Initializes a new instance of the <see cref="LoanPatch" /> class. /// </summary> /// <param name="currency">Loan currency (required).</param> /// <param name="side">Loan side. Possible values are `lend` and `borrow`. For `LoanRecord` patching, only `lend` is supported (required).</param> /// <param name="autoRenew">Auto renew (required).</param> /// <param name="currencyPair">Currency pair. Required for borrowing side.</param> /// <param name="loanId">Loan ID. Required for `LoanRecord` patching.</param> public LoanPatch(string currency = default(string), SideEnum side = default(SideEnum), bool autoRenew = default(bool), string currencyPair = default(string), string loanId = default(string)) { // to ensure "currency" is required (not null) this.Currency = currency ?? throw new ArgumentNullException("currency", "currency is a required property for LoanPatch and cannot be null"); this.Side = side; this.AutoRenew = autoRenew; this.CurrencyPair = currencyPair; this.LoanId = loanId; }
public OperatorModule(CommandService service, IConfigurationRoot config) { _service = service; _config = config; baseUrl = _config["strat_url"]; stratKey = _config["strat_key"]; sideEnum = SideEnum.ATTACK; }
internal int _filledQuantity = 0; // CumQty public OpenOrder(string traderTag, string productName, decimal price, int quantity, SideEnum side, UInt64 orderNumer) { this._orderNumber = orderNumer; this._traderTag = traderTag; this._productname = productName; this._totalQuantity = quantity; this._remainingQuantity = quantity; this._side = side; this._price = price; }
public virtual OBB2 Bounds(SideEnum side = SideEnum.Inside) { switch (side) { case SideEnum.Outside: return(outerBounds); default: return(innerBounds); } }
/// <summary>Определение лучшей цены</summary> /// <param name="side">Направление: Buy,Sell </param> /// <returns>decimal с лучшей ценой</returns> public decimal PriceBest(SideEnum side) { switch (side) { case SideEnum.Buy: return(WebSocketSigned.MaxBuy); case SideEnum.Sell: return(WebSocketSigned.MinSell); case SideEnum.UnKnown: return(0); } throw new ArgumentException(); }
public ScenarioSide GetScenarioSide(int scenarioId, SideEnum sideEnum) { List<ScenarioSide> scenarioSides = ScenarioSides.Where(ss => ss.ScenarioId == scenarioId).ToList(); if (sideEnum == SideEnum.Axis) { return scenarioSides[0]; } else { return scenarioSides[1]; } }
/// <summary> /// Initializes a new instance of the <see cref="SpotPricePutOrder" /> class. /// </summary> /// <param name="type">Order type, default to `limit` (default to "limit").</param> /// <param name="side">Order side - buy: buy side - sell: sell side (required).</param> /// <param name="price">Order price (required).</param> /// <param name="amount">Order amount (required).</param> /// <param name="account">Trading type - normal: spot trading - margin: margin trading (required).</param> /// <param name="timeInForce">time_in_force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only .</param> public SpotPricePutOrder(string type = "limit", SideEnum side = default(SideEnum), string price = default(string), string amount = default(string), AccountEnum account = default(AccountEnum), TimeInForceEnum?timeInForce = default(TimeInForceEnum?)) { this.Side = side; // to ensure "price" is required (not null) this.Price = price ?? throw new ArgumentNullException("price", "price is a required property for SpotPricePutOrder and cannot be null"); // to ensure "amount" is required (not null) this.Amount = amount ?? throw new ArgumentNullException("amount", "amount is a required property for SpotPricePutOrder and cannot be null"); this.Account = account; // use default value if no "type" provided this.Type = type ?? "limit"; this.TimeInForce = timeInForce; }
public static OrderSide convert(SideEnum orderSide) { switch (orderSide) { case SideEnum.sBuy: return(OrderSide.Buy); case SideEnum.sSell: return(OrderSide.Sell); } throw new DownStreamException("OrderType not support: " + orderSide); }
/// <summary> /// Initializes a new instance of the <see cref="Trade" /> class. /// </summary> /// <param name="id">id (required).</param> /// <param name="clientOrderId">clientOrderId (required).</param> /// <param name="orderId">orderId (required).</param> /// <param name="symbol">symbol (required).</param> /// <param name="side">side (required).</param> /// <param name="quantity">quantity.</param> /// <param name="fee">fee.</param> /// <param name="price">price.</param> /// <param name="timestamp">timestamp.</param> public Trade(long?id = default(long?), string clientOrderId = default(string), long?orderId = default(long?), string symbol = default(string), SideEnum side = default(SideEnum), string quantity = default(string), string fee = default(string), string price = default(string), DateTime?timestamp = default(DateTime?)) { // to ensure "id" is required (not null) if (id == null) { throw new InvalidDataException("id is a required property for Trade and cannot be null"); } else { this.Id = id; } // to ensure "clientOrderId" is required (not null) if (clientOrderId == null) { throw new InvalidDataException("clientOrderId is a required property for Trade and cannot be null"); } else { this.ClientOrderId = clientOrderId; } // to ensure "orderId" is required (not null) if (orderId == null) { throw new InvalidDataException("orderId is a required property for Trade and cannot be null"); } else { this.OrderId = orderId; } // to ensure "symbol" is required (not null) if (symbol == null) { throw new InvalidDataException("symbol is a required property for Trade and cannot be null"); } else { this.Symbol = symbol; } // to ensure "side" is required (not null) if (side == null) { throw new InvalidDataException("side is a required property for Trade and cannot be null"); } else { this.Side = side; } this.Quantity = quantity; this.Fee = fee; this.Price = price; this.Timestamp = timestamp; }
public static bool UpdateData(string id, string symbol, SideEnum side, PriceComparisonEnum evaluator, RatePriceOrFeeEnum ratePriceFee, DateTime expiration, bool usePercentMoney, double bidStrike, double midStrike, double highStrike, string account, double limit, ListenerTypeEnum listenerType, string jobId, string comments) { var select = MyObj.UpdateData(id, symbol, side, evaluator, ratePriceFee, expiration, usePercentMoney, bidStrike, midStrike, highStrike, account, limit, listenerType, jobId, comments); /* return new JavaScriptSerializer().Serialize( * "Hello, " + item + ", " + qty + " " + date+ " "+ phone+"!");*/ return(select); //return "Hello i am parth"; }
public StratModule(CommandService service, IConfigurationRoot config) { _service = service; _config = config; baseUrl = _config["strat_url"]; stratKey = _config["strat_key"]; sideEnum = SideEnum.ATTACK; difficultyEnum = DifficultyEnum.ALL; gameModeEnum = GameModeEnum.ALL; controller = true; keyboardandmouse = true; }
protected BoundaryMode ToBoundaryMode(SideEnum side) { switch (side) { case SideEnum.Outside: return(BoundaryMode.Outer); case SideEnum.Inside: return(BoundaryMode.Inner); default: return(BoundaryMode.Unknown); } }
/// <summary> /// Initializes a new instance of the <see cref="Loan" /> class. /// </summary> /// <param name="side">Loan side (required).</param> /// <param name="currency">Loan currency (required).</param> /// <param name="rate">Loan rate. Only rates in [0.0002, 0.002] are supported. Not required in lending. Market rate calculated from recent rates will be used if not set.</param> /// <param name="amount">Loan amount (required).</param> /// <param name="days">Loan days (required).</param> /// <param name="autoRenew">Auto renew the loan on expiration (default to false).</param> /// <param name="currencyPair">Currency pair. Required for borrowing side.</param> /// <param name="feeRate">Loan fee rate.</param> /// <param name="origId">Original loan ID if the loan is auto-renewed. Equal to `id` if not.</param> public Loan(SideEnum side = default(SideEnum), string currency = default(string), string rate = default(string), string amount = default(string), int days = default(int), bool autoRenew = false, string currencyPair = default(string), string feeRate = default(string), string origId = default(string)) { this.Side = side; // to ensure "currency" is required (not null) this.Currency = currency ?? throw new ArgumentNullException("currency", "currency is a required property for Loan and cannot be null"); // to ensure "amount" is required (not null) this.Amount = amount ?? throw new ArgumentNullException("amount", "amount is a required property for Loan and cannot be null"); this.Days = days; this.Rate = rate; this.AutoRenew = autoRenew; this.CurrencyPair = currencyPair; this.FeeRate = feeRate; this.OrigId = origId; }
public Card(CardDeck deck, CardInfo i) { if (deck == null) throw new ArgumentNullException("deck"); this.Container = new Canvas { Width = CardInfo.Width, Height = CardInfo.Height }; this.Overlay = new Rectangle { Fill = Brushes.White, Width = CardInfo.Width, Height = CardInfo.Height }; var ImageBackSideSource = deck.CardCustomBackgroundSource; if (ImageBackSideSource == null) { if (i.IsBlackDeck) ImageBackSideSource = new Abstractatech.Avalon.Cards.Avalon.Images.b1fv().Source; else ImageBackSideSource = new Abstractatech.Avalon.Cards.Avalon.Images.b2fv().Source; } this.ImageBackSide = new Image { Source = ImageBackSideSource, Width = CardInfo.Width, Height = CardInfo.Height, }.AttachTo(this); i.Visible = true; this.ImageTopSide = i.GetImage().AttachTo(this); this.VisibleSide = SideEnum.BackSide; CurrentDeck = deck; this.Overlay.AttachTo(deck.Overlay); this.Drag = new CardDrag(this); Info = i; bool CanClick = false; this.Overlay.MouseLeftButtonDown += delegate { CanClick = true; }; this.Overlay.MouseMove += delegate { CanClick = false; }; Action RaiseClick = delegate { this.CurrentDeck.Sounds.click(); if (!CanClick) return; if (Click != null) Click(); if (CurrentStack != null) CurrentStack.RaiseClick(this); }; //this.Overlay.TouchUp += // (sender, e) => // { // e.Handled = true; // RaiseClick(); // }; this.Overlay.MouseLeftButtonUp += (sender, e) => { //e.Handled = true; RaiseClick(); }; this.AnimatedOpacity = 1; //Opacity = 1; //Enabled = false; }
public Side(DataRow dr, SideEnum side) { _dr = dr; _side = side; }
public Side(DataTable dt, SideEnum side) { _dt = dt; _side = side; }
public Side(SideEnum side, string label) { _side = side; _label = label; }
/// <summary> /// Initializes a new instance of the <see cref="MediaField"/> class. /// </summary> /// <param name="side">The side.</param> /// <param name="example">if set to <c>true</c> [example].</param> /// <remarks>Documented by Dev02, 2008-03-29</remarks> public MediaField(SideEnum side, bool example) { this.type = TypeEnum.AudioField; this.side = side; this.example = example; }