public DeviceAccessRuleData(ActiveSyncDeviceAccessRule deviceAccessRule)
 {
     this.Identity       = deviceAccessRule.OriginalId;
     this.QueryString    = deviceAccessRule.QueryString;
     this.Characteristic = deviceAccessRule.Characteristic;
     this.AccessLevel    = deviceAccessRule.AccessLevel;
 }
Esempio n. 2
0
        public DeviceAccessRule(ActiveSyncDeviceAccessRule rule) : base(rule)
        {
            switch (base.ActiveSyncDeviceAccessRule.Characteristic)
            {
            case DeviceAccessCharacteristic.DeviceType:
                this.deviceTypeQueryString = new DeviceAccessRuleQueryString
                {
                    QueryString = base.ActiveSyncDeviceAccessRule.QueryString
                };
                this.deviceModelQueryString = new DeviceAccessRuleQueryString
                {
                    IsWildcard  = true,
                    QueryString = Strings.DeviceModelPickerAll
                };
                return;

            case DeviceAccessCharacteristic.DeviceModel:
                this.deviceTypeQueryString = new DeviceAccessRuleQueryString
                {
                    IsWildcard  = true,
                    QueryString = Strings.DeviceTypePickerAll
                };
                this.deviceModelQueryString = new DeviceAccessRuleQueryString
                {
                    QueryString = base.ActiveSyncDeviceAccessRule.QueryString
                };
                return;

            case DeviceAccessCharacteristic.DeviceOS:
            case DeviceAccessCharacteristic.UserAgent:
                this.deviceTypeQueryString = new DeviceAccessRuleQueryString
                {
                    IsWildcard  = true,
                    QueryString = Strings.DeviceTypePickerAll
                };
                this.deviceModelQueryString = new DeviceAccessRuleQueryString
                {
                    IsWildcard  = true,
                    QueryString = Strings.DeviceTypePickerAll
                };
                return;

            default:
                throw new FaultException(Strings.InvalidDeviceAccessCharacteristic);
            }
        }
        void IOrganizationSettingsData.AddOrUpdateDeviceAccessRule(ActiveSyncDeviceAccessRule deviceAccessRule)
        {
            if (this.deviceAccessRules[(int)deviceAccessRule.Characteristic] == null)
            {
                this.deviceAccessRules[(int)deviceAccessRule.Characteristic] = new List <DeviceAccessRuleData>(10);
            }
            List <DeviceAccessRuleData> list = this.deviceAccessRules[(int)deviceAccessRule.Characteristic];
            DeviceAccessRuleData        deviceAccessRuleData = new DeviceAccessRuleData(deviceAccessRule);

            for (int i = 0; i < list.Count; i++)
            {
                if (list[i].Identity.Equals(deviceAccessRuleData.Identity))
                {
                    AirSyncDiagnostics.TraceInfo <DeviceAccessRuleData, ADObjectId>(ExTraceGlobals.RequestsTracer, this, "Updating rule {0} for Org {1} cache.", deviceAccessRuleData, this.Identity);
                    list[i] = deviceAccessRuleData;
                    return;
                }
            }
            AirSyncDiagnostics.TraceInfo <DeviceAccessRuleData, ADObjectId>(ExTraceGlobals.RequestsTracer, this, "Adding new rule {0} for Org {1} cache.", deviceAccessRuleData, this.Identity);
            list.Add(deviceAccessRuleData);
        }
 // Token: 0x06000803 RID: 2051 RVA: 0x0001D712 File Offset: 0x0001B912
 public ActiveSyncDeviceAccessRuleIdParameter(ActiveSyncDeviceAccessRule settings) : base(settings.Id)
 {
 }
Esempio n. 5
0
 public DeviceAccessRuleRow(ActiveSyncDeviceAccessRule rule) : base(rule)
 {
     this.ActiveSyncDeviceAccessRule = rule;
 }