protected override async Task <Action <AsyncCodeActivityContext> > ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken) { // Object Container: Use objectContainer.Get<T>() to retrieve objects from the scope var objectContainer = context.GetFromContext <IObjectContainer>(TwilioApiScope.ParentContainerPropertyTag); // Inputs var to = To.Get(context); var from = From.Get(context); var body = Body.Get(context); var mediaurls = MediaUrls.Get(context); var accountsid = AccountSid.Get(context); var messagingservicesid = MessagingServiceSid.Get(context); var applicationsid = ApplicationSid.Get(context); var statuscallback = StatusCallback.Get(context); var providefeedback = ProvideFeedback.Get(context); var maxprice = MaxPrice.Get(context); var validityperiod = ValidityPeriod.Get(context); var smartencoded = SmartEncoded.Get(context); var message = await MessageWrappers.SendMessageAsync(objectContainer.Get <ITwilioRestClient>(), from, to, body, mediaurls, maxprice, validityperiod, smartencoded, accountsid, applicationsid, messagingservicesid, providefeedback, statuscallback); // Outputs return((ctx) => { Message.Set(ctx, message); }); }
/// <summary> /// Generate the Market Statistics /// </summary> public static void GenerateMarketStats() { MarketStatsValue[0] = Symbol; MarketStatsValue[1] = DataPeriodToString(Period); MarketStatsValue[2] = Bars.ToString(CultureInfo.InvariantCulture); MarketStatsValue[3] = Update.ToString(Df); MarketStatsValue[4] = Update.ToString("HH:mm"); MarketStatsValue[5] = Time[0].ToString(Df); MarketStatsValue[6] = Time[0].ToString("HH:mm"); MarketStatsValue[7] = MinPrice.ToString(CultureInfo.InvariantCulture); MarketStatsValue[8] = MaxPrice.ToString(CultureInfo.InvariantCulture); MarketStatsValue[9] = AverageGap + " " + Language.T("points"); MarketStatsValue[10] = MaxGap + " " + Language.T("points"); MarketStatsValue[11] = AverageHighLow + " " + Language.T("points"); MarketStatsValue[12] = MaxHighLow + " " + Language.T("points"); MarketStatsValue[13] = AverageCloseOpen + " " + Language.T("points"); MarketStatsValue[14] = MaxCloseOpen + " " + Language.T("points"); MarketStatsValue[15] = DaysOff.ToString(CultureInfo.InvariantCulture); MarketStatsValue[16] = Configs.MaxBars.ToString(CultureInfo.InvariantCulture); MarketStatsValue[17] = Configs.UseStartTime ? Configs.DataStartTime.ToShortDateString() : Language.T("No limits"); MarketStatsValue[18] = Configs.UseEndTime ? Configs.DataEndTime.ToShortDateString() : Language.T("No limits"); MarketStatsValue[19] = Configs.FillInDataGaps ? Language.T("Accomplished") : Language.T("Switched off"); MarketStatsValue[20] = Configs.CutBadData ? Language.T("Accomplished") : Language.T("Switched off"); }
public string GetPriceText() { if (MaxPrice == Money.Zero) { return(Price.ToString()); } return(string.Format("{0} - {1}", price.ToString(), MaxPrice.ToString())); }
public override int GetHashCode() { unchecked { var hashCode = PageFilter.GetHashCode(); hashCode = (hashCode * 397) ^ (Title != null ? Title.GetHashCode() : 0); hashCode = (hashCode * 397) ^ MinPrice.GetHashCode(); hashCode = (hashCode * 397) ^ MaxPrice.GetHashCode(); return(hashCode); } }
public override string ToString() { var str = new StringBuilder(); const string sep = "; "; str.Append(CustomUrl); str.Append(sep); str.Append(SearchText); str.Append(sep); str.Append(MinPrice.ToString()); str.Append(sep); str.Append(MaxPrice.ToString()); str.Append(sep); str.Append(Currency); str.Append(sep); str.Append(ShipCountry); str.Append(sep); str.Append(SortType); str.Append(sep); return(str.ToString()); }
public string Summary() { return(String.Join(",", new String[] { Symbol, Gap.ToString(), Total.ToString(), (TTS / Total).ToString(), MaxPrice.ToString() })); }
public void Test() { Assert.Equal(53, MaxPrice.GetResult(new[, ] { { 1, 10, 3, 8 }, { 12, 2, 9, 6 }, { 5, 7, 4, 11 }, { 3, 7, 16, 5 } })); }
public void TestWithOneElementMatrix() { Assert.Equal(12, MaxPrice.GetResult(new[, ] { { 12 } })); }
public void TestWithOneRowMatrix() { Assert.Equal(22, MaxPrice.GetResult(new[, ] { { 1, 10, 3, 8 } })); }