private void DumpProxyToMetrics(ManagedTokenOrganizationServiceProxy proxy) { PushMetric($"Crm.CallerId", proxy.CallerId.ToString()); PushMetric($"Crm.Auth.Type", proxy.CrmServiceClient.ActiveAuthenticationType.ToString()); PushMetric($"Crm.Instance.Url", proxy.EndpointUrl);; PushMetric($"Crm.Instance.DisplayName", proxy.CrmServiceClient.ConnectedOrgFriendlyName.ToString()); }
public JobExecutionContext(ManagedTokenOrganizationServiceProxy proxy) { Proxy = proxy; Properties = new Dictionary <string, string>(); DumpProxyToMetrics(proxy); }
public JobExecutionContext(ManagedTokenOrganizationServiceProxy proxy, Entity record) { Proxy = proxy; Record = record; Properties = new Dictionary <string, string>(); PushRecordToMetrics(record); DumpProxyToMetrics(proxy); }
private void InitializeMainProxy() { MainProxy = new ManagedTokenOrganizationServiceProxy(this.ConnectionString, this.Logger, Guid.Empty); if (MainProxy.CrmServiceClient.LastCrmException != null) { Logger.LogInformation($"Failed to connect to CRM => {MainProxy.CrmServiceClient.LastCrmError}!"); throw MainProxy.CrmServiceClient.LastCrmException; } MainProxy.CallerId = MainProxy.CrmServiceClient.GetMyCrmUserId(); }
public ManagedTokenOrganizationServiceProxy GetProxy(int retryCount = 0) { var proxy = new ManagedTokenOrganizationServiceProxy(this.ConnectionString, this.Logger, MainProxy.CallerId, this.MainProxy.CrmServiceClient); return(proxy); }
public virtual Entity SearchRecord(ManagedTokenOrganizationServiceProxy proxy, string[] lineData) => throw new NotImplementedException();