/// <summary>
 /// Create a new collection with the specific name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// The parameters for the new collection.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CollectionResponse> CreateAsync(this ICollections operations, CollectionCreateRequest body = default(CollectionCreateRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieve all collections.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <CollectionResponse> > GetAllAsync(this ICollections operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 3
0
 public MakeChessMoveHandler(ICollections collections,
                             ILogger <MakeChessMoveHandler> logger, IMessageSender messageSender)
 {
     this.collections   = collections;
     this.logger        = logger;
     this.messageSender = messageSender;
 }
 public SocketController(ILogger <SocketController> logger,
                         ICollections collections, ISocketMessageHandler handler)
 {
     this.collections = collections;
     this.logger      = logger;
     this.handler     = handler;
 }
Exemplo n.º 5
0
 private void AddCollections(ICollections collections, string[] input)
 {
     foreach (var item in input)
     {
         Console.Write($"{collections.Add(item)} ");
     }
     Console.WriteLine();
 }
 public SocketMessageHandler(ICollections collections, ILogger <SocketMessageHandler> logger,
                             IMessageDeserializer deserializer, IEnumerable <IMessageHandler> handlers)
 {
     this.collections  = collections;
     this.logger       = logger;
     this.deserializer = deserializer;
     this.handlers     = handlers;
 }
Exemplo n.º 7
0
 public FindGameHandler(ILogger <FindGameHandler> logger, ICollections collections,
                        IGameSessionFactory sessionFactory, IMessageSender messageSender)
 {
     this.logger         = logger;
     this.collections    = collections;
     this.sessionFactory = sessionFactory;
     this.messageSender  = messageSender;
 }
 /// <summary>
 /// Rename the collection with the provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The collection id.
 /// </param>
 /// <param name='newName'>
 /// The new name for the collection.
 /// </param>
 public static void Rename(this ICollections operations, System.Guid id, string newName)
 {
     operations.RenameAsync(id, newName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Create a new collection with the specific name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// The parameters for the new collection.
 /// </param>
 public static CollectionResponse Create(this ICollections operations, CollectionCreateRequest body = default(CollectionCreateRequest))
 {
     return(operations.CreateAsync(body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve all collections.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <CollectionResponse> GetAll(this ICollections operations)
 {
     return(operations.GetAllAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the collection with the provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The collection id.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this ICollections operations, System.Guid id, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete the collection with the provided id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// The collection id.
 /// </param>
 public static void Delete(this ICollections operations, System.Guid id)
 {
     operations.DeleteAsync(id).GetAwaiter().GetResult();
 }
 public CancelSessionHandler(ICollections collections, IMessageSender messageSender)
 {
     this.collections   = collections;
     this.messageSender = messageSender;
 }
 public TradeInfoController(ICollections tradingrepo)
 {
     _tradesRepo = tradingrepo.TradesRepo;
 }
Exemplo n.º 15
0
 public CollectionService(ICollections collectionsHttpService, IMapper mapper)
 {
     _collectionsHttpService = collectionsHttpService;
     _mapper = mapper;
 }