Ejemplo n.º 1
0
 /// <summary>
 /// Returns a specific number for the given subscription
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='numberId'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <TelephoneNumberModel> ExistingNumberAsync(this INumbers operations, string id, string subscriptionId, string numberId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ExistingNumberWithHttpMessagesAsync(id, subscriptionId, numberId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Set the SMS Endoint for the given number
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='numberId'>
 /// The UniqueID of the number
 /// </param>
 /// <param name='endpointType'>
 /// The endpoint type that daa should be sent to. Possible values include:
 /// 'None', 'EMail', 'HTTPPost', 'HTTPGet'
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='number'>
 /// </param>
 /// <param name='data'>
 /// Data for the endpoint type (E.g. Url or EMail Address)
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> SetSMSEndpointAsync(this INumbers operations, string numberId, string endpointType, string subscriptionId, string number, string data = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.SetSMSEndpointWithHttpMessagesAsync(numberId, endpointType, subscriptionId, number, data, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns a list of Areas available for a given Country
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='countryId'>
 /// </param>
 /// <param name='numberType'>
 /// Possible values include: 'Any', 'Local', 'National', 'Mobile',
 /// 'PremiumRate', 'Freephone'
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Area> > GetAreasByCountryAsync(this INumbers operations, string countryId, string numberType, string subscriptionId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAreasByCountryWithHttpMessagesAsync(countryId, numberType, subscriptionId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 4
0
        public Result?FillFromSource(INumbers randomNumbers, List <int> orderedList)
        {
            table.Clear();

            for (int i = 0; i != orderedList.Count; i++)
            {
                Add(new Number(randomNumbers.FindById(orderedList[i])));
            }

            throw new NotImplementedException();
        }
Ejemplo n.º 5
0
        public List <int> Sort(INumbers numbers)
        {
            List <int> list = new List <int>();

            int minValue = numbers.GetMinValue();
            int maxValue = numbers.GetMaxValue();

            for (int i = minValue; i != maxValue + 1; i++)
            {
                list.AddRange(numbers.FindAllIdByNumber(i));
            }

            return(list);
        }
Ejemplo n.º 6
0
 public FakePrimeApp(INumbers numbers, IMatrixFormat matrix, IMatrixPrinter printer) : base(numbers, matrix, printer)
 {
 }
Ejemplo n.º 7
0
 public Core(ISorting sorting, INumbers randomNumbers, INumbers sortedNumbers)
 {
     this.sorting       = sorting;
     this.randomNumbers = randomNumbers;
     this.sortedNumbers = sortedNumbers;
 }
Ejemplo n.º 8
0
 public void SetProviderData(INumbers providerData)
 {
     this._data = providerData;
 }
Ejemplo n.º 9
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='countryId'>
 /// </param>
 /// <param name='numberType'>
 /// Possible values include: 'Any', 'Local', 'National', 'Mobile',
 /// 'PremiumRate', 'Freephone'
 /// </param>
 /// <param name='areaId'>
 /// </param>
 /// <param name='numberQty'>
 /// </param>
 /// <param name='description'>
 /// </param>
 public static IList <TelephoneNumberModel> PurchaseNumbers(this INumbers operations, string subscriptionId, string countryId, string numberType, string areaId, int numberQty, string description = default(string))
 {
     return(operations.PurchaseNumbersAsync(subscriptionId, countryId, numberType, areaId, numberQty, description).GetAwaiter().GetResult());
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Returns a list of the numbers under the given subscription
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='take'>
 /// </param>
 /// <param name='countryId'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <TelephoneNumberModel> > ExistingNumbersAsync(this INumbers operations, string subscriptionId, int?skip = default(int?), int?take = default(int?), System.Guid?countryId = default(System.Guid?), string search = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ExistingNumbersWithHttpMessagesAsync(subscriptionId, skip, take, countryId, search, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public HomeController()
 {
     numbersService = new NumbersService();
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Returns a list of the numbers under the given subscription
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='take'>
 /// </param>
 /// <param name='countryId'>
 /// </param>
 /// <param name='search'>
 /// </param>
 public static IList <TelephoneNumberModel> ExistingNumbers(this INumbers operations, string subscriptionId, int?skip = default(int?), int?take = default(int?), System.Guid?countryId = default(System.Guid?), string search = default(string))
 {
     return(operations.ExistingNumbersAsync(subscriptionId, skip, take, countryId, search).GetAwaiter().GetResult());
 }
Ejemplo n.º 13
0
 public PrimeApp(INumbers numbers, IMatrixFormat tableFormat, IMatrixPrinter printer)
 {
     _numbers     = numbers;
     _print       = printer;
     _tableFormat = tableFormat;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Returns a list of Areas available for a given Country
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='countryId'>
 /// </param>
 /// <param name='numberType'>
 /// Possible values include: 'Any', 'Local', 'National', 'Mobile',
 /// 'PremiumRate', 'Freephone'
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 public static IList <Area> GetAreasByCountry(this INumbers operations, string countryId, string numberType, string subscriptionId)
 {
     return(operations.GetAreasByCountryAsync(countryId, numberType, subscriptionId).GetAwaiter().GetResult());
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Returns a list of countries for which numbers are available
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 public static IList <Country> GetCountries(this INumbers operations, string subscriptionId)
 {
     return(operations.GetCountriesAsync(subscriptionId).GetAwaiter().GetResult());
 }
Ejemplo n.º 16
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='countryId'>
 /// </param>
 /// <param name='numberType'>
 /// Possible values include: 'Any', 'Local', 'National', 'Mobile',
 /// 'PremiumRate', 'Freephone'
 /// </param>
 /// <param name='areaId'>
 /// </param>
 /// <param name='numberQty'>
 /// </param>
 /// <param name='description'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <TelephoneNumberModel> > PurchaseNumbersAsync(this INumbers operations, string subscriptionId, string countryId, string numberType, string areaId, int numberQty, string description = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PurchaseNumbersWithHttpMessagesAsync(subscriptionId, countryId, numberType, areaId, numberQty, description, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Returns a specific number for the given subscription
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='numberId'>
 /// </param>
 public static TelephoneNumberModel ExistingNumber(this INumbers operations, string id, string subscriptionId, string numberId)
 {
     return(operations.ExistingNumberAsync(id, subscriptionId, numberId).GetAwaiter().GetResult());
 }
Ejemplo n.º 18
0
 public Calculator(IList <IOperation> operations, IMenu menu, INumbers numbers)
 {
     _operations = operations;
     _menu       = menu;
     _numbers    = numbers;
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Set the SMS Endoint for the given number
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='numberId'>
 /// The UniqueID of the number
 /// </param>
 /// <param name='endpointType'>
 /// The endpoint type that daa should be sent to. Possible values include:
 /// 'None', 'EMail', 'HTTPPost', 'HTTPGet'
 /// </param>
 /// <param name='subscriptionId'>
 /// </param>
 /// <param name='number'>
 /// </param>
 /// <param name='data'>
 /// Data for the endpoint type (E.g. Url or EMail Address)
 /// </param>
 public static object SetSMSEndpoint(this INumbers operations, string numberId, string endpointType, string subscriptionId, string number, string data = default(string))
 {
     return(operations.SetSMSEndpointAsync(numberId, endpointType, subscriptionId, number, data).GetAwaiter().GetResult());
 }