1 //------------------------------------------------------------------------------
2 // <copyright file="MobileCapabilities.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //------------------------------------------------------------------------------
6 
7 namespace System.Web.Mobile
8 {
9     using System.Web;
10     using System.Collections;
11     using System.Configuration;
12     using System.Reflection;
13     using System.Diagnostics;
14     using System.ComponentModel;
15     using System.Globalization;
16     using System.Security.Permissions;
17 
18     /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities"]/*' />
19     [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
20     [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
21     [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]
22     public class MobileCapabilities : HttpBrowserCapabilities
23     {
EvaluateCapabilitiesDelegate(MobileCapabilities capabilities, String evalParameter)24         internal delegate bool EvaluateCapabilitiesDelegate(MobileCapabilities capabilities,
25             String evalParameter);
26 
27         private Hashtable _evaluatorResults = Hashtable.Synchronized(new Hashtable());
28 
29         private const String _kDeviceFiltersConfig = "system.web/deviceFilters";
30         private static readonly object _staticLock = new object();
31 
32         [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
33 		[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
34 		[ConfigurationPermission(SecurityAction.Assert, Unrestricted = true)]
GetCurrentFilters()35 		private DeviceFilterDictionary GetCurrentFilters()
36         {
37             object config = ConfigurationManager.GetSection(_kDeviceFiltersConfig);
38             DeviceFiltersSection controlSection = config as DeviceFiltersSection;
39             if (controlSection != null)
40             {
41                 return controlSection.GetDeviceFilters();
42             }
43             return (DeviceFilterDictionary)config;
44         }
45 
HasComparisonEvaluator(String evaluatorName, out bool result)46         private bool HasComparisonEvaluator(String evaluatorName, out bool result)
47         {
48             result = false;
49             String evaluator;
50             String argument;
51 
52             DeviceFilterDictionary currentFilters = GetCurrentFilters();
53             if(currentFilters == null)
54             {
55                 return false;
56             }
57 
58             if(!currentFilters.FindComparisonEvaluator(evaluatorName, out evaluator, out argument))
59             {
60                 return false;
61             }
62 
63             result = HasCapability(evaluator, argument);
64 
65             return true;
66         }
67 
68 
HasDelegatedEvaluator(String evaluatorName, String parameter, out bool result)69         private bool HasDelegatedEvaluator(String evaluatorName, String parameter,
70             out bool result)
71         {
72             result = false;
73             EvaluateCapabilitiesDelegate evaluator;
74 
75             DeviceFilterDictionary currentFilters = GetCurrentFilters();
76             if(currentFilters == null)
77             {
78                 return false;
79             }
80 
81             if(!currentFilters.FindDelegateEvaluator(evaluatorName, out evaluator))
82             {
83                 return false;
84             }
85 
86             result = evaluator(this, parameter);
87 
88             return true;
89         }
90 
91 
HasItem(String evaluatorName, String parameter, out bool result)92         private bool HasItem(String evaluatorName, String parameter,
93             out bool result)
94         {
95             result = false;
96             String item;
97 
98             item = this[evaluatorName];
99             if(item == null)
100             {
101                 return false;
102             }
103 
104             result = (item == parameter);
105             return true;
106         }
107 
108 
HasProperty(String evaluatorName, String parameter, out bool result)109         private bool HasProperty(String evaluatorName, String parameter,
110             out bool result)
111         {
112             result = false;
113             PropertyDescriptor propertyDescriptor =
114                 TypeDescriptor.GetProperties(this)[evaluatorName];
115             if(propertyDescriptor == null)
116             {
117                 return false;
118             }
119 
120             String propertyValue = propertyDescriptor.GetValue(this).ToString();
121             bool invariantCultureIgnoreCase = (propertyDescriptor.PropertyType == typeof(bool) && parameter != null);
122             StringComparison compareOption = invariantCultureIgnoreCase ? StringComparison.InvariantCultureIgnoreCase : StringComparison.CurrentCulture;
123             result = (String.Equals(propertyValue, parameter, compareOption));
124             return true;
125         }
126 
127 
IsComparisonEvaluator(String evaluatorName)128         private bool IsComparisonEvaluator(String evaluatorName)
129         {
130             DeviceFilterDictionary currentFilters = GetCurrentFilters();
131 
132             if(currentFilters == null)
133             {
134                 return false;
135             }
136             else
137             {
138                 return currentFilters.IsComparisonEvaluator(evaluatorName) &&
139                     !currentFilters.IsDelegateEvaluator(evaluatorName);
140             }
141         }
142 
143 
144         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.HasCapability"]/*' />
HasCapability(String delegateName, String optionalParameter)145         public bool HasCapability(String delegateName, String optionalParameter)
146         {
147             bool result;
148             bool resultFound;
149 
150             if(String.IsNullOrEmpty(delegateName))
151             {
152                 throw new ArgumentException(SR.GetString(SR.MobCap_DelegateNameNoValue),
153                                             "delegateName");
154             }
155 
156             // Check for cached results
157 
158             DeviceFilterDictionary currentFilters = GetCurrentFilters();
159             String hashKey = ((currentFilters == null) ? "null" : currentFilters.GetHashCode().ToString(CultureInfo.InvariantCulture))
160                 + delegateName;
161 
162             if(optionalParameter != null && !IsComparisonEvaluator(delegateName))
163             {
164                 hashKey += optionalParameter;
165             }
166 
167             if (_evaluatorResults.Contains(hashKey))
168             {
169                 return (bool)_evaluatorResults[hashKey];
170             }
171 
172             lock (_staticLock)
173             {
174                 if (_evaluatorResults.Contains(hashKey))
175                 {
176                     return (bool)_evaluatorResults[hashKey];
177                 }
178 
179                 // Note: The fact that delegate evaluators are checked before comparison evaluators
180                 // determines the implementation of IsComparisonEvaluator above.
181 
182                 resultFound = HasDelegatedEvaluator(delegateName, optionalParameter, out result);
183 
184                 if (!resultFound)
185                 {
186                     resultFound = HasComparisonEvaluator(delegateName, out result);
187 
188                     if (!resultFound)
189                     {
190                         resultFound = HasProperty(delegateName, optionalParameter, out result);
191 
192                         if (!resultFound)
193                         {
194                             resultFound = HasItem(delegateName, optionalParameter, out result);
195                         }
196                     }
197                 }
198 
199                 if (resultFound)
200                 {
201                     _evaluatorResults.Add(hashKey, result);
202                 }
203                 else
204                 {
205                     throw new ArgumentOutOfRangeException(
206                         "delegateName",
207                         SR.GetString(SR.MobCap_CantFindCapability, delegateName));
208                 }
209 
210                 return result;
211             }
212         }
213 
214 
215         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.MobileDeviceManufacturer"]/*' />
216 /*        public virtual String MobileDeviceManufacturer
217         {
218             get
219             {
220                 if(!_haveMobileDeviceManufacturer)
221                 {
222                     _mobileDeviceManufacturer = this["mobileDeviceManufacturer"];
223                     _haveMobileDeviceManufacturer = true;
224                 }
225                 return _mobileDeviceManufacturer;
226             }
227         }
228 
229 
230         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.MobileDeviceModel"]/*' />
231         public virtual String MobileDeviceModel
232         {
233             get
234             {
235                 if(!_haveMobileDeviceModel)
236                 {
237                     _mobileDeviceModel = this["mobileDeviceModel"];
238                     _haveMobileDeviceModel = true;
239                 }
240                 return _mobileDeviceModel;
241             }
242         }
243 
244 
245         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.GatewayVersion"]/*' />
246         public virtual String GatewayVersion
247         {
248             get
249             {
250                 if(!_haveGatewayVersion)
251                 {
252                     _gatewayVersion = this["gatewayVersion"];
253                     _haveGatewayVersion = true;
254                 }
255                 return _gatewayVersion;
256             }
257         }
258 
259 
260         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.GatewayMajorVersion"]/*' />
261         public virtual int GatewayMajorVersion
262         {
263             get
264             {
265                 if(!_haveGatewayMajorVersion)
266                 {
267                     _gatewayMajorVersion = Convert.ToInt32(this["gatewayMajorVersion"]);
268                     _haveGatewayMajorVersion = true;
269                 }
270                 return _gatewayMajorVersion;
271             }
272         }
273 
274 
275         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.GatewayMinorVersion"]/*' />
276         public virtual double GatewayMinorVersion
277         {
278             get
279             {
280                 if(!_haveGatewayMinorVersion)
281                 {
282                     // The conversion below does not use Convert.ToDouble()
283                     // because it depends on the current locale.  So a german machine it would look for
284                     // a comma as a seperator "1,5" where all user-agent strings use english
285                     // decimal points "1.5".  URT11176
286                     //
287                     _gatewayMinorVersion = double.Parse(
288                                         this["gatewayMinorVersion"],
289                                         NumberStyles.Float | NumberStyles.AllowDecimalPoint,
290                                         NumberFormatInfo.InvariantInfo);
291                     _haveGatewayMinorVersion = true;
292                 }
293                 return _gatewayMinorVersion;
294             }
295         }
296 
297 */
298         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.PreferredRenderingTypeHtml32"]/*' />
299         public static readonly String PreferredRenderingTypeHtml32 = "html32";
300         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.PreferredRenderingTypeWml11"]/*' />
301         public static readonly String PreferredRenderingTypeWml11 = "wml11";
302         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.PreferredRenderingTypeWml12"]/*' />
303         public static readonly String PreferredRenderingTypeWml12 = "wml12";
304         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.PreferredRenderingTypeChtml10"]/*' />
305         public static readonly String PreferredRenderingTypeChtml10 = "chtml10";
306 
307 /*
308         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.PreferredRenderingType"]/*' />
309         public virtual String PreferredRenderingType
310         {
311             get
312             {
313                 if(!_havePreferredRenderingType)
314                 {
315                     _preferredRenderingType = this["preferredRenderingType"];
316                     _havePreferredRenderingType = true;
317                 }
318                 return _preferredRenderingType;
319             }
320         }
321 
322         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.PreferredRenderingMime"]/*' />
323         public virtual String PreferredRenderingMime
324         {
325             get
326             {
327                 if(!_havePreferredRenderingMime)
328                 {
329                     _preferredRenderingMime = this["preferredRenderingMime"];
330                     _havePreferredRenderingMime = true;
331                 }
332                 return _preferredRenderingMime;
333             }
334         }
335 
336 
337         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.PreferredImageMime"]/*' />
338         public virtual String PreferredImageMime
339         {
340             get
341             {
342                 if(!_havePreferredImageMime)
343                 {
344                     _preferredImageMime = this["preferredImageMime"];
345                     _havePreferredImageMime = true;
346                 }
347                 return _preferredImageMime;
348             }
349         }
350 
351 
352         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.ScreenCharactersWidth"]/*' />
353         public virtual int ScreenCharactersWidth
354         {
355             get
356             {
357                 if(!_haveScreenCharactersWidth)
358                 {
359                     if(this["screenCharactersWidth"] == null)
360                     {
361                         // calculate from best partial information
362 
363                         int screenPixelsWidthToUse = 640;
364                         int characterWidthToUse = 8;
365 
366                         if(this["screenPixelsWidth"] != null && this["characterWidth"] != null)
367                         {
368                             screenPixelsWidthToUse = Convert.ToInt32(this["screenPixelsWidth"]);
369                             characterWidthToUse = Convert.ToInt32(this["characterWidth"]);
370                         }
371                         else if(this["screenPixelsWidth"] != null)
372                         {
373                             screenPixelsWidthToUse = Convert.ToInt32(this["screenPixelsWidth"]);
374                             characterWidthToUse = Convert.ToInt32(this["defaultCharacterWidth"]);
375                         }
376                         else if(this["characterWidth"] != null)
377                         {
378                             screenPixelsWidthToUse = Convert.ToInt32(this["defaultScreenPixelsWidth"]);
379                             characterWidthToUse = Convert.ToInt32(this["characterWidth"]);
380                         }
381                         else if(this["defaultScreenCharactersWidth"] != null)
382                         {
383                             screenPixelsWidthToUse = Convert.ToInt32(this["defaultScreenCharactersWidth"]);
384                             characterWidthToUse = 1;
385                         }
386 
387                         _screenCharactersWidth = screenPixelsWidthToUse / characterWidthToUse;
388                     }
389                     else
390                     {
391                         _screenCharactersWidth = Convert.ToInt32(this["screenCharactersWidth"]);
392                     }
393                     _haveScreenCharactersWidth = true;
394                 }
395                 return _screenCharactersWidth;
396             }
397         }
398 
399 
400         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.ScreenCharactersHeight"]/*' />
401         public virtual int ScreenCharactersHeight
402         {
403             get
404             {
405                 if(!_haveScreenCharactersHeight)
406                 {
407                     if(this["screenCharactersHeight"] == null)
408                     {
409                         // calculate from best partial information
410 
411                         int screenPixelHeightToUse = 480;
412                         int characterHeightToUse = 12;
413 
414                         if(this["screenPixelsHeight"] != null && this["characterHeight"] != null)
415                         {
416                             screenPixelHeightToUse = Convert.ToInt32(this["screenPixelsHeight"]);
417                             characterHeightToUse = Convert.ToInt32(this["characterHeight"]);
418                         }
419                         else if(this["screenPixelsHeight"] != null)
420                         {
421                             screenPixelHeightToUse = Convert.ToInt32(this["screenPixelsHeight"]);
422                             characterHeightToUse = Convert.ToInt32(this["defaultCharacterHeight"]);
423                         }
424                         else if(this["characterHeight"] != null)
425                         {
426                             screenPixelHeightToUse = Convert.ToInt32(this["defaultScreenPixelsHeight"]);
427                             characterHeightToUse = Convert.ToInt32(this["characterHeight"]);
428                         }
429                         else if(this["defaultScreenCharactersHeight"] != null)
430                         {
431                             screenPixelHeightToUse = Convert.ToInt32(this["defaultScreenCharactersHeight"]);
432                             characterHeightToUse = 1;
433                         }
434 
435                         _screenCharactersHeight = screenPixelHeightToUse / characterHeightToUse;
436                     }
437                     else
438                     {
439                         _screenCharactersHeight = Convert.ToInt32(this["screenCharactersHeight"]);
440                     }
441                     _haveScreenCharactersHeight = true;
442                 }
443                 return _screenCharactersHeight;
444             }
445         }
446 
447 
448         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.ScreenPixelsWidth"]/*' />
449         public virtual int ScreenPixelsWidth
450         {
451             get
452             {
453                 if(!_haveScreenPixelsWidth)
454                 {
455                     if(this["screenPixelsWidth"] == null)
456                     {
457                         // calculate from best partial information
458 
459                         int screenCharactersWidthToUse = 80;
460                         int characterWidthToUse = 8;
461 
462                         if(this["screenCharactersWidth"] != null && this["characterWidth"] != null)
463                         {
464                             screenCharactersWidthToUse = Convert.ToInt32(this["screenCharactersWidth"]);
465                             characterWidthToUse = Convert.ToInt32(this["characterWidth"]);
466                         }
467                         else if(this["screenCharactersWidth"] != null)
468                         {
469                             screenCharactersWidthToUse = Convert.ToInt32(this["screenCharactersWidth"]);
470                             characterWidthToUse = Convert.ToInt32(this["defaultCharacterWidth"]);
471                         }
472                         else if(this["characterWidth"] != null)
473                         {
474                             screenCharactersWidthToUse = Convert.ToInt32(this["defaultScreenCharactersWidth"]);
475                             characterWidthToUse = Convert.ToInt32(this["characterWidth"]);
476                         }
477                         else if(this["defaultScreenPixelsWidth"] != null)
478                         {
479                             screenCharactersWidthToUse = Convert.ToInt32(this["defaultScreenPixelsWidth"]);
480                             characterWidthToUse = 1;
481                         }
482 
483                         _screenPixelsWidth = screenCharactersWidthToUse * characterWidthToUse;
484                     }
485                     else
486                     {
487                         _screenPixelsWidth = Convert.ToInt32(this["screenPixelsWidth"]);
488                     }
489                     _haveScreenPixelsWidth = true;
490                 }
491                 return _screenPixelsWidth;
492             }
493         }
494 
495 
496         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.ScreenPixelsHeight"]/*' />
497         public virtual int ScreenPixelsHeight
498         {
499             get
500             {
501                 if(!_haveScreenPixelsHeight)
502                 {
503                     if(this["screenPixelsHeight"] == null)
504                     {
505                         int screenCharactersHeightToUse = 480 / 12;
506                         int characterHeightToUse = 12;
507 
508                         if(this["screenCharactersHeight"] != null && this["characterHeight"] != null)
509                         {
510                             screenCharactersHeightToUse = Convert.ToInt32(this["screenCharactersHeight"]);
511                             characterHeightToUse = Convert.ToInt32(this["characterHeight"]);
512                         }
513                         else if(this["screenCharactersHeight"] != null)
514                         {
515                             screenCharactersHeightToUse = Convert.ToInt32(this["screenCharactersHeight"]);
516                             characterHeightToUse = Convert.ToInt32(this["defaultCharacterHeight"]);
517                         }
518                         else if(this["characterHeight"] != null)
519                         {
520                             screenCharactersHeightToUse = Convert.ToInt32(this["defaultScreenCharactersHeight"]);
521                             characterHeightToUse = Convert.ToInt32(this["characterHeight"]);
522                         }
523                         else if(this["defaultScreenPixelsHeight"] != null)
524                         {
525                             screenCharactersHeightToUse = Convert.ToInt32(this["defaultScreenPixelsHeight"]);
526                             characterHeightToUse = 1;
527                         }
528 
529                         _screenPixelsHeight = screenCharactersHeightToUse * characterHeightToUse;
530                     }
531                     else
532                     {
533                         _screenPixelsHeight = Convert.ToInt32(this["screenPixelsHeight"]);
534                     }
535                     _haveScreenPixelsHeight = true;
536                 }
537                 return _screenPixelsHeight;
538             }
539         }
540 
541 
542         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.ScreenBitDepth"]/*' />
543         public virtual int ScreenBitDepth
544         {
545             get
546             {
547                 if(!_haveScreenBitDepth)
548                 {
549                     _screenBitDepth = Convert.ToInt32(this["screenBitDepth"]);
550                     _haveScreenBitDepth = true;
551                 }
552                 return _screenBitDepth;
553             }
554         }
555 
556 
557         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.IsColor"]/*' />
558         public virtual bool IsColor
559         {
560             get
561             {
562                 if(!_haveIsColor)
563                 {
564                     String isColorString = this["isColor"];
565                     if(isColorString == null)
566                     {
567                         _isColor = false;
568                     }
569                     else
570                     {
571                         _isColor = Convert.ToBoolean(this["isColor"]);
572                     }
573                     _haveIsColor = true;
574                 }
575                 return _isColor;
576             }
577         }
578 
579 
580         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.InputType"]/*' />
581         public virtual String InputType
582         {
583             get
584             {
585                 if(!_haveInputType)
586                 {
587                     _inputType = this["inputType"];
588                     _haveInputType = true;
589                 }
590                 return _inputType;
591             }
592         }
593 
594 
595         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.NumberOfSoftkeys"]/*' />
596         public virtual int NumberOfSoftkeys
597         {
598             get
599             {
600                 if(!_haveNumberOfSoftkeys)
601                 {
602                     _numberOfSoftkeys = Convert.ToInt32(this["numberOfSoftkeys"]);
603                     _haveNumberOfSoftkeys = true;
604                 }
605                 return _numberOfSoftkeys;
606             }
607         }
608 
609 
610         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.MaximumSoftkeyLabelLength"]/*' />
611         public virtual int MaximumSoftkeyLabelLength
612         {
613             get
614             {
615                 if(!_haveMaximumSoftkeyLabelLength)
616                 {
617                     _maximumSoftkeyLabelLength = Convert.ToInt32(this["maximumSoftkeyLabelLength"]);
618                     _haveMaximumSoftkeyLabelLength = true;
619                 }
620                 return _maximumSoftkeyLabelLength;
621             }
622         }
623 
624 
625         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.CanInitiateVoiceCall"]/*' />
626         public virtual bool CanInitiateVoiceCall
627         {
628             get
629             {
630                 if(!_haveCanInitiateVoiceCall)
631                 {
632                     String canInitiateVoiceCallString = this["canInitiateVoiceCall"];
633                     if(canInitiateVoiceCallString == null)
634                     {
635                         _canInitiateVoiceCall = false;
636                     }
637                     else
638                     {
639                         _canInitiateVoiceCall = Convert.ToBoolean(canInitiateVoiceCallString);
640                     }
641                     _haveCanInitiateVoiceCall = true;
642                 }
643                 return _canInitiateVoiceCall;
644             }
645         }
646 
647 
648         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.CanSendMail"]/*' />
649         public virtual bool CanSendMail
650         {
651             get
652             {
653                 if(!_haveCanSendMail)
654                 {
655                     String canSendMailString = this["canSendMail"];
656                     if(canSendMailString == null)
657                     {
658                         _canSendMail = true;
659                     }
660                     else
661                     {
662                         _canSendMail = Convert.ToBoolean(canSendMailString);
663                     }
664                     _haveCanSendMail = true;
665                 }
666                 return _canSendMail;
667             }
668         }
669 
670         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.HasBackButton"]/*' />
671         public virtual bool HasBackButton
672         {
673             get
674             {
675                 if(!_haveHasBackButton)
676                 {
677                     String hasBackButtonString = this["hasBackButton"];
678                     if(hasBackButtonString == null)
679                     {
680                         _hasBackButton = true;
681                     }
682                     else
683                     {
684                         _hasBackButton = Convert.ToBoolean(hasBackButtonString);
685                     }
686                     _haveHasBackButton = true;
687                 }
688                 return _hasBackButton;
689             }
690         }
691 
692         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RendersWmlDoAcceptsInline"]/*' />
693         public virtual bool RendersWmlDoAcceptsInline
694         {
695             get
696             {
697                 if(!_haveRendersWmlDoAcceptsInline)
698                 {
699                     String rendersWmlDoAcceptsInlineString = this["rendersWmlDoAcceptsInline"];
700                     if(rendersWmlDoAcceptsInlineString == null)
701                     {
702                         _rendersWmlDoAcceptsInline = true;
703                     }
704                     else
705                     {
706                         _rendersWmlDoAcceptsInline = Convert.ToBoolean(rendersWmlDoAcceptsInlineString);
707                     }
708                     _haveRendersWmlDoAcceptsInline = true;
709                 }
710                 return _rendersWmlDoAcceptsInline;
711             }
712         }
713 
714         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RendersWmlSelectsAsMenuCards"]/*' />
715         public virtual bool RendersWmlSelectsAsMenuCards
716         {
717             get
718             {
719                 if(!_haveRendersWmlSelectsAsMenuCards)
720                 {
721                     String rendersWmlSelectsAsMenuCardsString = this["rendersWmlSelectsAsMenuCards"];
722                     if(rendersWmlSelectsAsMenuCardsString == null)
723                     {
724                         _rendersWmlSelectsAsMenuCards = false;
725                     }
726                     else
727                     {
728                         _rendersWmlSelectsAsMenuCards = Convert.ToBoolean(rendersWmlSelectsAsMenuCardsString);
729                     }
730                     _haveRendersWmlSelectsAsMenuCards = true;
731                 }
732                 return _rendersWmlSelectsAsMenuCards;
733             }
734         }
735 
736         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RendersBreaksAfterWmlAnchor"]/*' />
737         public virtual bool RendersBreaksAfterWmlAnchor
738         {
739             get
740             {
741                 if(!_haveRendersBreaksAfterWmlAnchor)
742                 {
743                     String rendersBreaksAfterWmlAnchorString = this["rendersBreaksAfterWmlAnchor"];
744                     if(rendersBreaksAfterWmlAnchorString == null)
745                     {
746                         _rendersBreaksAfterWmlAnchor = true;
747                     }
748                     else
749                     {
750                         _rendersBreaksAfterWmlAnchor = Convert.ToBoolean(rendersBreaksAfterWmlAnchorString);
751                     }
752                     _haveRendersBreaksAfterWmlAnchor = true;
753                 }
754                 return _rendersBreaksAfterWmlAnchor;
755             }
756         }
757 
758         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RendersBreaksAfterWmlInput"]/*' />
759         public virtual bool RendersBreaksAfterWmlInput
760         {
761             get
762             {
763                 if(!_haveRendersBreaksAfterWmlInput)
764                 {
765                     String rendersBreaksAfterWmlInputString = this["rendersBreaksAfterWmlInput"];
766                     if(rendersBreaksAfterWmlInputString == null)
767                     {
768                         _rendersBreaksAfterWmlInput = true;
769                     }
770                     else
771                     {
772                         _rendersBreaksAfterWmlInput = Convert.ToBoolean(rendersBreaksAfterWmlInputString);
773                     }
774                     _haveRendersBreaksAfterWmlInput = true;
775                 }
776                 return _rendersBreaksAfterWmlInput;
777             }
778         }
779 
780         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RendersBreakBeforeWmlSelectAndInput"]/*' />
781         public virtual bool RendersBreakBeforeWmlSelectAndInput
782         {
783             get
784             {
785                 if(!_haveRendersBreakBeforeWmlSelectAndInput)
786                 {
787                     String rendersBreaksBeforeWmlSelectAndInputString = this["rendersBreakBeforeWmlSelectAndInput"];
788                     if(rendersBreaksBeforeWmlSelectAndInputString == null)
789                     {
790                         _rendersBreakBeforeWmlSelectAndInput = false;
791                     }
792                     else
793                     {
794                         _rendersBreakBeforeWmlSelectAndInput = Convert.ToBoolean(rendersBreaksBeforeWmlSelectAndInputString);
795                     }
796                     _haveRendersBreakBeforeWmlSelectAndInput = true;
797                 }
798                 return _rendersBreakBeforeWmlSelectAndInput;
799             }
800         }
801 
802         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresPhoneNumbersAsPlainText"]/*' />
803         public virtual bool RequiresPhoneNumbersAsPlainText
804         {
805             get
806             {
807                 if(!_haveRequiresPhoneNumbersAsPlainText)
808                 {
809                     String requiresPhoneNumbersAsPlainTextString = this["requiresPhoneNumbersAsPlainText"];
810                     if(requiresPhoneNumbersAsPlainTextString == null)
811                     {
812                         _requiresPhoneNumbersAsPlainText = false;
813                     }
814                     else
815                     {
816                         _requiresPhoneNumbersAsPlainText = Convert.ToBoolean(requiresPhoneNumbersAsPlainTextString);
817                     }
818                     _haveRequiresPhoneNumbersAsPlainText = true;
819                 }
820                 return _requiresPhoneNumbersAsPlainText;
821             }
822         }
823 
824         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresUrlEncodedPostfieldValues"]/*' />
825         public virtual bool RequiresUrlEncodedPostfieldValues
826         {
827             get
828             {
829                 if(!_haveRequiresUrlEncodedPostfieldValues)
830                 {
831                     String requiresUrlEncodedPostfieldValuesString = this["requiresUrlEncodedPostfieldValues"];
832                     if(requiresUrlEncodedPostfieldValuesString == null)
833                     {
834                         _requiresUrlEncodedPostfieldValues = true;
835                     }
836                     else
837                     {
838                         _requiresUrlEncodedPostfieldValues = Convert.ToBoolean(requiresUrlEncodedPostfieldValuesString);
839                     }
840                     _haveRequiresUrlEncodedPostfieldValues = true;
841                 }
842                 return _requiresUrlEncodedPostfieldValues;
843             }
844         }
845 
846         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiredMetaTagNameValue"]/*' />
847         public virtual String RequiredMetaTagNameValue
848         {
849             get
850             {
851                 if(!_haveRequiredMetaTagNameValue)
852                 {
853                     String value = this["requiredMetaTagNameValue"];
854                     if(value == null || value == String.Empty)
855                     {
856                         _requiredMetaTagNameValue = null;
857                     }
858                     else
859                     {
860                         _requiredMetaTagNameValue = value;
861                     }
862                     _haveRequiredMetaTagNameValue = true;
863                 }
864                 return _requiredMetaTagNameValue;
865             }
866         }
867 
868         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RendersBreaksAfterHtmlLists"]/*' />
869         public virtual bool RendersBreaksAfterHtmlLists
870         {
871             get
872             {
873                 if(!_haveRendersBreaksAfterHtmlLists)
874                 {
875                     String rendersBreaksAfterHtmlListsString = this["rendersBreaksAfterHtmlLists"];
876                     if(rendersBreaksAfterHtmlListsString == null)
877                     {
878                         _rendersBreaksAfterHtmlLists = true;
879                     }
880                     else
881                     {
882                         _rendersBreaksAfterHtmlLists = Convert.ToBoolean(rendersBreaksAfterHtmlListsString);
883                     }
884                     _haveRendersBreaksAfterHtmlLists = true;
885                 }
886                 return _rendersBreaksAfterHtmlLists;
887             }
888         }
889 
890         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresUniqueHtmlInputNames"]/*' />
891         public virtual bool RequiresUniqueHtmlInputNames
892         {
893             get
894             {
895                 if(!_haveRequiresUniqueHtmlInputNames)
896                 {
897                     String requiresUniqueHtmlInputNamesString = this["requiresUniqueHtmlInputNames"];
898                     if(requiresUniqueHtmlInputNamesString == null)
899                     {
900                         _requiresUniqueHtmlInputNames = false;
901                     }
902                     else
903                     {
904                         _requiresUniqueHtmlInputNames = Convert.ToBoolean(requiresUniqueHtmlInputNamesString);
905                     }
906                     _haveRequiresUniqueHtmlInputNames = true;
907                 }
908                 return _requiresUniqueHtmlInputNames;
909             }
910         }
911 
912         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresUniqueHtmlCheckboxNames"]/*' />
913         public virtual bool RequiresUniqueHtmlCheckboxNames
914         {
915             get
916             {
917                 if(!_haveRequiresUniqueHtmlCheckboxNames)
918                 {
919                     String requiresUniqueHtmlCheckboxNamesString = this["requiresUniqueHtmlCheckboxNames"];
920                     if(requiresUniqueHtmlCheckboxNamesString == null)
921                     {
922                         _requiresUniqueHtmlCheckboxNames = false;
923                     }
924                     else
925                     {
926                         _requiresUniqueHtmlCheckboxNames = Convert.ToBoolean(requiresUniqueHtmlCheckboxNamesString);
927                     }
928                     _haveRequiresUniqueHtmlCheckboxNames = true;
929                 }
930                 return _requiresUniqueHtmlCheckboxNames;
931             }
932         }
933 
934         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsCss"]/*' />
935         public virtual bool SupportsCss
936         {
937             get
938             {
939                 if(!_haveSupportsCss)
940                 {
941                     String supportsCssString = this["supportsCss"];
942                     if(supportsCssString == null)
943                     {
944                         _supportsCss = false;
945                     }
946                     else
947                     {
948                         _supportsCss = Convert.ToBoolean(supportsCssString);
949                     }
950                     _haveSupportsCss = true;
951                 }
952                 return _supportsCss;
953             }
954         }
955 
956         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.HidesRightAlignedMultiselectScrollbars"]/*' />
957         public virtual bool HidesRightAlignedMultiselectScrollbars
958         {
959             get
960             {
961                 if(!_haveHidesRightAlignedMultiselectScrollbars)
962                 {
963                     String hidesRightAlignedMultiselectScrollbarsString = this["hidesRightAlignedMultiselectScrollbars"];
964                     if(hidesRightAlignedMultiselectScrollbarsString == null)
965                     {
966                         _hidesRightAlignedMultiselectScrollbars = false;
967                     }
968                     else
969                     {
970                         _hidesRightAlignedMultiselectScrollbars = Convert.ToBoolean(hidesRightAlignedMultiselectScrollbarsString);
971                     }
972                     _haveHidesRightAlignedMultiselectScrollbars = true;
973                }
974                return _hidesRightAlignedMultiselectScrollbars;
975             }
976         }
977 
978         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.IsMobileDevice"]/*' />
979         public virtual bool IsMobileDevice
980         {
981             get
982             {
983                 if(!_haveIsMobileDevice)
984                 {
985                     String isMobileDeviceString = this["isMobileDevice"];
986                     if(isMobileDeviceString == null)
987                     {
988                         _isMobileDevice = false;
989                     }
990                     else
991                     {
992                         _isMobileDevice = Convert.ToBoolean(isMobileDeviceString);
993                     }
994                     _haveIsMobileDevice = true;
995                 }
996                 return _isMobileDevice;
997             }
998         }
999 
1000         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresAttributeColonSubstitution"]/*' />
1001         public virtual bool RequiresAttributeColonSubstitution
1002         {
1003             get
1004             {
1005                 if(!_haveRequiresAttributeColonSubstitution)
1006                 {
1007                     String requiresAttributeColonSubstitution = this["requiresAttributeColonSubstitution"];
1008                     if(requiresAttributeColonSubstitution == null)
1009                     {
1010                         _requiresAttributeColonSubstitution = false;
1011                     }
1012                     else
1013                     {
1014                         _requiresAttributeColonSubstitution = Convert.ToBoolean(requiresAttributeColonSubstitution);
1015                     }
1016                     _haveRequiresAttributeColonSubstitution = true;
1017                 }
1018                 return _requiresAttributeColonSubstitution;
1019             }
1020         }
1021 
1022         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.CanRenderOneventAndPrevElementsTogether"]/*' />
1023         public virtual bool CanRenderOneventAndPrevElementsTogether
1024         {
1025             get
1026             {
1027                 if(!_haveCanRenderOneventAndPrevElementsTogether)
1028                 {
1029                     String canRenderOneventAndPrevElementsTogetherString = this["canRenderOneventAndPrevElementsTogether"];
1030                     if(canRenderOneventAndPrevElementsTogetherString == null)
1031                     {
1032                         _canRenderOneventAndPrevElementsTogether = true;
1033                     }
1034                     else
1035                     {
1036                         _canRenderOneventAndPrevElementsTogether = Convert.ToBoolean(canRenderOneventAndPrevElementsTogetherString);
1037                     }
1038                     _haveCanRenderOneventAndPrevElementsTogether = true;
1039                 }
1040                 return _canRenderOneventAndPrevElementsTogether;
1041             }
1042         }
1043 
1044         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.CanRenderInputAndSelectElementsTogether"]/*' />
1045         public virtual bool CanRenderInputAndSelectElementsTogether
1046         {
1047             get
1048             {
1049                 if(!_haveCanRenderInputAndSelectElementsTogether)
1050                 {
1051                     String canRenderInputAndSelectElementsTogetherString = this["canRenderInputAndSelectElementsTogether"];
1052                     if(canRenderInputAndSelectElementsTogetherString == null)
1053                     {
1054                         _canRenderInputAndSelectElementsTogether = true;
1055                     }
1056                     else
1057                     {
1058                         _canRenderInputAndSelectElementsTogether = Convert.ToBoolean(canRenderInputAndSelectElementsTogetherString);
1059                     }
1060                     _haveCanRenderInputAndSelectElementsTogether = true;
1061                 }
1062                 return _canRenderInputAndSelectElementsTogether;
1063             }
1064         }
1065 
1066         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.CanRenderAfterInputOrSelectElement"]/*' />
1067         public virtual bool CanRenderAfterInputOrSelectElement
1068         {
1069             get
1070             {
1071                 if(!_haveCanRenderAfterInputOrSelectElement)
1072                 {
1073                     String canRenderAfterInputOrSelectElementString = this["canRenderAfterInputOrSelectElement"];
1074                     if(canRenderAfterInputOrSelectElementString == null)
1075                     {
1076                         _canRenderAfterInputOrSelectElement = true;
1077                     }
1078                     else
1079                     {
1080                         _canRenderAfterInputOrSelectElement = Convert.ToBoolean(canRenderAfterInputOrSelectElementString);
1081                     }
1082                     _haveCanRenderAfterInputOrSelectElement = true;
1083                 }
1084                 return _canRenderAfterInputOrSelectElement;
1085             }
1086         }
1087 
1088         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.CanRenderPostBackCards"]/*' />
1089         public virtual bool CanRenderPostBackCards
1090         {
1091             get
1092             {
1093                 if(!_haveCanRenderPostBackCards)
1094                 {
1095                     String canRenderPostBackCardsString = this["canRenderPostBackCards"];
1096                     if(canRenderPostBackCardsString == null)
1097                     {
1098                         _canRenderPostBackCards = true;
1099                     }
1100                     else
1101                     {
1102                         _canRenderPostBackCards = Convert.ToBoolean(canRenderPostBackCardsString);
1103                     }
1104                     _haveCanRenderPostBackCards = true;
1105                 }
1106                 return _canRenderPostBackCards;
1107             }
1108         }
1109 
1110         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.CanRenderMixedSelects"]/*' />
1111         public virtual bool CanRenderMixedSelects
1112         {
1113             get
1114             {
1115                 if(!_haveCanRenderMixedSelects)
1116                 {
1117                     String canRenderMixedSelectsString = this["canRenderMixedSelects"];
1118                     if(canRenderMixedSelectsString == null)
1119                     {
1120                         _canRenderMixedSelects = true;
1121                     }
1122                     else
1123                     {
1124                         _canRenderMixedSelects = Convert.ToBoolean(canRenderMixedSelectsString);
1125                     }
1126                     _haveCanRenderMixedSelects = true;
1127                 }
1128                 return _canRenderMixedSelects;
1129             }
1130         }
1131 
1132         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.CanCombineFormsInDeck"]/*' />
1133         public virtual bool CanCombineFormsInDeck
1134         {
1135             get
1136             {
1137                 if(!_haveCanCombineFormsInDeck)
1138                 {
1139                     String canCombineFormsInDeckString = this["canCombineFormsInDeck"];
1140                     if(canCombineFormsInDeckString == null)
1141                     {
1142                         _canCombineFormsInDeck = true;
1143                     }
1144                     else
1145                     {
1146                         _canCombineFormsInDeck = Convert.ToBoolean(canCombineFormsInDeckString);
1147                     }
1148                     _haveCanCombineFormsInDeck = true;
1149                 }
1150                 return _canCombineFormsInDeck;
1151             }
1152         }
1153 
1154         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.CanRenderSetvarZeroWithMultiSelectionList"]/*' />
1155         public virtual bool CanRenderSetvarZeroWithMultiSelectionList
1156         {
1157             get
1158             {
1159                 if(!_haveCanRenderSetvarZeroWithMultiSelectionList)
1160                 {
1161                     String canRenderSetvarZeroWithMultiSelectionListString = this["canRenderSetvarZeroWithMultiSelectionList"];
1162                     if(canRenderSetvarZeroWithMultiSelectionListString == null)
1163                     {
1164                         _canRenderSetvarZeroWithMultiSelectionList = true;
1165                     }
1166                     else
1167                     {
1168                         _canRenderSetvarZeroWithMultiSelectionList = Convert.ToBoolean(canRenderSetvarZeroWithMultiSelectionListString);
1169                     }
1170                     _haveCanRenderSetvarZeroWithMultiSelectionList = true;
1171                 }
1172                 return _canRenderSetvarZeroWithMultiSelectionList;
1173             }
1174         }
1175 
1176         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsImageSubmit"]/*' />
1177         public virtual bool SupportsImageSubmit
1178         {
1179             get
1180             {
1181                 if(!_haveSupportsImageSubmit)
1182                 {
1183                     String supportsImageSubmitString = this["supportsImageSubmit"];
1184                     if(supportsImageSubmitString == null)
1185                     {
1186                         _supportsImageSubmit = false;
1187                     }
1188                     else
1189                     {
1190                         _supportsImageSubmit = Convert.ToBoolean(supportsImageSubmitString);
1191                     }
1192                     _haveSupportsImageSubmit = true;
1193                 }
1194                 return _supportsImageSubmit;
1195             }
1196         }
1197 
1198         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresUniqueFilePathSuffix"]/*' />
1199         public virtual bool RequiresUniqueFilePathSuffix
1200         {
1201             get
1202             {
1203                 if(!_haveRequiresUniqueFilePathSuffix)
1204                 {
1205                     String requiresUniqueFilePathSuffixString = this["requiresUniqueFilePathSuffix"];
1206                     if(requiresUniqueFilePathSuffixString == null)
1207                     {
1208                         _requiresUniqueFilePathSuffix = false;
1209                     }
1210                     else
1211                     {
1212                         _requiresUniqueFilePathSuffix = Convert.ToBoolean(requiresUniqueFilePathSuffixString);
1213                     }
1214                     _haveRequiresUniqueFilePathSuffix = true;
1215                 }
1216                 return _requiresUniqueFilePathSuffix;
1217             }
1218         }
1219 
1220         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresNoBreakInFormatting"]/*' />
1221         public virtual bool RequiresNoBreakInFormatting
1222         {
1223             get
1224             {
1225                 if(!_haveRequiresNoBreakInFormatting)
1226                 {
1227                     String requiresNoBreakInFormatting = this["requiresNoBreakInFormatting"];
1228                     if(requiresNoBreakInFormatting == null)
1229                     {
1230                         _requiresNoBreakInFormatting = false;
1231                     }
1232                     else
1233                     {
1234                         _requiresNoBreakInFormatting = Convert.ToBoolean(requiresNoBreakInFormatting);
1235                     }
1236                     _haveRequiresNoBreakInFormatting = true;
1237                 }
1238                 return _requiresNoBreakInFormatting;
1239             }
1240         }
1241 
1242         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresLeadingPageBreak"]/*' />
1243         public virtual bool RequiresLeadingPageBreak
1244         {
1245             get
1246             {
1247                 if(!_haveRequiresLeadingPageBreak)
1248                 {
1249                     String requiresLeadingPageBreak = this["requiresLeadingPageBreak"];
1250                     if(requiresLeadingPageBreak == null)
1251                     {
1252                         _requiresLeadingPageBreak = false;
1253                     }
1254                     else
1255                     {
1256                         _requiresLeadingPageBreak = Convert.ToBoolean(requiresLeadingPageBreak);
1257                     }
1258                     _haveRequiresLeadingPageBreak = true;
1259                 }
1260                 return _requiresLeadingPageBreak;
1261             }
1262         }
1263 
1264         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsSelectMultiple"]/*' />
1265         public virtual bool SupportsSelectMultiple
1266         {
1267             get
1268             {
1269                 if(!_haveSupportsSelectMultiple)
1270                 {
1271                     String supportsSelectMultipleString = this["supportsSelectMultiple"];
1272                     if(supportsSelectMultipleString == null)
1273                     {
1274                         _supportsSelectMultiple = false;
1275                     }
1276                     else
1277                     {
1278                         _supportsSelectMultiple = Convert.ToBoolean(supportsSelectMultipleString);
1279                     }
1280                     _haveSupportsSelectMultiple = true;
1281                 }
1282                 return _supportsSelectMultiple;
1283             }
1284         }
1285 
1286         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsBold"]/*' />
1287         public new virtual bool SupportsBold
1288         {
1289             get
1290             {
1291                 if(!_haveSupportsBold)
1292                 {
1293                     String supportsBold = this["supportsBold"];
1294                     if(supportsBold == null)
1295                     {
1296                         _supportsBold = false;
1297                     }
1298                     else
1299                     {
1300                         _supportsBold = Convert.ToBoolean(supportsBold);
1301                     }
1302                     _haveSupportsBold = true;
1303                 }
1304                 return _supportsBold;
1305             }
1306         }
1307 
1308         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsItalic"]/*' />
1309         public new virtual bool SupportsItalic
1310         {
1311             get
1312             {
1313                 if(!_haveSupportsItalic)
1314                 {
1315                     String supportsItalic = this["supportsItalic"];
1316                     if(supportsItalic == null)
1317                     {
1318                         _supportsItalic = false;
1319                     }
1320                     else
1321                     {
1322                         _supportsItalic = Convert.ToBoolean(supportsItalic);
1323                     }
1324                     _haveSupportsItalic = true;
1325                 }
1326                 return _supportsItalic;
1327             }
1328         }
1329 
1330         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsFontSize"]/*' />
1331         public virtual bool SupportsFontSize
1332         {
1333             get
1334             {
1335                 if(!_haveSupportsFontSize)
1336                 {
1337                     String supportsFontSize = this["supportsFontSize"];
1338                     if(supportsFontSize == null)
1339                     {
1340                         _supportsFontSize = false;
1341                     }
1342                     else
1343                     {
1344                         _supportsFontSize = Convert.ToBoolean(supportsFontSize);
1345                     }
1346                     _haveSupportsFontSize = true;
1347                 }
1348                 return _supportsFontSize;
1349             }
1350         }
1351 
1352         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsFontName"]/*' />
1353         public virtual bool SupportsFontName
1354         {
1355             get
1356             {
1357                 if(!_haveSupportsFontName)
1358                 {
1359                     String supportsFontName = this["supportsFontName"];
1360                     if(supportsFontName == null)
1361                     {
1362                         _supportsFontName = false;
1363                     }
1364                     else
1365                     {
1366                         _supportsFontName = Convert.ToBoolean(supportsFontName);
1367                     }
1368                     _haveSupportsFontName = true;
1369                 }
1370                 return _supportsFontName;
1371             }
1372         }
1373 
1374         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsFontColor"]/*' />
1375         public virtual bool SupportsFontColor
1376         {
1377             get
1378             {
1379                 if(!_haveSupportsFontColor)
1380                 {
1381                     String supportsFontColor = this["supportsFontColor"];
1382                     if(supportsFontColor == null)
1383                     {
1384                         _supportsFontColor = false;
1385                     }
1386                     else
1387                     {
1388                         _supportsFontColor = Convert.ToBoolean(supportsFontColor);
1389                     }
1390                     _haveSupportsFontColor = true;
1391                 }
1392                 return _supportsFontColor;
1393             }
1394         }
1395 
1396         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsBodyColor"]/*' />
1397         public virtual bool SupportsBodyColor
1398         {
1399             get
1400             {
1401                 if(!_haveSupportsBodyColor)
1402                 {
1403                     String supportsBodyColor = this["supportsBodyColor"];
1404                     if(supportsBodyColor == null)
1405                     {
1406                         _supportsBodyColor = false;
1407                     }
1408                     else
1409                     {
1410                         _supportsBodyColor = Convert.ToBoolean(supportsBodyColor);
1411                     }
1412                     _haveSupportsBodyColor = true;
1413                 }
1414                 return _supportsBodyColor;
1415             }
1416         }
1417 
1418         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsDivAlign"]/*' />
1419         public virtual bool SupportsDivAlign
1420         {
1421             get
1422             {
1423                 if(!_haveSupportsDivAlign)
1424                 {
1425                     String supportsDivAlign = this["supportsDivAlign"];
1426                     if(supportsDivAlign == null)
1427                     {
1428                         _supportsDivAlign = false;
1429                     }
1430                     else
1431                     {
1432                         _supportsDivAlign = Convert.ToBoolean(supportsDivAlign);
1433                     }
1434                     _haveSupportsDivAlign = true;
1435                 }
1436                 return _supportsDivAlign;
1437             }
1438         }
1439 
1440         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsDivNoWrap"]/*' />
1441         public virtual bool SupportsDivNoWrap
1442         {
1443             get
1444             {
1445                 if(!_haveSupportsDivNoWrap)
1446                 {
1447                     String supportsDivNoWrap = this["supportsDivNoWrap"];
1448                     if(supportsDivNoWrap == null)
1449                     {
1450                         _supportsDivNoWrap = false;
1451                     }
1452                     else
1453                     {
1454                         _supportsDivNoWrap = Convert.ToBoolean(supportsDivNoWrap);
1455                     }
1456                     _haveSupportsDivNoWrap = true;
1457                 }
1458                 return _supportsDivNoWrap;
1459             }
1460         }
1461 
1462         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresContentTypeMetaTag"]/*' />
1463         public virtual bool RequiresContentTypeMetaTag
1464         {
1465             get
1466             {
1467                 if(!_haveRequiresContentTypeMetaTag)
1468                 {
1469                     String requiresContentTypeMetaTag = this["requiresContentTypeMetaTag"];
1470                     if(requiresContentTypeMetaTag == null)
1471                     {
1472                         _requiresContentTypeMetaTag = false;
1473                     }
1474                     else
1475                     {
1476                         _requiresContentTypeMetaTag =
1477                             Convert.ToBoolean(requiresContentTypeMetaTag);
1478                     }
1479                     _haveRequiresContentTypeMetaTag = true;
1480                 }
1481                 return _requiresContentTypeMetaTag;
1482             }
1483         }
1484 
1485         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresDBCSCharacter"]/*' />
1486         public virtual bool RequiresDBCSCharacter
1487         {
1488             get
1489             {
1490                 if(!_haveRequiresDBCSCharacter)
1491                 {
1492                     String requiresDBCSCharacter = this["requiresDBCSCharacter"];
1493                     if(requiresDBCSCharacter == null)
1494                     {
1495                         _requiresDBCSCharacter = false;
1496                     }
1497                     else
1498                     {
1499                         _requiresDBCSCharacter =
1500                             Convert.ToBoolean(requiresDBCSCharacter);
1501                     }
1502                     _haveRequiresDBCSCharacter = true;
1503                 }
1504                 return _requiresDBCSCharacter;
1505             }
1506         }
1507 
1508         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresHtmlAdaptiveErrorReporting"]/*' />
1509         public virtual bool RequiresHtmlAdaptiveErrorReporting
1510         {
1511             get
1512             {
1513                 if(!_haveRequiresHtmlAdaptiveErrorReporting)
1514                 {
1515                     String requiresHtmlAdaptiveErrorReporting = this["requiresHtmlAdaptiveErrorReporting"];
1516                     if(requiresHtmlAdaptiveErrorReporting == null)
1517                     {
1518                         _requiresHtmlAdaptiveErrorReporting = false;
1519                     }
1520                     else
1521                     {
1522                         _requiresHtmlAdaptiveErrorReporting =
1523                             Convert.ToBoolean(requiresHtmlAdaptiveErrorReporting);
1524                     }
1525                     _haveRequiresHtmlAdaptiveErrorReporting = true;
1526                 }
1527                 return _requiresHtmlAdaptiveErrorReporting;
1528             }
1529         }
1530 
1531         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresOutputOptimization"]/*' />
1532         public virtual bool RequiresOutputOptimization
1533         {
1534             get
1535             {
1536                 if(!_haveRequiresOutputOptimization)
1537                 {
1538                     String RequiresOutputOptimizationString = this["requiresOutputOptimization"];
1539                     if(RequiresOutputOptimizationString == null)
1540                     {
1541                         _requiresOutputOptimization = false;
1542                     }
1543                     else
1544                     {
1545                         _requiresOutputOptimization = Convert.ToBoolean(RequiresOutputOptimizationString);
1546                     }
1547                     _haveRequiresOutputOptimization = true;
1548                 }
1549                 return _requiresOutputOptimization;
1550             }
1551         }
1552 
1553         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsAccesskeyAttribute"]/*' />
1554         public virtual bool SupportsAccesskeyAttribute
1555         {
1556             get
1557             {
1558                 if(!_haveSupportsAccesskeyAttribute)
1559                 {
1560                     String SupportsAccesskeyAttributeString = this["supportsAccesskeyAttribute"];
1561                     if(SupportsAccesskeyAttributeString == null)
1562                     {
1563                         _supportsAccesskeyAttribute = false;
1564                     }
1565                     else
1566                     {
1567                         _supportsAccesskeyAttribute = Convert.ToBoolean(SupportsAccesskeyAttributeString);
1568                     }
1569                     _haveSupportsAccesskeyAttribute = true;
1570                 }
1571                 return _supportsAccesskeyAttribute;
1572             }
1573         }
1574 
1575         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsInputIStyle"]/*' />
1576         public virtual bool SupportsInputIStyle
1577         {
1578             get
1579             {
1580                 if(!_haveSupportsInputIStyle)
1581                 {
1582                     String SupportsInputIStyleString = this["supportsInputIStyle"];
1583                     if(SupportsInputIStyleString == null)
1584                     {
1585                         _supportsInputIStyle = false;
1586                     }
1587                     else
1588                     {
1589                         _supportsInputIStyle = Convert.ToBoolean(SupportsInputIStyleString);
1590                     }
1591                     _haveSupportsInputIStyle = true;
1592                 }
1593                 return _supportsInputIStyle;
1594             }
1595         }
1596 
1597         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsInputMode"]/*' />
1598         public virtual bool SupportsInputMode
1599         {
1600             get
1601             {
1602                 if(!_haveSupportsInputMode)
1603                 {
1604                     String SupportsInputModeString = this["supportsInputMode"];
1605                     if(SupportsInputModeString == null)
1606                     {
1607                         _supportsInputMode = false;
1608                     }
1609                     else
1610                     {
1611                         _supportsInputMode = Convert.ToBoolean(SupportsInputModeString);
1612                     }
1613                     _haveSupportsInputMode = true;
1614                 }
1615                 return _supportsInputMode;
1616             }
1617         }
1618 
1619         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsIModeSymbols"]/*' />
1620         public virtual bool SupportsIModeSymbols
1621         {
1622             get
1623             {
1624                 if(!_haveSupportsIModeSymbols)
1625                 {
1626                     String SupportsIModeSymbolsString = this["supportsIModeSymbols"];
1627                     if(SupportsIModeSymbolsString == null)
1628                     {
1629                         _supportsIModeSymbols = false;
1630                     }
1631                     else
1632                     {
1633                         _supportsIModeSymbols = Convert.ToBoolean(SupportsIModeSymbolsString);
1634                     }
1635                     _haveSupportsIModeSymbols = true;
1636                 }
1637                 return _supportsIModeSymbols;
1638             }
1639         }
1640 
1641         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsJPhoneSymbols"]/*' />
1642         public virtual bool SupportsJPhoneSymbols
1643         {
1644             get
1645             {
1646                 if(!_haveSupportsJPhoneSymbols)
1647                 {
1648                     String SupportsJPhoneSymbolsString = this["supportsJPhoneSymbols"];
1649                     if(SupportsJPhoneSymbolsString == null)
1650                     {
1651                         _supportsJPhoneSymbols = false;
1652                     }
1653                     else
1654                     {
1655                         _supportsJPhoneSymbols = Convert.ToBoolean(SupportsJPhoneSymbolsString);
1656                     }
1657                     _haveSupportsJPhoneSymbols = true;
1658                 }
1659                 return _supportsJPhoneSymbols;
1660             }
1661         }
1662 
1663         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsJPhoneMultiMediaAttributes"]/*' />
1664         public virtual bool SupportsJPhoneMultiMediaAttributes
1665         {
1666             get
1667             {
1668                 if(!_haveSupportsJPhoneMultiMediaAttributes)
1669                 {
1670                     String SupportsJPhoneMultiMediaAttributesString = this["supportsJPhoneMultiMediaAttributes"];
1671                     if(SupportsJPhoneMultiMediaAttributesString == null)
1672                     {
1673                         _supportsJPhoneMultiMediaAttributes = false;
1674                     }
1675                     else
1676                     {
1677                         _supportsJPhoneMultiMediaAttributes = Convert.ToBoolean(SupportsJPhoneMultiMediaAttributesString);
1678                     }
1679                     _haveSupportsJPhoneMultiMediaAttributes = true;
1680                 }
1681                 return _supportsJPhoneMultiMediaAttributes;
1682             }
1683         }
1684 
1685         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.MaximumRenderedPageSize"]/*' />
1686         public virtual int MaximumRenderedPageSize
1687         {
1688             get
1689             {
1690                 if(!_haveMaximumRenderedPageSize)
1691                 {
1692                     _maximumRenderedPageSize = Convert.ToInt32(this["maximumRenderedPageSize"]);
1693                     _haveMaximumRenderedPageSize = true;
1694                 }
1695                 return _maximumRenderedPageSize;
1696             }
1697         }
1698 
1699         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.RequiresSpecialViewStateEncoding"]/*' />
1700         public virtual bool RequiresSpecialViewStateEncoding
1701         {
1702             get
1703             {
1704                 if(!_haveRequiresSpecialViewStateEncoding)
1705                 {
1706                     String RequiresSpecialViewStateEncodingString = this["requiresSpecialViewStateEncoding"];
1707                     if(RequiresSpecialViewStateEncodingString == null)
1708                     {
1709                         _requiresSpecialViewStateEncoding = false;
1710                     }
1711                     else
1712                     {
1713                         _requiresSpecialViewStateEncoding = Convert.ToBoolean(RequiresSpecialViewStateEncodingString);
1714                     }
1715                     _haveRequiresSpecialViewStateEncoding = true;
1716                 }
1717                 return _requiresSpecialViewStateEncoding;
1718             }
1719         }
1720 
1721         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsQueryStringInFormAction"]/*' />
1722         public virtual bool SupportsQueryStringInFormAction
1723         {
1724             get
1725             {
1726                 if(!_haveSupportsQueryStringInFormAction)
1727                 {
1728                     String SupportsQueryStringInFormActionString = this["supportsQueryStringInFormAction"];
1729                     if(SupportsQueryStringInFormActionString == null)
1730                     {
1731                         _supportsQueryStringInFormAction = true;
1732                     }
1733                     else
1734                     {
1735                         _supportsQueryStringInFormAction = Convert.ToBoolean(SupportsQueryStringInFormActionString);
1736                     }
1737                     _haveSupportsQueryStringInFormAction = true;
1738                 }
1739                 return _supportsQueryStringInFormAction;
1740             }
1741         }
1742 
1743         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsCacheControlMetaTag"]/*' />
1744         public virtual bool SupportsCacheControlMetaTag
1745         {
1746             get
1747             {
1748                 if(!_haveSupportsCacheControlMetaTag)
1749                 {
1750                     String SupportsCacheControlMetaTagString = this["supportsCacheControlMetaTag"];
1751                     if(SupportsCacheControlMetaTagString == null)
1752                     {
1753                         _supportsCacheControlMetaTag = true;
1754                     }
1755                     else
1756                     {
1757                         _supportsCacheControlMetaTag = Convert.ToBoolean(SupportsCacheControlMetaTagString);
1758                     }
1759                     _haveSupportsCacheControlMetaTag = true;
1760                 }
1761                 return _supportsCacheControlMetaTag;
1762             }
1763         }
1764 
1765         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsUncheck"]/*' />
1766         public virtual bool SupportsUncheck
1767         {
1768             get
1769             {
1770                 if(!_haveSupportsUncheck)
1771                 {
1772                     String SupportsUncheckString = this["supportsUncheck"];
1773                     if(SupportsUncheckString == null)
1774                     {
1775                         _supportsUncheck = true;
1776                     }
1777                     else
1778                     {
1779                         _supportsUncheck = Convert.ToBoolean(SupportsUncheckString);
1780                     }
1781                     _haveSupportsUncheck = true;
1782                 }
1783                 return _supportsUncheck;
1784             }
1785         }
1786 
1787         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.CanRenderEmptySelects"]/*' />
1788         public virtual bool CanRenderEmptySelects
1789         {
1790             get
1791             {
1792                 if(!_haveCanRenderEmptySelects)
1793                 {
1794                     String CanRenderEmptySelectsString = this["canRenderEmptySelects"];
1795                     if(CanRenderEmptySelectsString == null)
1796                     {
1797                         _canRenderEmptySelects = true;
1798                     }
1799                     else
1800                     {
1801                         _canRenderEmptySelects = Convert.ToBoolean(CanRenderEmptySelectsString);
1802                     }
1803                     _haveCanRenderEmptySelects = true;
1804                 }
1805                 return _canRenderEmptySelects;
1806             }
1807         }
1808 
1809         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsRedirectWithCookie"]/*' />
1810         public virtual bool SupportsRedirectWithCookie
1811         {
1812             get
1813             {
1814                 if(!_haveSupportsRedirectWithCookie)
1815                 {
1816                     String supportsRedirectWithCookie = this["supportsRedirectWithCookie"];
1817                     if(supportsRedirectWithCookie == null)
1818                     {
1819                         _supportsRedirectWithCookie = true;
1820                     }
1821                     else
1822                     {
1823                         _supportsRedirectWithCookie = Convert.ToBoolean(supportsRedirectWithCookie);
1824                     }
1825                     _haveSupportsRedirectWithCookie = true;
1826                 }
1827                 return _supportsRedirectWithCookie;
1828             }
1829         }
1830 
1831         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.SupportsEmptyStringInCookieValue"]/*' />
1832         public virtual bool SupportsEmptyStringInCookieValue
1833         {
1834             get
1835             {
1836                 if (!_haveSupportsEmptyStringInCookieValue)
1837                 {
1838                     String supportsEmptyStringInCookieValue = this["supportsEmptyStringInCookieValue"];
1839                     if (supportsEmptyStringInCookieValue == null)
1840                     {
1841                         _supportsEmptyStringInCookieValue = true;
1842                     }
1843                     else
1844                     {
1845                         _supportsEmptyStringInCookieValue =
1846                             Convert.ToBoolean (supportsEmptyStringInCookieValue);
1847                     }
1848                     _haveSupportsEmptyStringInCookieValue = true;
1849                 }
1850                 return _supportsEmptyStringInCookieValue;
1851             }
1852         }
1853 
1854         /// <include file='doc\MobileCapabilities.uex' path='docs/doc[@for="MobileCapabilities.DefaultSubmitButtonLimit"]/*' />
1855         public virtual int DefaultSubmitButtonLimit
1856         {
1857             get
1858             {
1859                 if(!_haveDefaultSubmitButtonLimit)
1860                 {
1861                     String s = this["defaultSubmitButtonLimit"];
1862                     _defaultSubmitButtonLimit = s != null ? Convert.ToInt32(this["defaultSubmitButtonLimit"]) : 1;
1863                     _haveDefaultSubmitButtonLimit = true;
1864                 }
1865                 return _defaultSubmitButtonLimit;
1866             }
1867         }
1868 
1869 
1870         private String _mobileDeviceManufacturer;
1871         private String _mobileDeviceModel;
1872         private String _gatewayVersion;
1873         private int _gatewayMajorVersion;
1874         private double _gatewayMinorVersion;
1875         private String _preferredRenderingType;     //
1876 
1877 
1878 
1879 
1880 
1881 
1882 
1883 
1884 
1885 
1886 
1887 
1888 
1889 
1890 
1891 
1892 
1893 
1894 
1895 
1896 
1897 
1898 
1899 
1900 
1901 
1902 
1903 
1904 
1905 
1906 
1907 
1908 
1909 
1910 
1911 
1912 
1913 
1914 
1915 
1916 
1917 
1918 
1919 
1920 
1921 
1922 
1923 
1924 
1925 
1926 
1927 
1928 
1929 
1930 
1931 
1932 
1933 
1934 
1935 
1936 
1937 
1938 
1939 
1940 
1941 
1942 
1943 
1944 
1945 
1946 
1947 
1948 
1949 
1950 
1951 
1952 
1953 
1954 
1955 
1956 
1957 
1958 
1959 
1960 
1961 
1962 
1963 
1964 
1965 
1966 
1967 
1968 
1969 
1970 
1971 
1972 
1973 
1974 
1975 
1976 
1977 
1978 
1979 
1980 
1981 
1982 
1983 
1984 
1985 
1986 
1987 
1988 
1989 
1990 
1991 
1992 
1993 
1994 
1995 
1996 
1997 
1998 
1999 
2000 
2001 
2002 
2003 
2004 
2005 
2006 
2007 
2008 
2009 
2010 
2011 
2012 
2013 
2014 
2015 
2016 
2017 
2018 
2019 
2020 */
2021     }
2022 }
2023 
2024