コード例 #1
0
        public static PolicyData GetPolicyData(IAirSyncUser user)
        {
            if (user == null)
            {
                throw new ArgumentNullException("user");
            }
            if (!ADNotificationManager.started)
            {
                throw new InvalidOperationException("ADNotificationManager should be started first!");
            }
            PolicyData policyData = null;

            if (user.ADUser.ActiveSyncMailboxPolicy != null)
            {
                policyData = ADNotificationManager.GetPolicySetting(user);
            }
            if (policyData == null)
            {
                policyData = ADNotificationManager.GetDefaultPolicySetting(user);
            }
            return(policyData);
        }