示例#1
0
 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());
 }
示例#2
0
        public JobExecutionContext(ManagedTokenOrganizationServiceProxy proxy)
        {
            Proxy      = proxy;
            Properties = new Dictionary <string, string>();

            DumpProxyToMetrics(proxy);
        }
示例#3
0
        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);
        }
示例#6
0
 public virtual Entity SearchRecord(ManagedTokenOrganizationServiceProxy proxy, string[] lineData) => throw new NotImplementedException();