コード例 #1
0
        internal static void InitExchangePropertyContainer(ISessionState sessionState, OrganizationId currentExecutingOrgId, ADObjectId currentExecutingUserId)
        {
            ExchangePropertyContainer exchangePropertyContainer = new ExchangePropertyContainer();

            exchangePropertyContainer.executingUserOrganizationId = currentExecutingOrgId;
            exchangePropertyContainer.executingUserId             = currentExecutingUserId;
            if (sessionState.Variables.ContainsName(ExchangePropertyContainer.ADServerSettingsVarName))
            {
                exchangePropertyContainer.serverSettings = (sessionState.Variables[ExchangePropertyContainer.ADServerSettingsVarName] as ADServerSettings);
            }
            ExchangePropertyContainer.SetExchangePropertyContainer(sessionState, exchangePropertyContainer);
        }
コード例 #2
0
        internal static void InitExchangePropertyContainer(ISessionState sessionState, ExchangeRunspaceConfiguration configuration)
        {
            ExchangePropertyContainer exchangePropertyContainer = new ExchangePropertyContainer();

            exchangePropertyContainer.exchangeRunspaceConfiguration = configuration;
            exchangePropertyContainer.budget = ExchangePropertyContainer.AcquirePowerShellBudget(configuration);
            if (sessionState.Variables.ContainsName(ExchangePropertyContainer.ADServerSettingsVarName))
            {
                exchangePropertyContainer.serverSettings = (sessionState.Variables[ExchangePropertyContainer.ADServerSettingsVarName] as ADServerSettings);
            }
            ExchangePropertyContainer.SetExchangePropertyContainer(sessionState, exchangePropertyContainer);
        }