Exemplo n.º 1
0
            internal ClientResult(IPAndSecondsOKResults ok, NumberAndBody numberAndBody, bool enabled,  UserSMSActResult? act, Func<String> landingPageGetter)
            {
                if (act.HasValue && act.Value == UserSMSActResult.Send)
                {
                    this.done = true;
                }
                else
                {
                    this.e = enabled;
                    this.s = ok.Seconds;
                    this.ok = ok.OK;

                    if (ok)
                    {
                        if (!enabled)
                            throw new Exception("!enabled but ok");

                        this.p = landingPageGetter();
                        this.b = numberAndBody.Body;
                        this.n = numberAndBody.Number;

                        if (act.HasValue)
                            this.retry = ReTryAfter;
                    }
                }
            }
Exemplo n.º 2
0
 ClientResult ToClientResult(IPAndSecondsOKResults ok, UserSMSActResult? act, string language, string adId, string uuId)
 {
     var numberAndBody = GetNumberAndBody(ok.Country, adId, uuId);
     return new ClientResult(ok, numberAndBody, SubscriptionEnabled, act, () => LandingPage(ok,language));
 }