public HipChatClient(IApiConnection apiConnection) : base(apiConnection) { Rooms =new RoomsClient(apiConnection); Users = new UsersClient(apiConnection); Emoticons = new EmoticonsClient(apiConnection); Capabilities = new CapabilitiesClient(apiConnection); }
/// <summary> /// Instantiate a new GitHub Activities API client. /// </summary> /// <param name="apiConnection">An API connection</param> public ActivitiesClient(IApiConnection apiConnection) : base(apiConnection) { Events = new EventsClient(apiConnection); Starring = new StarredClient(apiConnection); Watching = new WatchedClient(apiConnection); }
/// <summary> /// Initializes a new GitHub Repos API client. /// </summary> /// <param name="apiConnection">An API connection</param> public RepositoriesClient(IApiConnection apiConnection) : base(apiConnection) { Status = new CommitStatusClient(apiConnection); Hooks = new RepositoryHooksClient(apiConnection); Forks = new RepositoryForksClient(apiConnection); #pragma warning disable CS0618 // Type or member is obsolete RepoCollaborators = new RepoCollaboratorsClient(apiConnection); #pragma warning restore CS0618 // Type or member is obsolete Collaborator = new RepoCollaboratorsClient(apiConnection); Statistics = new StatisticsClient(apiConnection); Deployment = new DeploymentsClient(apiConnection); PullRequest = new PullRequestsClient(apiConnection); #pragma warning disable CS0618 // Type or member is obsolete RepositoryComments = new RepositoryCommentsClient(apiConnection); #pragma warning restore CS0618 // Type or member is obsolete Comment = new RepositoryCommentsClient(apiConnection); #pragma warning disable CS0618 // Type or member is obsolete Commits = new RepositoryCommitsClient(apiConnection); #pragma warning restore CS0618 // Type or member is obsolete Commit = new RepositoryCommitsClient(apiConnection); Release = new ReleasesClient(apiConnection); DeployKeys = new RepositoryDeployKeysClient(apiConnection); Merging = new MergingClient(apiConnection); Content = new RepositoryContentsClient(apiConnection); Page = new RepositoryPagesClient(apiConnection); }
/// <summary> /// Instantiates a new GitHub Enterprise API client. /// </summary> /// <param name="apiConnection">An API connection</param> public EnterpriseClient(IApiConnection apiConnection) : base(apiConnection) { AdminStats = new EnterpriseAdminStatsClient(apiConnection); License = new EnterpriseLicenseClient(apiConnection); Organization = new EnterpriseOrganizationClient(apiConnection); SearchIndexing = new EnterpriseSearchIndexingClient(apiConnection); }
public IssuesClient(IApiConnection apiConnection) : base(apiConnection) { Assignee = new AssigneesClient(apiConnection); Events = new IssuesEventsClient(apiConnection); Milestone = new MilestonesClient(apiConnection); Comment = new IssueCommentsClient(apiConnection); }
/// <summary> /// Initializes a new API client. /// </summary> /// <param name="apiConnection">The client's connection</param> protected ApiClient(IApiConnection apiConnection) { Ensure.ArgumentNotNull(apiConnection, "apiConnection"); ApiConnection = apiConnection; Connection = apiConnection.Connection; }
/// <summary> /// Instantiates a new GitHub Users API client. /// </summary> /// <param name="apiConnection">An API connection</param> public UsersClient(IApiConnection apiConnection) : base(apiConnection) { Email = new UserEmailsClient(apiConnection); Followers = new FollowersClient(apiConnection); Keys = new UserKeysClient(apiConnection); Administration = new UserAdministrationClient(apiConnection); }
/// <summary> /// Instantiates a new GitHub Reactions API client /// </summary> /// <param name="apiConnection">An API connection</param> public ReactionsClient(IApiConnection apiConnection) : base(apiConnection) { CommitComment = new CommitCommentReactionsClient(apiConnection); Issue = new IssueReactionsClient(apiConnection); IssueComment = new IssueCommentReactionsClient(apiConnection); PullRequestReviewComment = new PullRequestReviewCommentReactionsClient(apiConnection); }
private readonly string _keyName; // Name of the field that identifies the entity #endregion Fields #region Constructors /// <summary> /// Creates an instance of EntityController /// </summary> /// <param name="entity">An instance of an Entity that must be managed</param> /// <param name="keyName">Name of the keyname field of the entity (mostly ID)</param> /// <param name="identifier">Name of the identifier field of the entity (mostly ID)</param> /// <param name="connection">Instance of IApiConnection to connect to the specific part of the API</param> /// <param name="entityControllerDelegate">Delegate that gets the entity controller</param> public EntityController(object entity, string keyName, string identifier, IApiConnection connection, GetEntityController entityControllerDelegate) { _connection = connection; _keyName = keyName; _identifier = identifier; OriginalEntity = Clone(entity); _entityControllerDelegate = entityControllerDelegate; }
/// <summary> /// Initializes a new GitHub Repos API client. /// </summary> /// <param name="apiConnection">An API connection</param> public RepositoriesClient(IApiConnection apiConnection) : base(apiConnection) { CommitStatus = new CommitStatusClient(apiConnection); RepoCollaborators = new RepoCollaboratorsClient(apiConnection); Statistics = new StatisticsClient(apiConnection); Deployment = new DeploymentsClient(apiConnection); PullRequest = new PullRequestsClient(apiConnection); }
/// <summary> /// Instantiate a new GitHub Activities API client. /// </summary> /// <param name="apiConnection">An API connection</param> public ActivitiesClient(IApiConnection apiConnection) : base(apiConnection) { Events = new EventsClient(apiConnection); Starring = new StarredClient(apiConnection); Watching = new WatchedClient(apiConnection); Feeds = new FeedsClient(apiConnection); Notifications = new NotificationsClient(apiConnection); }
public void Setup() { _mockApiConnection = MockRepository.GenerateMock<IApiConnection>(); _mockStreamingManager = MockRepository.GenerateMock<IStreamingManager>(); _mockMarketInfoServiceFactory = MockRepository.GenerateMock<MarketInfoServiceFactory>(); _mockAccountInfoServiceFactory = MockRepository.GenerateMock<AccountInfoServiceFactory>(); _mockCfdMarketServiceFactory = MockRepository.GenerateMock<CfdMarketServiceFactory>(); _mockOrderServiceFactory = MockRepository.GenerateMock<OrderServiceFactory>(); }
public GitDatabaseClient(IApiConnection apiConnection) : base(apiConnection) { Blob = new BlobsClient(apiConnection); Tree = new TreesClient(apiConnection); Tag = new TagsClient(apiConnection); Commit = new CommitsClient(apiConnection); Reference = new ReferencesClient(apiConnection); }
public void SetUp() { _mockApiConnection = MockRepository.GenerateMock<IApiConnection>(); _mockLsCityindexStreamingConnectionFactory = MockRepository.GenerateMock<LsCityindexStreamingConnectionFactory>(); _mockLsStreamingClientAccountConnectionFactory = MockRepository.GenerateMock<LsStreamingClientAccountConnectionFactory>(); _mockLsCityindexStreamingConnection = MockRepository.GenerateMock<ILsCityindexStreamingConnection>(); _mockLsStreamingClientAccountConnection = MockRepository.GenerateMock<ILsStreamingClientAccountConnection>(); }
public DiscogsClient(IApiConnection apiConnection) { ApiConnection = apiConnection; Authentication = new AuthenticationClient(ApiConnection); Database = new DatabaseClient(ApiConnection); Images = new ImagesClient(ApiConnection); Marketplace = new MarketplaceClient(ApiConnection); UserCollection = new UserCollectionClient(ApiConnection); UserIdentity = new UserIdentityClient(ApiConnection); UserWantlist = new UserWantlistClient(ApiConnection); }
internal void SetUpServiceManagerForMocking(IApiConnection apiConnection, MarketInformationServiceFactory marketInformationServiceFactory, AccountInformationServiceFactory accountInformationServiceFactory, CfdMarketServiceFactory cfdMarketServiceFactory, OrderServiceFactory orderServiceFactory, FutureOptionServiceFactory futureOptionServiceFactory, MessageServiceFactory messageServiceFactory, NewsServiceFactory newsServiceFactory, SpreadMarketServiceFactory spreadMarketServiceFactory) { _apiConnection = apiConnection; _marketInformationServiceFactory = marketInformationServiceFactory; _accountInformationServiceFactory = accountInformationServiceFactory; _cfdMarketServiceFactory = cfdMarketServiceFactory; _orderServiceFactory = orderServiceFactory; _futureOptionServiceFactory = futureOptionServiceFactory; _messageServiceFactory = messageServiceFactory; _newsServiceFactory = newsServiceFactory; _spreadMarketServiceFactory = spreadMarketServiceFactory; }
/// <summary> /// Initializes a new instance of the <see cref="AuthenticationApiClient" /> class. /// </summary> /// <param name="baseUri">The base URI.</param> /// <param name="diagnostics">The diagnostics.</param> public AuthenticationApiClient(Uri baseUri, DiagnosticsHeader diagnostics) { this.baseUri = baseUri; // If no diagnostics header structure was specified, then revert to the default one if (diagnostics == null) { diagnostics = DiagnosticsHeader.Default; } apiConnection = new ApiConnection(null, baseUri.AbsoluteUri, diagnostics); }
public virtual SpreadMarketService Create(IApiConnection apiConnection) { try { return new SpreadMarketService(new SpreadMarketsQuery(apiConnection.CoreConnection)); } catch (Exception ex) { Log.Error(ex); throw; } }
/// <summary> /// Instantiates a new GitHub Users API client. /// </summary> /// <param name="apiConnection">An API connection</param> public UsersClient(IApiConnection apiConnection) : base(apiConnection) { Email = new UserEmailsClient(apiConnection); Followers = new FollowersClient(apiConnection); #pragma warning disable CS0618 // Type or member is obsolete Keys = new UserKeysClient(apiConnection); #pragma warning restore CS0618 // Type or member is obsolete GitSshKey = new UserKeysClient(apiConnection); GpgKey = new UserGpgKeysClient(apiConnection); Administration = new UserAdministrationClient(apiConnection); }
public virtual FutureOptionService Create(IApiConnection apiConnection) { try { Log.Debug("Creating future option service."); return new FutureOptionService(new FutureOptionPlacer(apiConnection.CoreConnection)); } catch (Exception ex) { Log.Error(ex); throw; } }
public virtual OrderService Create(IApiConnection apiConnection) { try { Log.Debug("Creating order service"); return new OrderService(new OpenPositionsQuery(apiConnection.CoreConnection), new OrderQuery(apiConnection.CoreConnection), new StopLimitOrderHistoryQuery(apiConnection.CoreConnection)); } catch (Exception ex) { Log.Error(ex); throw; } }
public virtual MessageService Create(IApiConnection apiConnection) { try { Log.Debug("Creating Message Service."); return new MessageService(new MessageLookupQuery(apiConnection.CoreConnection)); } catch (Exception ex) { Log.Error(ex); throw; } }
public virtual NewsService Create(IApiConnection apiConnection) { try { Log.Debug("Creating News Service."); return new NewsService(new NewsQuery(apiConnection.CoreConnection)); } catch (Exception ex) { Log.Error(ex); throw; } }
/// <summary> /// Initializes a new GitHub Repos API client. /// </summary> /// <param name="apiConnection">An API connection</param> public RepositoriesClient(IApiConnection apiConnection) : base(apiConnection) { CommitStatus = new CommitStatusClient(apiConnection); Hooks = new RepositoryHooksClient(apiConnection); Forks = new RepositoryForksClient(apiConnection); RepoCollaborators = new RepoCollaboratorsClient(apiConnection); Statistics = new StatisticsClient(apiConnection); Deployment = new DeploymentsClient(apiConnection); PullRequest = new PullRequestsClient(apiConnection); RepositoryComments = new RepositoryCommentsClient(apiConnection); Commits = new RepositoryCommitsClient(apiConnection); DeployKeys = new RepositoryDeployKeysClient(apiConnection); Merging = new MergingClient(apiConnection); Content = new RepositoryContentsClient(apiConnection); }
public void SetUp() { _mockStreamingManager = MockRepository.GenerateMock<IStreamingManager>(); _mockPriceStreamFactory = MockRepository.GenerateMock<IPriceStreamFactory>(); _mockNewsStreamFactory = MockRepository.GenerateMock<INewsStreamFactory>(); _mockOrderStreamFactory = MockRepository.GenerateMock<IOrderStreamFactory>(); _streams = new Streams(_mockStreamingManager, _mockPriceStreamFactory, _mockNewsStreamFactory, _mockOrderStreamFactory); _mockLsCityindexStreamingConnection = MockRepository.GenerateMock<ILsCityindexStreamingConnection>(); _mockLStreamingClientAccountConnection = MockRepository.GenerateMock<ILsStreamingClientAccountConnection>(); _mockApiConnection = MockRepository.GenerateMock<IApiConnection>(); _mockLightStreamerConnectionManager = MockRepository.GenerateMock<LightStreamerConnectionManager>(_mockApiConnection); }
internal Readme(ReadmeResponse response, IApiConnection client) { Ensure.ArgumentNotNull(response, "response"); Ensure.ArgumentNotNull(client, "client"); Name = response.Name; Url = new Uri(response.Url); HtmlUrl = new Uri(response.HtmlUrl); if (response.Encoding.Equals("base64", StringComparison.OrdinalIgnoreCase)) { var contentAsBytes = Convert.FromBase64String(response.Content); Content = Encoding.UTF8.GetString(contentAsBytes, 0, contentAsBytes.Length); } htmlContent = new Lazy<Task<string>>(async () => await client.GetHtml(Url).ConfigureAwait(false)); }
public virtual MarketInformationService Create(IApiConnection apiConnection) { try { Log.Debug("Creating market information service"); return new MarketInformationService(new MarketInformationQuery(apiConnection.CoreConnection)); } catch (Exception ex) { Log.Error(ex); throw; } // Alternatively could cache at the actual service method call i.e use an enum // new MarketServiceFactory().Create().GetMarketInformation(cableMarketId, Cache.On); }
/// <summary> /// Initializes a new GitHub Repos API client. /// </summary> /// <param name="apiConnection">An API connection</param> public RepositoriesClient(IApiConnection apiConnection) : base(apiConnection) { Status = new CommitStatusClient(apiConnection); Hooks = new RepositoryHooksClient(apiConnection); Forks = new RepositoryForksClient(apiConnection); Collaborator = new RepoCollaboratorsClient(apiConnection); Statistics = new StatisticsClient(apiConnection); Deployment = new DeploymentsClient(apiConnection); PullRequest = new PullRequestsClient(apiConnection); Comment = new RepositoryCommentsClient(apiConnection); Commit = new RepositoryCommitsClient(apiConnection); Release = new ReleasesClient(apiConnection); DeployKeys = new RepositoryDeployKeysClient(apiConnection); Merging = new MergingClient(apiConnection); Content = new RepositoryContentsClient(apiConnection); Page = new RepositoryPagesClient(apiConnection); Invitation = new RepositoryInvitationsClient(apiConnection); Branch = new RepositoryBranchesClient(apiConnection); }
public void Setup() { _mockApiConnection = MockRepository.GenerateMock<IApiConnection>(); _mockMarketInformationServiceFactory = MockRepository.GenerateMock<MarketInformationServiceFactory>(); _mockAccountInformationServiceFactory = MockRepository.GenerateMock<AccountInformationServiceFactory>(); _mockCfdMarketServiceFactory = MockRepository.GenerateMock<CfdMarketServiceFactory>(); _mockOrderServiceFactory = MockRepository.GenerateMock<OrderServiceFactory>(); _mockFutureOptionServiceFactory = MockRepository.GenerateMock<FutureOptionServiceFactory>(); _mockMessageServiceFactory = MockRepository.GenerateMock<MessageServiceFactory>(); _mockNewsServiceFactory = MockRepository.GenerateMock<NewsServiceFactory>(); _spreadMarketServiceFactory = MockRepository.GenerateMock<SpreadMarketServiceFactory>(); _serviceManager = new ServiceManager(); _serviceManager.SetUpServiceManagerForMocking( _mockApiConnection, _mockMarketInformationServiceFactory, _mockAccountInformationServiceFactory, _mockCfdMarketServiceFactory, _mockOrderServiceFactory, _mockFutureOptionServiceFactory, _mockMessageServiceFactory, _mockNewsServiceFactory, _spreadMarketServiceFactory); }
/// <summary> /// Instantiates a new GitHub Repository Deployments API client. /// </summary> /// <param name="apiConnection">An API connection</param> public DeploymentsClient(IApiConnection apiConnection) : base(apiConnection) { Status = new DeploymentStatusClient(apiConnection); }
public IssueTimelineClient(IApiConnection apiConnection) : base(apiConnection) { }
public GitHubAppInstallationsClient(IApiConnection apiConnection) : base(apiConnection) { }
public FollowClient(IApiConnection apiConnection) : base(apiConnection) { }
public IssuesEventsClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Instantiates a new GitHub Statistics API client. /// </summary> /// <param name="apiConnection">An API connection</param> public StatisticsClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Initializes a new GitHub Check Suites API client. /// </summary> /// <param name="apiConnection">An API connection</param> public CheckSuitesClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Instantiates a new GitHub User Emails API client. /// </summary> /// <param name="apiConnection">An API connection</param> public UserEmailsClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Initializes a new instance of the <see cref="UserAdministrationClient"/> class. /// </summary> /// <param name="apiConnection">The client's connection</param> public UserAdministrationClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Initializes a new GitHub Repository Branches API client. /// </summary> /// <param name="apiConnection">An API connection</param> public RepositoryBranchesClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Initializes a new GitHub Releases API client. /// </summary> /// <param name="apiConnection">An API connection</param> public ReleasesClient(IApiConnection apiConnection) : base(apiConnection) { }
public EnterpriseSearchIndexingClient(IApiConnection apiConnection) : base(apiConnection) { }
public RepositoryClient(IApiConnection apiConnection) : base(apiConnection) { Content = new RepositoryContentClient(apiConnection); }
public RepositoryTrafficClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Instantiates a new GitHub Git Trees API client. /// </summary> /// <param name="apiConnection">An API connection</param> public TreesClient(IApiConnection apiConnection) : base(apiConnection) { }
public ReadingListClient(IApiConnection apiConnection) : base(apiConnection) { }
public IssueReactionsClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Creates a new instance of the ClientBase class. /// </summary> /// <param name="connection">The <see cref="IApiConnection" /> which is used to communicate with the API.</param> public ClientsClient(IApiConnection connection) : base(connection) { }
/// <summary> /// Initializes a new GitHub Repos API client. /// </summary> /// <param name="apiConnection">An API connection</param> public RepositoriesClient(IApiConnection apiConnection) : base(apiConnection) { CommitStatus = new CommitStatusClient(apiConnection); }
public void Setup() { _mockConnection = new ApiConnectionMock(); }
/// <inheritdoc /> public LyricsClient(IApiConnection apiConnection) { _apiConnection = apiConnection; }
/// <summary> /// Initializes a new GitHub Search API client. /// </summary> /// <param name="apiConnection">An API connection.</param> public SearchClient(IApiConnection apiConnection) : base(apiConnection) { }
public PullRequestsClient(IApiConnection apiConnection) : base(apiConnection) { Comment = new PullRequestReviewCommentsClient(apiConnection); }
/// <summary> /// Instantiates a new GitHub Issue Assignees API client. /// </summary> /// <param name="apiConnection">An API connection</param> public AssigneesClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Creates a new instance of <see cref="EmailTemplatesClient"/>. /// </summary> /// <param name="connection">The <see cref="IApiConnection" /> which is used to communicate with the API.</param> public EmailTemplatesClient(IApiConnection connection) : base(connection) { }
/// <summary> /// Initializes a new Commit Status API client. /// </summary> /// <param name="apiConnection">An API connection</param> public CommitStatusClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Instantiates a new SSH Key Client. /// </summary> /// <param name="apiConnection">The connection used to make requests</param> public SshKeysClient(IApiConnection apiConnection) : base(apiConnection) { }
/// <summary> /// Instantiates a new GitHub Git Blobs API client. /// </summary> /// <param name="apiConnection">An API connection</param> public BlobsClient(IApiConnection apiConnection) : base(apiConnection) { }
public ActiveUserClient(IApiConnection conn) : base(conn) { }
/// <summary> /// Initializes a new GitHub Repo Collaborators API client. /// </summary> /// <param name="apiConnection">An API connection.</param> public RepoCollaboratorsClient(IApiConnection apiConnection) : base(apiConnection) { }