示例#1
0
        public static LocationResult ParseLocationResult(HtmlDocument doc, PayByPhoneApi api)
        {
            var form = doc.DocumentNode.SelectSingleNode("//form");
            var formAction = form?.GetAttributeValue("action", "");

            LocationResult result = null;

            if (formAction != null)
            {
                if (formAction.Contains("ChooseLocation"))
                {
                    // this is a multiple response
                    result = new MultipleLocationResult(api);
                    var mlResult = result as MultipleLocationResult;
                    mlResult.Locations = DifferentiateResultLocation.ParseLocations(doc.DocumentNode);
                }
                else
                {
                    // this is on Parking
                    result = new SingleLocationResult();
                    var slResult = result as SingleLocationResult;
                    slResult.Location = new ResultLocation(doc.DocumentNode);
                }
            }
            return result;
        }
示例#2
0
        private async void Login()
        {   
            bool val;
            _api = new PayByPhoneApi();
            await _api.Login("7202564696", "2343");
            return;
            do
            {
                Console.WriteLine("Login to PayByPhone");
                Console.Write("\tUsername: "******"\tPassword: "******"Error Logging In");
                }
            }
            while (!val);
            Console.WriteLine("Logged in");
        }
示例#3
0
 public ApiSection(PayByPhoneApi api)
 {
     MyApi = api;
 }
示例#4
0
 public EmailSettings(PayByPhoneApi api) : base(api)
  {
  }
示例#5
0
 public MultipleLocationResult(PayByPhoneApi api)
 {
     _api = api;
 }
示例#6
0
 public TermsConditions(PayByPhoneApi api) : base(api)
  {
  }        
示例#7
0
 public LocationManager(PayByPhoneApi api) : base(api)
 {
 }
示例#8
0
 public PaymentDetails(PayByPhoneApi api) : base(api)
  {
  }