private static void SetUserScopeImpl(Task task)
        {
            if (ProvisioningLayer.Disabled || !task.IsProvisioningLayerAvailable)
            {
                return;
            }
            UserScopeFlags userScopeFlags = UserScopeFlags.None;

            if (task.ExchangeRunspaceConfig == null)
            {
                userScopeFlags |= UserScopeFlags.Local;
            }
            string     userId = null;
            ADObjectId adobjectId;

            if (task.ExchangeRunspaceConfig != null)
            {
                userId = task.ExchangeRunspaceConfig.IdentityName;
            }
            else if (task.TryGetExecutingUserId(out adobjectId))
            {
                userId = adobjectId.ToString();
            }
            UserScope userScope = new UserScope(userId, task.ExecutingUserOrganizationId, task.CurrentOrganizationId, userScopeFlags, task.ScopeSet);

            for (int i = 0; i < task.ProvisioningHandlers.Length; i++)
            {
                task.ProvisioningHandlers[i].UserScope = userScope;
            }
        }
 // Token: 0x060011F2 RID: 4594 RVA: 0x00037891 File Offset: 0x00035A91
 public UserScope(string userId, OrganizationId executingUserOrganizationId, OrganizationId currentOrganizationId, UserScopeFlags flags) : this(userId, executingUserOrganizationId, currentOrganizationId, flags, null)
 {
 }
 // Token: 0x060011F1 RID: 4593 RVA: 0x00037864 File Offset: 0x00035A64
 internal UserScope(string userId, OrganizationId executingUserOrganizationId, OrganizationId currentOrganizationId, UserScopeFlags flags, ScopeSet currentScopeSet)
 {
     this.userId = userId;
     this.executingUserOrganizationId = executingUserOrganizationId;
     this.currentOrganizationId       = currentOrganizationId;
     this.CurrentScopeSet             = currentScopeSet;
     this.flags = flags;
 }