Beispiel #1
0
        private VariantConfigurationSnapshot GetDiagnosticInfoSnapshot(SettingOverrideSync.SettingOverrideDiagnosableArgument argument, out string error)
        {
            IConstraintProvider constraintProvider = MachineSettingsContext.Local;

            if (argument.HasArgument("user"))
            {
                string userId = argument.GetArgument <string>("user");
                if (!string.IsNullOrWhiteSpace(userId))
                {
                    string orgId = null;
                    if (argument.HasArgument("org"))
                    {
                        orgId = argument.GetArgument <string>("org");
                    }
                    if (VariantConfiguration.GetSnapshot(MachineSettingsContext.Local, null, null).Global.MultiTenancy.Enabled&& string.IsNullOrEmpty(orgId))
                    {
                        error = "Org is required.";
                        return(null);
                    }
                    ADUser user = null;
                    ADNotificationAdapter.TryRunADOperation(delegate()
                    {
                        user = new SettingOverrideSync.UserResolver(userId, orgId).Resolve();
                    }, 3);
                    if (user == null)
                    {
                        error = "User not found.";
                        return(null);
                    }
                    constraintProvider = user.GetContext(null);
                }
            }
            error = null;
            return(VariantConfiguration.GetSnapshot(constraintProvider, null, null));
        }
Beispiel #2
0
 public GroupEscalationFlightInfo(IConstraintProvider constraintProvider)
 {
     this.constraintProvider = constraintProvider;
 }
Beispiel #3
0
        private IConversationCreatorSidCalculator Create(IMailboxSession mailboxSession, IConstraintProvider constraintProvider)
        {
            VariantConfigurationSnapshot snapshot = VariantConfiguration.GetSnapshot(constraintProvider, null, null);

            if (snapshot.DataStorage.DeleteGroupConversation.Enabled)
            {
                ICoreConversationFactory <IConversation> conversationFactory = new CachedConversationFactory(mailboxSession);
                return(new ConversationCreatorSidCalculator(this.xsoFactory, mailboxSession, conversationFactory));
            }
            return(new LegacyConversationCreatorSidCalculator(mailboxSession));
        }
 public MiniRecipientMailboxOwnerAdapter(MiniRecipient miniRecipient, IConstraintProvider constraintProvider, RecipientTypeDetails recipientTypeDetails, LogonType logonType) : base(constraintProvider, recipientTypeDetails, logonType)
 {
     this.miniRecipient = miniRecipient;
 }
 public ExchangePrincipalMailboxOwnerAdapter(IExchangePrincipal principal, IConstraintProvider constraintProvider, RecipientTypeDetails recipientTypeDetails, LogonType logonType) : base(constraintProvider, recipientTypeDetails, logonType)
 {
     this.principal = principal;
 }
 protected MailboxOwnerAdapter(IConstraintProvider constraintProvider, RecipientTypeDetails recipientTypeDetails, LogonType logonType)
 {
     this.recipientTypeDetails = recipientTypeDetails;
     this.logonType            = logonType;
     this.constraintProvider   = constraintProvider;
 }