public ReportAgent(ConnectorCredential credential, IReportManager reportManager) { this.credential = credential; this.reportManager = reportManager; this.thisLock = new object(); }
public ReportAgent(ConnectorCredential credential, EmailAccount emailAccount, ServiceConfiguration configuration) { this.credential = credential; this.emailAccount = emailAccount; this.configuration = configuration; this.serviceUri = new Uri(credential.ConnectorUri); this.actorId = new ActorId(string.Format(AgentIdFormat, credential.ConnectorName, credential.ConnectorId, emailAccount.EngagementAccount, Random.Next(1, this.configuration.ActorReportMaxCount))); this.connector = ActorProxy.Create <IEmailConnector>(this.actorId, this.serviceUri); }
public ConnectorCredential ToDataContract(ConnectorMetadata metadata) { var credential = new ConnectorCredential(); credential.ConnectorName = this.ConnectorName; credential.ConnectorId = this.ConnectorId; credential.BatchSize = metadata.BatchSize; credential.ConnectorUri = metadata.ConnectorUri; credential.ConnectorProperties = new PropertyCollection <string>(this.ConnectorProperties); return(credential); }
private ReportAgent GetAgent(ConnectorCredential credential) { var key = this.GetAgentKey(credential); if (!this.agents.ContainsKey(key)) { this.agents.TryAdd(key, new ReportAgent(credential, this)); } if (this.agents.TryGetValue(key, out ReportAgent agent)) { return(agent); } SmsProviderEventSource.Current.Error(SmsProviderEventSource.EmptyTrackingId, this, nameof(this.GetAgent), OperationStates.Failed, $"Report manager cannot get agent for connectorName={credential.ConnectorName} connectorKey={credential.ConnectorId}"); return(null); }
private EmailEngineAgent GetEmailEngineAgent(ConnectorCredential credential, string engagementAccount) { // Get agent return(new EmailEngineAgent(credential, engagementAccount, this.configuration)); }
public Task <InboundResponse> ParseInboundRequestAsync(HttpRequestMessage request, ConnectorCredential credential, CancellationToken cancellationToken) { var requestContract = new InboundHttpRequestMessage(request); return(this.connector.ParseInboundRequestAsync(requestContract, credential, cancellationToken)); }
public Task DeleteEmailAccountAsync(ConnectorCredential credential, EmailAccount emailAccount, CancellationToken cancellationToken) { return(this.connector.DeleteEmailAccountAsync(credential, emailAccount, cancellationToken)); }
public CredentialAgent(ConnectorCredential credential, string engagementAccount) { this.serviceUri = new Uri(credential.ConnectorUri); this.actorId = new ActorId(string.Format(AgentIdFormat, credential.ConnectorName, credential.ConnectorId, engagementAccount)); this.connector = ActorProxy.Create <IEmailConnector>(this.actorId, this.serviceUri); }
// SenderAddress public Task <SenderAddress> CreateorUpdateSenderAddressAsync(ConnectorCredential credential, EmailAccount emailAccount, SenderAddress senderAddress, CancellationToken cancellationToken) { return(this.connector.CreateorUpdateSenderAddressAsync(credential, emailAccount, senderAddress, cancellationToken)); }
public PushConnector(ConnectorCredential connectorInfo) { this.connectorInfo = connectorInfo; }
// Mailing public Task DeleteMailingAsync(ConnectorCredential credential, EmailAccount emailAccount, List <MessageIdentifer> messageIdentifers, CancellationToken cancellationToken) { return(this.connector.DeleteMailingAsync(credential, emailAccount, messageIdentifers, cancellationToken)); }
public Task DeleteGroupAsync(ConnectorCredential credential, EmailAccount emailAccount, List <Group> groupList, CancellationToken cancellationToken) { return(this.connector.DeleteGroupAsync(credential, emailAccount, groupList, cancellationToken)); }
public Task <GroupMembers> GetGroupMembersAsync(ConnectorCredential credential, EmailAccount emailAccount, Group group, GroupMemberRequest request, CancellationToken cancellationToken) { return(this.connector.GetGroupMembersAsync(credential, emailAccount, group, request, cancellationToken)); }
// Group public Task <GroupCreateOrUpdateResult> CreateorUpdateGroupAsync(ConnectorCredential credential, EmailAccount emailAccount, Group group, CancellationToken cancellationToken) { return(this.connector.CreateorUpdateGroupAsync(credential, emailAccount, group, cancellationToken)); }
public Task DeleteSenderAddressAsync(ConnectorCredential credential, EmailAccount emailAccount, List <SenderAddress> senderAddressList, CancellationToken cancellationToken) { return(this.connector.DeleteSenderAddressAsync(credential, emailAccount, senderAddressList, cancellationToken)); }
public static PushConnector Create(ConnectorCredential connectorInfo) { return(new PushConnector(connectorInfo)); }
public EmailEngineAgent(ConnectorCredential credential, string engagementAccount, ServiceConfiguration configuration) { this.serviceUri = new Uri(credential.ConnectorUri); this.actorId = new ActorId(string.Format(AgentIdFormat, credential.ConnectorName, credential.ConnectorId, engagementAccount, Random.Next(1, configuration.ActorAccountMaxCount))); this.connector = ActorProxy.Create <IEmailConnector>(this.actorId, this.serviceUri); }