public ServiceContextBase(IOrganizationService service)
        {
            LogHelper = new LogHelper(Console.WriteLine);
            AdminOrganizationService = service;
            OrganizationService = service;

            var response = (WhoAmIResponse)service.Execute(new WhoAmIRequest());
            UserId = response.UserId;
            InitiatingUserId = response.UserId;
            BusinessUnitRef = new EntityReference(BusinessUnitDefinition.EntityName, response.BusinessUnitId);
        }
 public ServiceContextBase(IOrganizationService service, IOrganizationService adminService, TraceLogger log)
     : this(service)
 {
     LogHelper = new LogHelper(log);
     AdminOrganizationService = adminService;
 }
예제 #3
0
 public void Log(string message, params object[] paramsObject)
 {
     LogHelper.LogMethod(message, paramsObject);
 }
예제 #4
0
 public ServiceContextBase(IOrganizationService service, IOrganizationService adminService, TraceLogger log)
     : this(service)
 {
     LogHelper = new LogHelper(log);
     AdminOrganizationService = adminService;
 }