Пример #1
0
 public PortfoliosService(IPortfoliosAPI portfoliosApi, ICompaniesAPI companiesApi, IRuleOneAPI ruleOneApi, IMapper mapper)
 {
     _portfoliosApi = portfoliosApi;
     _companiesApi  = companiesApi;
     _ruleOneApi    = ruleOneApi;
     _mapper        = mapper;
 }
 public WatchlistsService(IWatchlistsAPI watchlistsApi, ICompaniesAPI companiesApi, IRuleOneAPI ruleOneApi, IMapper mapper)
 {
     _watchlistsApi = watchlistsApi;
     _companiesApi  = companiesApi;
     _ruleOneApi    = ruleOneApi;
     _mapper        = mapper;
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <string> ApiValuesByIdGetAsync(this IRuleOneAPI operations, int id, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiValuesByIdGetWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='companySymbols'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Rating> > GetRatingsAsync(this IRuleOneAPI operations, string companySymbols, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetRatingsWithHttpMessagesAsync(companySymbols, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='page'>
 /// </param>
 /// <param name='display'>
 /// </param>
 /// <param name='orderBy'>
 /// </param>
 /// <param name='q'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PageRating> GetPageOfRatingsAsync(this IRuleOneAPI operations, int?page = default(int?), int?display = default(int?), string orderBy = default(string), string q = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetPageOfRatingsWithHttpMessagesAsync(page, display, orderBy, q, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='companySymbols'>
 /// </param>
 public static IList <Rating> GetRatings(this IRuleOneAPI operations, string companySymbols)
 {
     return(Task.Factory.StartNew(s => ((IRuleOneAPI)s).GetRatingsAsync(companySymbols), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='page'>
 /// </param>
 /// <param name='display'>
 /// </param>
 /// <param name='orderBy'>
 /// </param>
 /// <param name='q'>
 /// </param>
 public static PageRating GetPageOfRatings(this IRuleOneAPI operations, int?page = default(int?), int?display = default(int?), string orderBy = default(string), string q = default(string))
 {
     return(Task.Factory.StartNew(s => ((IRuleOneAPI)s).GetPageOfRatingsAsync(page, display, orderBy, q), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task ApiValuesByIdDeleteAsync(this IRuleOneAPI operations, int id, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.ApiValuesByIdDeleteWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false);
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static void ApiValuesByIdDelete(this IRuleOneAPI operations, int id)
 {
     Task.Factory.StartNew(s => ((IRuleOneAPI)s).ApiValuesByIdDeleteAsync(id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='value'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task ApiValuesByIdPutAsync(this IRuleOneAPI operations, int id, string value = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.ApiValuesByIdPutWithHttpMessagesAsync(id, value, null, cancellationToken).ConfigureAwait(false);
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='value'>
 /// </param>
 public static void ApiValuesPost(this IRuleOneAPI operations, string value = default(string))
 {
     Task.Factory.StartNew(s => ((IRuleOneAPI)s).ApiValuesPostAsync(value), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <string> ApiValuesGet(this IRuleOneAPI operations)
 {
     return(Task.Factory.StartNew(s => ((IRuleOneAPI)s).ApiValuesGetAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 public CompaniesService(ICompaniesAPI companiesApi, IRuleOneAPI ruleOneApi, IMapper mapper)
 {
     _companiesApi = companiesApi;
     _ruleOneApi   = ruleOneApi;
     _mapper       = mapper;
 }