HttpBrowserCapabilitiesWrapper.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. //
  2. // HttpBrowserCapabilitiesWrapper.cs
  3. //
  4. // Author:
  5. // Atsushi Enomoto <[email protected]>
  6. //
  7. // Copyright (C) 2008 Novell Inc. http://novell.com
  8. //
  9. //
  10. // Permission is hereby granted, free of charge, to any person obtaining
  11. // a copy of this software and associated documentation files (the
  12. // "Software"), to deal in the Software without restriction, including
  13. // without limitation the rights to use, copy, modify, merge, publish,
  14. // distribute, sublicense, and/or sell copies of the Software, and to
  15. // permit persons to whom the Software is furnished to do so, subject to
  16. // the following conditions:
  17. //
  18. // The above copyright notice and this permission notice shall be
  19. // included in all copies or substantial portions of the Software.
  20. //
  21. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  22. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  23. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  24. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  25. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  26. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  27. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  28. //
  29. using System;
  30. using System.Collections;
  31. using System.Collections.Generic;
  32. using System.Globalization;
  33. using System.IO;
  34. using System.Runtime.CompilerServices;
  35. using System.Security.Permissions;
  36. using System.Security.Principal;
  37. using System.Web.Caching;
  38. using System.Web.UI;
  39. namespace System.Web
  40. {
  41. #if NET_4_0
  42. [TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
  43. #endif
  44. [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
  45. [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
  46. public class HttpBrowserCapabilitiesWrapper : HttpBrowserCapabilitiesBase
  47. {
  48. HttpBrowserCapabilities w;
  49. public HttpBrowserCapabilitiesWrapper (HttpBrowserCapabilities httpBrowserCapabilities)
  50. {
  51. if (httpBrowserCapabilities == null)
  52. throw new ArgumentNullException ("httpBrowserCapabilities");
  53. w = httpBrowserCapabilities;
  54. }
  55. public override bool ActiveXControls {
  56. get { return w.ActiveXControls; }
  57. }
  58. public override IDictionary Adapters {
  59. get { return w.Adapters; }
  60. }
  61. public override bool AOL {
  62. get { return w.AOL; }
  63. }
  64. public override bool BackgroundSounds {
  65. get { return w.BackgroundSounds; }
  66. }
  67. public override bool Beta {
  68. get { return w.Beta; }
  69. }
  70. public override string Browser {
  71. get { return w.Browser; }
  72. }
  73. public override ArrayList Browsers {
  74. get { return w.Browsers; }
  75. }
  76. public override bool CanCombineFormsInDeck {
  77. get { return w.CanCombineFormsInDeck; }
  78. }
  79. public override bool CanInitiateVoiceCall {
  80. get { return w.CanInitiateVoiceCall; }
  81. }
  82. public override bool CanRenderAfterInputOrSelectElement {
  83. get { return w.CanRenderAfterInputOrSelectElement; }
  84. }
  85. public override bool CanRenderEmptySelects {
  86. get { return w.CanRenderEmptySelects; }
  87. }
  88. public override bool CanRenderInputAndSelectElementsTogether {
  89. get { return w.CanRenderInputAndSelectElementsTogether; }
  90. }
  91. public override bool CanRenderMixedSelects {
  92. get { return w.CanRenderMixedSelects; }
  93. }
  94. public override bool CanRenderOneventAndPrevElementsTogether {
  95. get { return w.CanRenderOneventAndPrevElementsTogether; }
  96. }
  97. public override bool CanRenderPostBackCards {
  98. get { return w.CanRenderPostBackCards; }
  99. }
  100. public override bool CanRenderSetvarZeroWithMultiSelectionList {
  101. get { return w.CanRenderSetvarZeroWithMultiSelectionList; }
  102. }
  103. public override bool CanSendMail {
  104. get { return w.CanSendMail; }
  105. }
  106. public override IDictionary Capabilities {
  107. get { return w.Capabilities; } set { w.Capabilities = value; }
  108. }
  109. public override bool CDF {
  110. get { return w.CDF; }
  111. }
  112. public override Version ClrVersion {
  113. get { return w.ClrVersion; }
  114. }
  115. public override bool Cookies {
  116. get { return w.Cookies; }
  117. }
  118. public override bool Crawler {
  119. get { return w.Crawler; }
  120. }
  121. public override int DefaultSubmitButtonLimit {
  122. get { return w.DefaultSubmitButtonLimit; }
  123. }
  124. public override Version EcmaScriptVersion {
  125. get { return w.EcmaScriptVersion; }
  126. }
  127. public override bool Frames {
  128. get { return w.Frames; }
  129. }
  130. public override int GatewayMajorVersion {
  131. get { return w.GatewayMajorVersion; }
  132. }
  133. public override double GatewayMinorVersion {
  134. get { return w.GatewayMinorVersion; }
  135. }
  136. public override string GatewayVersion {
  137. get { return w.GatewayVersion; }
  138. }
  139. public override bool HasBackButton {
  140. get { return w.HasBackButton; }
  141. }
  142. public override bool HidesRightAlignedMultiselectScrollbars {
  143. get { return w.HidesRightAlignedMultiselectScrollbars; }
  144. }
  145. public override string HtmlTextWriter {
  146. get { return w.HtmlTextWriter; } set { w.HtmlTextWriter = value; }
  147. }
  148. public override string Id {
  149. get { return w.Id; }
  150. }
  151. public override string InputType {
  152. get { return w.InputType; }
  153. }
  154. public override bool IsColor {
  155. get { return w.IsColor; }
  156. }
  157. public override bool IsMobileDevice {
  158. get { return w.IsMobileDevice; }
  159. }
  160. public override string this [string key] {
  161. get { throw new NotImplementedException (); }
  162. }
  163. public override bool JavaApplets {
  164. get { return w.JavaApplets; }
  165. }
  166. public override Version JScriptVersion {
  167. get { return w.JScriptVersion; }
  168. }
  169. public override int MajorVersion {
  170. get { return w.MajorVersion; }
  171. }
  172. public override int MaximumHrefLength {
  173. get { return w.MaximumHrefLength; }
  174. }
  175. public override int MaximumRenderedPageSize {
  176. get { return w.MaximumRenderedPageSize; }
  177. }
  178. public override int MaximumSoftkeyLabelLength {
  179. get { return w.MaximumSoftkeyLabelLength; }
  180. }
  181. public override double MinorVersion {
  182. get { return w.MinorVersion; }
  183. }
  184. public override string MinorVersionString {
  185. get { return w.MinorVersionString; }
  186. }
  187. public override string MobileDeviceManufacturer {
  188. get { return w.MobileDeviceManufacturer; }
  189. }
  190. public override string MobileDeviceModel {
  191. get { return w.MobileDeviceModel; }
  192. }
  193. public override Version MSDomVersion {
  194. get { return w.MSDomVersion; }
  195. }
  196. public override int NumberOfSoftkeys {
  197. get { return w.NumberOfSoftkeys; }
  198. }
  199. public override string Platform {
  200. get { return w.Platform; }
  201. }
  202. public override string PreferredImageMime {
  203. get { return w.PreferredImageMime; }
  204. }
  205. public override string PreferredRenderingMime {
  206. get { return w.PreferredRenderingMime; }
  207. }
  208. public override string PreferredRenderingType {
  209. get { return w.PreferredRenderingType; }
  210. }
  211. public override string PreferredRequestEncoding {
  212. get { return w.PreferredRequestEncoding; }
  213. }
  214. public override string PreferredResponseEncoding {
  215. get { return w.PreferredResponseEncoding; }
  216. }
  217. public override bool RendersBreakBeforeWmlSelectAndInput {
  218. get { return w.RendersBreakBeforeWmlSelectAndInput; }
  219. }
  220. public override bool RendersBreaksAfterHtmlLists {
  221. get { return w.RendersBreaksAfterHtmlLists; }
  222. }
  223. public override bool RendersBreaksAfterWmlAnchor {
  224. get { return w.RendersBreaksAfterWmlAnchor; }
  225. }
  226. public override bool RendersBreaksAfterWmlInput {
  227. get { return w.RendersBreaksAfterWmlInput; }
  228. }
  229. public override bool RendersWmlDoAcceptsInline {
  230. get { return w.RendersWmlDoAcceptsInline; }
  231. }
  232. public override bool RendersWmlSelectsAsMenuCards {
  233. get { return w.RendersWmlSelectsAsMenuCards; }
  234. }
  235. public override string RequiredMetaTagNameValue {
  236. get { return w.RequiredMetaTagNameValue; }
  237. }
  238. public override bool RequiresAttributeColonSubstitution {
  239. get { return w.RequiresAttributeColonSubstitution; }
  240. }
  241. public override bool RequiresContentTypeMetaTag {
  242. get { return w.RequiresContentTypeMetaTag; }
  243. }
  244. public override bool RequiresControlStateInSession {
  245. get { return w.RequiresControlStateInSession; }
  246. }
  247. public override bool RequiresDBCSCharacter {
  248. get { return w.RequiresDBCSCharacter; }
  249. }
  250. public override bool RequiresHtmlAdaptiveErrorReporting {
  251. get { return w.RequiresHtmlAdaptiveErrorReporting; }
  252. }
  253. public override bool RequiresLeadingPageBreak {
  254. get { return w.RequiresLeadingPageBreak; }
  255. }
  256. public override bool RequiresNoBreakInFormatting {
  257. get { return w.RequiresNoBreakInFormatting; }
  258. }
  259. public override bool RequiresOutputOptimization {
  260. get { return w.RequiresOutputOptimization; }
  261. }
  262. public override bool RequiresPhoneNumbersAsPlainText {
  263. get { return w.RequiresPhoneNumbersAsPlainText; }
  264. }
  265. public override bool RequiresSpecialViewStateEncoding {
  266. get { return w.RequiresSpecialViewStateEncoding; }
  267. }
  268. public override bool RequiresUniqueFilePathSuffix {
  269. get { return w.RequiresUniqueFilePathSuffix; }
  270. }
  271. public override bool RequiresUniqueHtmlCheckboxNames {
  272. get { return w.RequiresUniqueHtmlCheckboxNames; }
  273. }
  274. public override bool RequiresUniqueHtmlInputNames {
  275. get { return w.RequiresUniqueHtmlInputNames; }
  276. }
  277. public override bool RequiresUrlEncodedPostfieldValues {
  278. get { return w.RequiresUrlEncodedPostfieldValues; }
  279. }
  280. public override int ScreenBitDepth {
  281. get { return w.ScreenBitDepth; }
  282. }
  283. public override int ScreenCharactersHeight {
  284. get { return w.ScreenCharactersHeight; }
  285. }
  286. public override int ScreenCharactersWidth {
  287. get { return w.ScreenCharactersWidth; }
  288. }
  289. public override int ScreenPixelsHeight {
  290. get { return w.ScreenPixelsHeight; }
  291. }
  292. public override int ScreenPixelsWidth {
  293. get { return w.ScreenPixelsWidth; }
  294. }
  295. public override bool SupportsAccesskeyAttribute {
  296. get { return w.SupportsAccesskeyAttribute; }
  297. }
  298. public override bool SupportsBodyColor {
  299. get { return w.SupportsBodyColor; }
  300. }
  301. public override bool SupportsBold {
  302. get { return w.SupportsBold; }
  303. }
  304. public override bool SupportsCacheControlMetaTag {
  305. get { return w.SupportsCacheControlMetaTag; }
  306. }
  307. public override bool SupportsCallback {
  308. get { return w.SupportsCallback; }
  309. }
  310. public override bool SupportsCss {
  311. get { return w.SupportsCss; }
  312. }
  313. public override bool SupportsDivAlign {
  314. get { return w.SupportsDivAlign; }
  315. }
  316. public override bool SupportsDivNoWrap {
  317. get { return w.SupportsDivNoWrap; }
  318. }
  319. public override bool SupportsEmptyStringInCookieValue {
  320. get { return w.SupportsEmptyStringInCookieValue; }
  321. }
  322. public override bool SupportsFontColor {
  323. get { return w.SupportsFontColor; }
  324. }
  325. public override bool SupportsFontName {
  326. get { return w.SupportsFontName; }
  327. }
  328. public override bool SupportsFontSize {
  329. get { return w.SupportsFontSize; }
  330. }
  331. public override bool SupportsImageSubmit {
  332. get { return w.SupportsImageSubmit; }
  333. }
  334. public override bool SupportsIModeSymbols {
  335. get { return w.SupportsIModeSymbols; }
  336. }
  337. public override bool SupportsInputIStyle {
  338. get { return w.SupportsInputIStyle; }
  339. }
  340. public override bool SupportsInputMode {
  341. get { return w.SupportsInputMode; }
  342. }
  343. public override bool SupportsItalic {
  344. get { return w.SupportsItalic; }
  345. }
  346. public override bool SupportsJPhoneMultiMediaAttributes {
  347. get { return w.SupportsJPhoneMultiMediaAttributes; }
  348. }
  349. public override bool SupportsJPhoneSymbols {
  350. get { return w.SupportsJPhoneSymbols; }
  351. }
  352. public override bool SupportsQueryStringInFormAction {
  353. get { return w.SupportsQueryStringInFormAction; }
  354. }
  355. public override bool SupportsRedirectWithCookie {
  356. get { return w.SupportsRedirectWithCookie; }
  357. }
  358. public override bool SupportsSelectMultiple {
  359. get { return w.SupportsSelectMultiple; }
  360. }
  361. public override bool SupportsUncheck {
  362. get { return w.SupportsUncheck; }
  363. }
  364. public override bool SupportsXmlHttp {
  365. get { return w.SupportsXmlHttp; }
  366. }
  367. public override bool Tables {
  368. get { return w.Tables; }
  369. }
  370. public override Type TagWriter {
  371. get { return w.TagWriter; }
  372. }
  373. public override string Type {
  374. get { return w.Type; }
  375. }
  376. public override bool UseOptimizedCacheKey {
  377. get { return w.UseOptimizedCacheKey; }
  378. }
  379. public override bool VBScript {
  380. get { return w.VBScript; }
  381. }
  382. public override string Version {
  383. get { return w.Version; }
  384. }
  385. public override Version W3CDomVersion {
  386. get { return w.W3CDomVersion; }
  387. }
  388. public override bool Win16 {
  389. get { return w.Win16; }
  390. }
  391. public override bool Win32 {
  392. get { return w.Win32; }
  393. }
  394. public override void AddBrowser (string browserName)
  395. {
  396. w.AddBrowser (browserName);
  397. }
  398. [MonoTODO]
  399. public override int CompareFilters (string filter1, string filter2)
  400. {
  401. throw new NotImplementedException ();
  402. }
  403. [MonoTODO]
  404. public override HtmlTextWriter CreateHtmlTextWriter (TextWriter w)
  405. {
  406. throw new NotImplementedException ();
  407. }
  408. public override void DisableOptimizedCacheKey ()
  409. {
  410. w.DisableOptimizedCacheKey ();
  411. }
  412. [MonoTODO]
  413. public override bool EvaluateFilter (string filterName)
  414. {
  415. throw new NotImplementedException ();
  416. }
  417. public override Version [] GetClrVersions ()
  418. {
  419. return w.GetClrVersions ();
  420. }
  421. public override bool IsBrowser (string browserName)
  422. {
  423. return w.IsBrowser (browserName);
  424. }
  425. }
  426. }