コード例 #1
0
        // Token: 0x06000DF7 RID: 3575 RVA: 0x0004DFAC File Offset: 0x0004C1AC
        public PolicyData(MobileMailboxPolicy policy, bool useIrmEnabledPolicySetting)
        {
            this.identity = policy.OriginalId;
            this.allowNonProvisionableDevices       = policy.AllowNonProvisionableDevices;
            this.alphanumericDevicePasswordRequired = policy.AlphanumericPasswordRequired;
            this.attachmentsEnabled              = policy.AttachmentsEnabled;
            this.requireStorageCardEncryption    = policy.RequireStorageCardEncryption;
            this.devicePasswordEnabled           = policy.PasswordEnabled;
            this.passwordRecoveryEnabled         = policy.PasswordRecoveryEnabled;
            this.devicePolicyRefreshInterval     = policy.DevicePolicyRefreshInterval;
            this.allowSimpleDevicePassword       = policy.AllowSimplePassword;
            this.maxAttachmentSize               = policy.MaxAttachmentSize;
            this.wssAccessEnabled                = policy.WSSAccessEnabled;
            this.uncAccessEnabled                = policy.UNCAccessEnabled;
            this.minDevicePasswordLength         = policy.MinPasswordLength;
            this.maxInactivityTimeDeviceLock     = policy.MaxInactivityTimeLock;
            this.maxDevicePasswordFailedAttempts = policy.MaxPasswordFailedAttempts;
            this.devicePasswordExpiration        = policy.PasswordExpiration;
            this.devicePasswordHistory           = policy.PasswordHistory;
            this.isDefault                                = policy.IsDefault;
            this.allowStorageCard                         = policy.AllowStorageCard;
            this.allowCamera                              = policy.AllowCamera;
            this.requireDeviceEncryption                  = policy.RequireDeviceEncryption;
            this.allowUnsignedApplications                = policy.AllowUnsignedApplications;
            this.allowUnsignedInstallationPackages        = policy.AllowUnsignedInstallationPackages;
            this.allowWiFi                                = policy.AllowWiFi;
            this.allowTextMessaging                       = policy.AllowTextMessaging;
            this.allowPOPIMAPEmail                        = policy.AllowPOPIMAPEmail;
            this.allowIrDA                                = policy.AllowIrDA;
            this.requireManualSyncWhenRoaming             = policy.RequireManualSyncWhenRoaming;
            this.allowDesktopSync                         = policy.AllowDesktopSync;
            this.allowHTMLEmail                           = policy.AllowHTMLEmail;
            this.requireSignedSMIMEMessages               = policy.RequireSignedSMIMEMessages;
            this.requireEncryptedSMIMEMessages            = policy.RequireEncryptedSMIMEMessages;
            this.allowSMIMESoftCerts                      = policy.AllowSMIMESoftCerts;
            this.allowBrowser                             = policy.AllowBrowser;
            this.allowConsumerEmail                       = policy.AllowConsumerEmail;
            this.allowRemoteDesktop                       = policy.AllowRemoteDesktop;
            this.allowInternetSharing                     = policy.AllowInternetSharing;
            this.allowBluetooth                           = policy.AllowBluetooth;
            this.maxCalendarAgeFilter                     = policy.MaxCalendarAgeFilter;
            this.maxEmailAgeFilter                        = policy.MaxEmailAgeFilter;
            this.requireSignedSMIMEAlgorithm              = policy.RequireSignedSMIMEAlgorithm;
            this.requireEncryptionSMIMEAlgorithm          = policy.RequireEncryptionSMIMEAlgorithm;
            this.allowSMIMEEncryptionAlgorithmNegotiation = policy.AllowSMIMEEncryptionAlgorithmNegotiation;
            this.minDevicePasswordComplexCharacters       = policy.MinPasswordComplexCharacters;
            this.maxEmailBodyTruncationSize               = policy.MaxEmailBodyTruncationSize;
            this.maxEmailHTMLBodyTruncationSize           = policy.MaxEmailHTMLBodyTruncationSize;
            this.unapprovedInROMApplicationList           = policy.UnapprovedInROMApplicationList;
            this.approvedApplicationList                  = policy.ApprovedApplicationList;
            this.allowExternalDeviceManagement            = policy.AllowExternalDeviceManagement;
            this.MobileOTAUpdateMode                      = policy.MobileOTAUpdateMode;
            this.AllowMobileOTAUpdate                     = policy.AllowMobileOTAUpdate;
            this.isIrmEnabled                             = (useIrmEnabledPolicySetting && policy.IrmEnabled);
            string policyXml = ProvisionCommandPhaseOne.BuildEASProvisionDoc(20, out this.preversion121DeviceCompatibility, this) + policy.AllowNonProvisionableDevices;

            this.preversion121HashCode = PolicyData.GetPolicyHashCode(policyXml);
            policyXml = ProvisionCommandPhaseOne.BuildEASProvisionDoc(121, out this.version121DeviceCompatibility, this) + policy.AllowNonProvisionableDevices;
            this.version121HashCode = PolicyData.GetPolicyHashCode(policyXml);
        }
コード例 #2
0
        public override void HandleSyncStateVersioning(SyncState syncState)
        {
            if (syncState == null)
            {
                throw new ArgumentNullException("syncState");
            }
            if (syncState.BackendVersion == null)
            {
                return;
            }
            bool flag = true;

            if (syncState.BackendVersion < 2 || syncState.BackendVersion > this.Version)
            {
                flag = false;
            }
            else if (syncState.BackendVersion.Value != this.Version)
            {
                string text = null;
                switch (syncState.BackendVersion.Value)
                {
                case 2:
                    syncState["WipeConfirmationAddresses"] = null;
                    break;

                case 3:
                    break;

                case 4:
                    goto IL_14F;

                case 5:
                case 6:
                case 7:
                case 8:
                case 9:
                case 10:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                case 18:
                case 19:
                    goto IL_3B6;

                case 20:
                    goto IL_16C;

                case 21:
                    goto IL_184;

                case 22:
                    goto IL_1A6;

                case 23:
                    goto IL_1D2;

                case 24:
                    goto IL_1EF;

                case 25:
                    goto IL_1FA;

                case 26:
                    goto IL_212;

                case 27:
                    goto IL_259;

                case 28:
                    goto IL_2D8;

                case 29:
                    goto IL_2E4;

                case 30:
                    goto IL_2EF;

                case 31:
                    goto IL_2FB;

                case 32:
                    goto IL_306;

                case 33:
                    goto IL_312;

                case 34:
                    goto IL_31E;

                case 35:
                    goto IL_32A;

                case 36:
                    goto IL_358;

                case 37:
                    goto IL_39E;

                default:
                    goto IL_3B6;
                }
                syncState[CustomStateDatumType.UserAgent] = null;
IL_14F:
                syncState["LastAdUpdateTime"] = null;
                syncState["DeviceHealth"]     = new Int32Data(0);
IL_16C:
                text = syncState.GetData <StringData, string>("LastPolicyXML", null);
                syncState.Remove("LastPolicyXML");
IL_184:
                syncState["ProvisionSupported"] = new BooleanData(syncState.GetData <UInt32Data, uint>("PolicyKeyOnDevice", 0U) != 0U);
IL_1A6:
                syncState["LastPolicyXMLHash"] = ((text == null) ? null : new NullableData <Int32Data, int>(new int?(PolicyData.GetPolicyHashCode(text + true))));
IL_1D2:
                syncState["DeviceEnableOutboundSMS"] = new BooleanData(false);
                syncState["DeviceMobileOperator"]    = null;
IL_1EF:
                syncState.Remove("LastAdUpdateTime");
IL_1FA:
                syncState["ClientAlternateMailboxInformationVersion"] = null;
                syncState["DeviceUMRegisteredPhoneNumber"]            = null;
IL_212:
                syncState["HaveSentBoostrapMailForWM61"] = new BooleanData(false);
                if (syncState.BackendVersion.Value < 20)
                {
                    syncState["SSUpgradeDateTime"] = new DateTimeData(ExDateTime.UtcNow);
                }
                else
                {
                    syncState["SSUpgradeDateTime"] = null;
                }
IL_259:
                syncState.Remove("DeviceHealth");
                syncState["DeviceAccessState"]             = new Int32Data(0);
                syncState["DeviceAccessStateReason"]       = new Int32Data(0);
                syncState["DevicePolicyApplied"]           = null;
                syncState["DevicePolicyApplicationStatus"] = new Int32Data(0);
                syncState["LastDeviceWipeRequestor"]       = null;
                syncState["DeviceActiveSyncVersion"]       = null;
                syncState["ADDeviceInfoHash"]          = null;
                syncState["DeviceInformationReceived"] = new BooleanData(false);
IL_2D8:
                syncState["ADCreationTime"] = null;
IL_2E4:
                syncState.Remove("DeviceUMRegisteredPhoneNumber");
IL_2EF:
                syncState["NextTimeToClearMailboxLogs"] = null;
IL_2FB:
                syncState.Remove("ClientAlternateMailboxInformationVersion");
IL_306:
                syncState["DeviceADObjectId"] = null;
IL_312:
                syncState["BootstrapMailForWM61TriggeredTime"] = null;
IL_31E:
                syncState["UserADObjectId"] = null;
IL_32A:
                syncState["ABQMailId"]    = null;
                syncState["ABQMailState"] = new Int32Data(0);
                syncState["DeviceInformationPromoted"] = new BooleanData(false);
IL_358:
                syncState["DevicePhoneNumberForSms"] = ((syncState["DevicePhoneNumber"] != null) ? new StringData(((StringData)syncState["DevicePhoneNumber"]).Data) : null);
                syncState["SmsSearchFolderCreated"]  = new BooleanData(false);
IL_39E:
                syncState["DeviceBehavior"] = new DeviceBehaviorData(new DeviceBehavior(true));
                goto IL_3B8;
IL_3B6:
                flag = false;
            }
IL_3B8:
            if (!flag)
            {
                syncState.HandleCorruptSyncState();
            }
        }