You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -0,0 +1 @@
|
||||
87c20afb68987704a259c1d3389e54a33ed1ef7c
|
||||
@@ -0,0 +1,186 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
// Since System.Web.Mobile.dll is itself essentially deprecated, the codebase is no longer being actively
|
||||
// maintained. All remaining FxCop violations (as of Dev11 MQ) are baselined below.
|
||||
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2116:AptcaMethodsShouldOnlyCallAptcaMethods", Scope = "member", Target = "System.Web.UI.Design.MobileControls.CalendarDataBindingHandler.#.ctor()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2116:AptcaMethodsShouldOnlyCallAptcaMethods", Scope = "member", Target = "System.Web.UI.Design.MobileControls.ImageUrlEditor.#.ctor()")]
|
||||
[module: SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Scope = "type", Target = "System.Web.UI.Design.MobileControls.InvalidChoiceException")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2116:AptcaMethodsShouldOnlyCallAptcaMethods", Scope = "member", Target = "System.Web.UI.Design.MobileControls.MobileContainerDesigner.#.ctor()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2116:AptcaMethodsShouldOnlyCallAptcaMethods", Scope = "member", Target = "System.Web.UI.Design.MobileControls.MobileControlDesigner.#.ctor()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2116:AptcaMethodsShouldOnlyCallAptcaMethods", Scope = "member", Target = "System.Web.UI.Design.MobileControls.MobileTemplatedControlDesigner.#.ctor()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2116:AptcaMethodsShouldOnlyCallAptcaMethods", Scope = "member", Target = "System.Web.UI.Design.MobileControls.MobileUserControlDesigner.#.ctor()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2116:AptcaMethodsShouldOnlyCallAptcaMethods", Scope = "member", Target = "System.Web.UI.Design.MobileControls.StyleSheetRefUrlEditor.#.ctor()")]
|
||||
[module: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "System.Web.UI.Design.MobileControls.Util.DesignerUtility.#TopLevelControl(System.Web.UI.MobileControls.MobileControl)")]
|
||||
[module: SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", MessageId = "System.Web.UI.Design.MobileControls.NativeMethods+IOleObject.DoVerb(System.Int32,System.IntPtr,System.Web.UI.Design.MobileControls.NativeMethods+IOleClientSite,System.Int32,System.IntPtr,System.Web.UI.Design.MobileControls.NativeMethods+COMRECT)", Scope = "member", Target = "System.Web.UI.Design.MobileControls.Util.TridentSite.#ActivateDocument()")]
|
||||
[module: SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", MessageId = "System.Web.UI.Design.MobileControls.NativeMethods+IOleObject.SetClientSite(System.Web.UI.Design.MobileControls.NativeMethods+IOleClientSite)", Scope = "member", Target = "System.Web.UI.Design.MobileControls.Util.TridentSite.#CreateDocument()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2116:AptcaMethodsShouldOnlyCallAptcaMethods", Scope = "member", Target = "System.Web.UI.Design.MobileControls.Util.WebConfigManager.#.ctor(System.ComponentModel.ISite)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecific.#AddParsedSubObject(System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecific.#get_EnableViewState()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecific.#set_EnableViewState(System.Boolean)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecific.#get_Visible()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecific.#set_Visible(System.Boolean)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecificChoiceControlBuilder.#AppendLiteralString(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecificChoiceControlBuilder.#AppendSubBuilder(System.Web.UI.ControlBuilder)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecificChoiceControlBuilder.#GetChildControlType(System.String,System.Collections.IDictionary)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecificChoiceControlBuilder.#Init(System.Web.UI.TemplateParser,System.Web.UI.ControlBuilder,System.Type,System.String,System.String,System.Collections.IDictionary)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecificChoiceTemplateBuilder.#AppendLiteralString(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecificChoiceTemplateBuilder.#AppendSubBuilder(System.Web.UI.ControlBuilder)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecificChoiceTemplateBuilder.#Init(System.Web.UI.TemplateParser,System.Web.UI.ControlBuilder,System.Type,System.String,System.String,System.Collections.IDictionary)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecificControlBuilder.#AppendLiteralString(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.DeviceSpecificControlBuilder.#GetChildControlType(System.String,System.Collections.IDictionary)")]
|
||||
[module: SuppressMessage("Microsoft.MSInternal", "CA910:AlwaysSetViewStateUserKeyToUniqueValue", Scope = "type", Target = "System.Web.UI.MobileControls.ErrorFormatterPage")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.FontInfo.#ToString()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileListItem.#ToString()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileListItem.#OnBubbleEvent(System.Object,System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileListItem.#GetHashCode()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileListItem.#Equals(System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControlBuilder.#GetChildControlType(System.String,System.Collections.IDictionary)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControlBuilder.#AllowWhitespaceLiterals()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#TrackViewState()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#set_SkinID(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#get_SkinID()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#SaveViewState()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#Render(System.Web.UI.HtmlTextWriter)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#RemovedControl(System.Web.UI.Control)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#OnUnload(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#OnPreRender(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#OnLoad(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#OnInit(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#OnDataBinding(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#LoadViewState(System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#set_EnableTheming(System.Boolean)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#get_EnableTheming()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#ApplyStyleSheetSkin(System.Web.UI.Page)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#AddParsedSubObject(System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileControl.#AddedControl(System.Web.UI.Control,System.Int32)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.LiteralTextContainerControlBuilder.#AppendSubBuilder(System.Web.UI.ControlBuilder)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.LiteralTextContainerControlBuilder.#AppendLiteralString(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.List.#OnBubbleEvent(System.Object,System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.List.#EnsureChildControls()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.List.#CreateChildControls()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#SaveViewState()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#SavePageStateToPersistenceMedium(System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#RenderControl(System.Web.UI.HtmlTextWriter)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#Render(System.Web.UI.HtmlTextWriter)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#RemovedControl(System.Web.UI.Control)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#RaisePostBackEvent(System.Web.UI.IPostBackEventHandler,System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#OnUnload(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#OnPreRender(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#OnPreInit(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#OnLoad(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#OnInit(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#OnError(System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#set_MasterPageFile(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#get_MasterPageFile()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#LoadViewState(System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#LoadPageStateFromPersistenceMedium()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#InitOutputCache(System.Int32,System.String,System.String,System.Web.UI.OutputCacheLocation,System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#InitOutputCache(System.Int32,System.String,System.String,System.String,System.Web.UI.OutputCacheLocation,System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#get_IdSeparator()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#set_EnableTheming(System.Boolean)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#get_EnableTheming()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#set_EnableEventValidation(System.Boolean)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#get_EnableEventValidation()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#DeterminePostBackMode()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#CreateHtmlTextWriter(System.IO.TextWriter)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#AddParsedSubObject(System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#AddedControl(System.Web.UI.Control,System.Int32)")]
|
||||
[module: SuppressMessage("Microsoft.MSInternal", "CA910:AlwaysSetViewStateUserKeyToUniqueValue", Scope = "type", Target = "System.Web.UI.MobileControls.MobilePage")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#get_StyleSheetTheme()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#set_StyleSheetTheme(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#get_Theme()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#set_Theme(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#Validate()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobilePage.#VerifyRenderingInServerForm(System.Web.UI.Control)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.MobileUserControl.#AddParsedSubObject(System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.ObjectList.#CreateChildControls()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.ObjectList.#DataBind()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.ObjectList.#EnsureChildControls()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.ObjectList.#OnBubbleEvent(System.Object,System.EventArgs)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.StyleSheet.#get_EnableViewState()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.StyleSheet.#set_EnableViewState(System.Boolean)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.StyleSheet.#get_Visible()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.StyleSheet.#set_Visible(System.Boolean)")]
|
||||
[module: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Web.UI.MobileControls.TextBox.#set_MaxLength(System.Int32)")]
|
||||
[module: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Web.UI.MobileControls.TextBox.#set_Size(System.Int32)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.ChtmlCalendarAdapter.#HandlePostBackEvent(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.ChtmlCalendarAdapter.#Render(System.Web.UI.MobileControls.Adapters.HtmlMobileTextWriter)")]
|
||||
[module: SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.ChtmlImageAdapter.#DecimalCharToInt(System.Char)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.ChtmlImageAdapter.#DecimalCharToInt(System.Char)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.ControlAdapter.#set_Page(System.Web.UI.MobileControls.MobilePage)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.HtmlFormAdapter.#SetSecondaryUIMode(System.Web.UI.Control,System.Int32)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.HtmlMobileTextWriter.#Write(System.Char)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.HtmlMobileTextWriter.#Write(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.HtmlMobileTextWriter.#WriteBeginTag(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.HtmlMobileTextWriter.#WriteEncodedText(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.HtmlMobileTextWriter.#WriteFullBeginTag(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.HtmlMobileTextWriter.#WriteLine(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.HtmlObjectListAdapter.#HandlePostBackEvent(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.MobileTextWriter.#BeginFile(System.String,System.String,System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "float", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SR.#GetFloat(System.Globalization.CultureInfo,System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "float", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SR.#GetFloat(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "int", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SR.#GetInt(System.Globalization.CultureInfo,System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "int", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SR.#GetInt(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "long", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SR.#GetLong(System.Globalization.CultureInfo,System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "long", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SR.#GetLong(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "short", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SR.#GetShort(System.Globalization.CultureInfo,System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "short", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SR.#GetShort(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Stylesheet", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SR.#XhtmlCssHandler_StylesheetNotFound")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SRCategoryAttribute.#GetLocalizedString(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.SRDescriptionAttribute.#get_Description()")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.UpWmlMobileTextWriter.#OpenMenu()")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.UpWmlMobileTextWriter.#RenderCardClosing(System.Int32)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlCalendarAdapter.#HandlePostBackEvent(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlCalendarAdapter.#Render(System.Web.UI.MobileControls.Adapters.WmlMobileTextWriter)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlFormAdapter.#SetSecondaryUIMode(System.Web.UI.Control,System.Int32)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlMobileTextWriter.#RenderBeginForm(System.Web.UI.MobileControls.Form)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlMobileTextWriter.#WriteAttribute(System.String,System.String,System.Boolean)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlMobileTextWriter.#WriteEncodedText(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlMobileTextWriter.#WriteEncodedUrl(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlObjectListAdapter.#HandlePostBackEvent(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlObjectListAdapter.#RenderItemMenu(System.Web.UI.MobileControls.Adapters.WmlMobileTextWriter,System.Web.UI.MobileControls.ObjectListItem)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlPageAdapter.#HandleError(System.Exception,System.Web.UI.HtmlTextWriter)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String,System.Object[])", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.WmlPageAdapter.#HandleError(System.Exception,System.Web.UI.HtmlTextWriter)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlCalendarAdapter.#HandlePostBackEvent(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlCalendarAdapter.#Render(System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlCssHandler.#get_IsReusable()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlCssHandler.#ProcessRequest(System.Web.HttpContext)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlCssHandler.#ProcessRequest(System.Web.HttpContext)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlFormAdapter.#SetSecondaryUIMode(System.Web.UI.MobileControls.MobileControl,System.Int32)")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#get_CacheKey()")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#get_SessionKey()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteAttribute(System.String,System.String,System.Boolean)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteBeginTag(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteEndTag(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteFullBeginTag(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine()")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.Boolean)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.Char)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.Char[])")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.Char[],System.Int32,System.Int32)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.Double)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.Int32)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.Int64)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.Single)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.String,System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.String,System.Object,System.Object)")]
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlMobileTextWriter.#WriteLine(System.String,System.Object[])")]
|
||||
[module: SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.Web.UI.MobileControls.Adapters.SR.GetString(System.String)", Scope = "member", Target = "System.Web.UI.MobileControls.Adapters.XhtmlAdapters.XhtmlObjectListAdapter.#HandlePostBackEvent(System.String)")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1701:ResourceStringCompoundWordsShouldBeCasedCorrectly", MessageId = "databind", Scope = "resource", Target = "System.Web.Mobile.resources")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1701:ResourceStringCompoundWordsShouldBeCasedCorrectly", MessageId = "newline", Scope = "resource", Target = "System.Web.Mobile.resources")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1701:ResourceStringCompoundWordsShouldBeCasedCorrectly", MessageId = "readonly", Scope = "resource", Target = "System.Web.Mobile.resources")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "ascx", Scope = "resource", Target = "System.Web.Mobile.resources")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "png", Scope = "resource", Target = "System.Web.Mobile.resources")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "stylesheet's", Scope = "resource", Target = "System.Web.Mobile.resources")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "wbmp", Scope = "resource", Target = "System.Web.Mobile.resources")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1701:ResourceStringCompoundWordsShouldBeCasedCorrectly", MessageId = "Stylesheet", Scope = "resource", Target = "System.Web.UI.MobileControls.Adapters.resources")]
|
||||
[module: SuppressMessage("Microsoft.Naming", "CA1701:ResourceStringCompoundWordsShouldBeCasedCorrectly", MessageId = "stylesheet", Scope = "resource", Target = "System.Web.UI.MobileControls.Adapters.resources")]
|
||||
|
||||
#region CA2116 False Positives
|
||||
// CA2116 is firing false positives due to DevDiv #342582 (http://vstfdevdiv:8080/DevDiv2/web/wi.aspx?id=342582).
|
||||
// We should remove these suppressions when that bug is fixed.
|
||||
[module: SuppressMessage("Microsoft.Security", "CA2116:AptcaMethodsShouldOnlyCallAptcaMethods", Scope = "member", Target = "System.Web.UI.Design.MobileControls.Util.SimpleParser.#.cctor()", Justification = "False positive.")]
|
||||
#endregion
|
||||
@@ -0,0 +1,163 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="ConfigurationSectionHelper.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Web.Mobile
|
||||
{
|
||||
using System.Xml;
|
||||
using System.Configuration;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
[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.")]
|
||||
internal class ConfigurationSectionHelper
|
||||
{
|
||||
private XmlNode _currentNode = null;
|
||||
|
||||
internal ConfigurationSectionHelper() {
|
||||
}
|
||||
|
||||
internal /*public*/ XmlNode Node
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currentNode;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_currentNode = value;
|
||||
}
|
||||
}
|
||||
|
||||
private XmlNode GetAndRemoveAttribute(String attributeName, bool required)
|
||||
{
|
||||
XmlNode attibuteNode = _currentNode.Attributes.RemoveNamedItem(attributeName);
|
||||
|
||||
if (required && attibuteNode == null)
|
||||
{
|
||||
String msg = SR.GetString(SR.ConfigSect_MissingAttr,
|
||||
attributeName);
|
||||
throw new ConfigurationErrorsException(msg, _currentNode);
|
||||
}
|
||||
|
||||
return attibuteNode;
|
||||
}
|
||||
|
||||
|
||||
internal /*public*/ String RemoveStringAttribute(String attributeName,
|
||||
bool required)
|
||||
{
|
||||
Debug.Assert(null != _currentNode);
|
||||
|
||||
XmlNode attributeNode = GetAndRemoveAttribute(attributeName, required);
|
||||
if(attributeNode != null)
|
||||
{
|
||||
if(required && (attributeNode.Value != null && attributeNode.Value.Length == 0))
|
||||
{
|
||||
String msg = SR.GetString(SR.ConfigSect_MissingValue,
|
||||
attributeName);
|
||||
throw new ConfigurationErrorsException(msg, _currentNode);
|
||||
}
|
||||
return attributeNode.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#if UNUSED_CODE
|
||||
internal /*public*/ bool RemoveBoolAttribute(String attributeName,
|
||||
bool required,
|
||||
bool defaultValue)
|
||||
{
|
||||
Debug.Assert(null != _currentNode);
|
||||
|
||||
XmlNode attributeNode = GetAndRemoveAttribute(attributeName, required);
|
||||
if(attributeNode != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
return bool.Parse(attributeNode.Value);
|
||||
}
|
||||
catch
|
||||
{
|
||||
String msg =
|
||||
SR.GetString(SR.ConfigSect_InvalidBooleanAttr,
|
||||
attributeName);
|
||||
throw new ConfigurationErrorsException(msg, _currentNode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal /*public*/ int RemoveIntAttribute(String attributeName,
|
||||
bool required,
|
||||
int defaultValue)
|
||||
{
|
||||
Debug.Assert(null != _currentNode);
|
||||
|
||||
XmlNode attributeNode = GetAndRemoveAttribute(attributeName, required);
|
||||
if(attributeNode != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
return int.Parse(attributeNode.Value, CultureInfo.InvariantCulture);
|
||||
}
|
||||
catch
|
||||
{
|
||||
String msg =
|
||||
SR.GetString(SR.ConfigSect_InvalidIntegerAttr,
|
||||
attributeName);
|
||||
throw new ConfigurationErrorsException(msg, _currentNode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
internal /*public*/ void CheckForUnrecognizedAttributes()
|
||||
{
|
||||
Debug.Assert(null != _currentNode);
|
||||
|
||||
if(_currentNode.Attributes.Count != 0)
|
||||
{
|
||||
String msg = SR.GetString(SR.ConfigSect_UnknownAttr,
|
||||
_currentNode.Attributes[0].Name);
|
||||
throw new ConfigurationErrorsException(msg, _currentNode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal /*public*/ bool IsWhitespaceOrComment()
|
||||
{
|
||||
Debug.Assert(null != _currentNode);
|
||||
|
||||
return _currentNode.NodeType == XmlNodeType.Comment ||
|
||||
_currentNode.NodeType == XmlNodeType.Whitespace;
|
||||
}
|
||||
|
||||
|
||||
internal /*public*/ void RejectNonElement()
|
||||
{
|
||||
Debug.Assert(null != _currentNode);
|
||||
|
||||
if(_currentNode.NodeType != XmlNodeType.Element)
|
||||
{
|
||||
throw new ConfigurationErrorsException(SR.GetString(SR.ConfigSect_UnrecognizedXML),
|
||||
_currentNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="CookielessData.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Web.Mobile
|
||||
{
|
||||
/*
|
||||
* CookielessData
|
||||
* encapsulates access to data to be persisted in local links
|
||||
*
|
||||
* Copyright (c) 2000 Microsoft Corporation
|
||||
*/
|
||||
|
||||
using System.Collections.Specialized;
|
||||
using System.Web.Security;
|
||||
using System.Security.Permissions;
|
||||
|
||||
/// <include file='doc\CookielessData.uex' path='docs/doc[@for="CookielessData"]/*' />
|
||||
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[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.")]
|
||||
public class CookielessData : HybridDictionary
|
||||
{
|
||||
/// <include file='doc\CookielessData.uex' path='docs/doc[@for="CookielessData.CookielessData"]/*' />
|
||||
public CookielessData()
|
||||
{
|
||||
String name = FormsAuthentication.FormsCookieName;
|
||||
String inboundValue = HttpContext.Current.Request.QueryString[name];
|
||||
if(inboundValue == null)
|
||||
{
|
||||
inboundValue = HttpContext.Current.Request.Form[name];
|
||||
}
|
||||
if(inboundValue != null)
|
||||
{
|
||||
FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(inboundValue);
|
||||
FormsAuthenticationTicket ticket2 = FormsAuthentication.RenewTicketIfOld(ticket);
|
||||
this[name] = FormsAuthentication.Encrypt(ticket2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="DeviceFilterDictionary.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Web.Mobile
|
||||
{
|
||||
using System.Web;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using System.Diagnostics;
|
||||
using System.ComponentModel;
|
||||
|
||||
[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.")]
|
||||
internal class DeviceFilterDictionary
|
||||
{
|
||||
internal class ComparisonEvaluator
|
||||
{
|
||||
internal readonly String capabilityName;
|
||||
internal readonly String capabilityArgument;
|
||||
|
||||
internal ComparisonEvaluator(String name, String argument)
|
||||
{
|
||||
Debug.Assert(name != null);
|
||||
|
||||
capabilityName = name;
|
||||
capabilityArgument = argument;
|
||||
}
|
||||
}
|
||||
|
||||
private Hashtable _comparisonEvaluators = null;
|
||||
private Hashtable _delegateEvaluators = null;
|
||||
|
||||
|
||||
internal DeviceFilterDictionary()
|
||||
{
|
||||
_comparisonEvaluators = new Hashtable();
|
||||
_delegateEvaluators = new Hashtable();
|
||||
}
|
||||
|
||||
|
||||
internal DeviceFilterDictionary(DeviceFilterDictionary original)
|
||||
{
|
||||
_comparisonEvaluators = (Hashtable)original._comparisonEvaluators.Clone();
|
||||
_delegateEvaluators = (Hashtable)original._delegateEvaluators.Clone();
|
||||
}
|
||||
|
||||
|
||||
internal void AddCapabilityDelegate(String delegateName,
|
||||
MobileCapabilities.EvaluateCapabilitiesDelegate evaluator)
|
||||
{
|
||||
_delegateEvaluators[delegateName] = evaluator;
|
||||
}
|
||||
|
||||
|
||||
private void CheckForComparisonDelegateLoops(String delegateName)
|
||||
{
|
||||
String nextDelegateName = delegateName;
|
||||
Hashtable alreadyReferencedDelegates = new Hashtable();
|
||||
|
||||
while(true)
|
||||
{
|
||||
ComparisonEvaluator nextComparisonEvaluator =
|
||||
(ComparisonEvaluator)_comparisonEvaluators[nextDelegateName];
|
||||
if(nextComparisonEvaluator == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(alreadyReferencedDelegates.Contains(nextDelegateName))
|
||||
{
|
||||
String msg = SR.GetString(SR.DevFiltDict_FoundLoop,
|
||||
nextComparisonEvaluator.capabilityName,
|
||||
delegateName);
|
||||
throw new Exception(msg);
|
||||
}
|
||||
|
||||
alreadyReferencedDelegates[nextDelegateName] = null;
|
||||
nextDelegateName = nextComparisonEvaluator.capabilityName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal void AddComparisonDelegate(String delegateName, String comparisonName,
|
||||
String argument)
|
||||
{
|
||||
_comparisonEvaluators[delegateName] = new ComparisonEvaluator(comparisonName,
|
||||
argument);
|
||||
|
||||
CheckForComparisonDelegateLoops(delegateName);
|
||||
}
|
||||
|
||||
|
||||
internal bool FindComparisonEvaluator(String evaluatorName, out String capabilityName,
|
||||
out String capabilityArgument)
|
||||
{
|
||||
capabilityName = null;
|
||||
capabilityArgument = null;
|
||||
|
||||
ComparisonEvaluator evaluator = (ComparisonEvaluator)_comparisonEvaluators[evaluatorName];
|
||||
if(evaluator == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
capabilityName = evaluator.capabilityName;
|
||||
capabilityArgument = evaluator.capabilityArgument;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
internal bool FindDelegateEvaluator(String evaluatorName,
|
||||
out MobileCapabilities.EvaluateCapabilitiesDelegate evaluatorDelegate)
|
||||
{
|
||||
evaluatorDelegate = null;
|
||||
|
||||
MobileCapabilities.EvaluateCapabilitiesDelegate evaluator;
|
||||
evaluator = (MobileCapabilities.EvaluateCapabilitiesDelegate)
|
||||
_delegateEvaluators[evaluatorName];
|
||||
if(evaluator == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
evaluatorDelegate = evaluator;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
internal bool IsComparisonEvaluator(String evaluatorName)
|
||||
{
|
||||
return _comparisonEvaluators.Contains(evaluatorName);
|
||||
}
|
||||
|
||||
internal bool IsDelegateEvaluator(String evaluatorName)
|
||||
{
|
||||
return _delegateEvaluators.Contains(evaluatorName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,368 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="DeviceFiltersSection.cs" company="Microsoft Corporation">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
using System.Diagnostics;
|
||||
using System.Web.UI.MobileControls;
|
||||
|
||||
namespace System.Web.Mobile {
|
||||
[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.")]
|
||||
public sealed class DeviceFiltersSection : ConfigurationSection {
|
||||
internal static readonly TypeConverter StdTypeNameConverter = new MobileTypeNameConverter();
|
||||
internal static readonly ConfigurationValidatorBase NonEmptyStringValidator = new StringValidator( 1 );
|
||||
|
||||
private static ConfigurationPropertyCollection _properties;
|
||||
|
||||
#region Property Declarations
|
||||
private static readonly ConfigurationProperty _propFilters =
|
||||
new ConfigurationProperty( null,
|
||||
typeof( DeviceFilterElementCollection ),
|
||||
null,
|
||||
ConfigurationPropertyOptions.IsDefaultCollection );
|
||||
#endregion
|
||||
|
||||
private object _deviceFilterslock = new object();
|
||||
private DeviceFilterDictionary _deviceFilters;
|
||||
|
||||
static DeviceFiltersSection() {
|
||||
// Property initialization
|
||||
_properties = new ConfigurationPropertyCollection();
|
||||
_properties.Add( _propFilters );
|
||||
}
|
||||
|
||||
public DeviceFiltersSection() {
|
||||
}
|
||||
|
||||
protected override ConfigurationPropertyCollection Properties {
|
||||
get {
|
||||
return _properties;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("", IsDefaultCollection = true)]
|
||||
public DeviceFilterElementCollection Filters {
|
||||
get {
|
||||
return (DeviceFilterElementCollection)base[ _propFilters ];
|
||||
}
|
||||
}
|
||||
|
||||
internal DeviceFilterDictionary GetDeviceFilters() {
|
||||
if (_deviceFilters == null) {
|
||||
lock (_deviceFilterslock) {
|
||||
if (_deviceFilters == null) {
|
||||
_deviceFilters = CreateDeviceFilters();
|
||||
}
|
||||
}
|
||||
}
|
||||
return _deviceFilters;
|
||||
}
|
||||
|
||||
// Essentially this method does what MobileDeviceCapabilitiesSectionHandler.Create()
|
||||
// does, but use this DeviceFiltersSection for retrieving config data instead
|
||||
private DeviceFilterDictionary CreateDeviceFilters() {
|
||||
DeviceFilterDictionary filterDictionary = new DeviceFilterDictionary();
|
||||
|
||||
foreach (DeviceFilterElement deviceFilter in Filters) {
|
||||
if (deviceFilter.FilterClass != null) {
|
||||
filterDictionary.AddCapabilityDelegate(deviceFilter.Name, deviceFilter.GetDelegate());
|
||||
}
|
||||
else {
|
||||
try {
|
||||
filterDictionary.AddComparisonDelegate(
|
||||
deviceFilter.Name, deviceFilter.Compare, deviceFilter.Argument);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new ConfigurationErrorsException(
|
||||
SR.GetString(SR.DevCapSect_UnableAddDelegate, deviceFilter.Name, e.Message));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return filterDictionary;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[ConfigurationCollection(typeof(DeviceFilterElement), AddItemName = "filter",
|
||||
CollectionType = ConfigurationElementCollectionType.BasicMap)]
|
||||
[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.")]
|
||||
public sealed class DeviceFilterElementCollection : ConfigurationElementCollection {
|
||||
private static readonly ConfigurationPropertyCollection _properties;
|
||||
|
||||
static DeviceFilterElementCollection() {
|
||||
_properties = new ConfigurationPropertyCollection();
|
||||
}
|
||||
|
||||
public DeviceFilterElementCollection() {
|
||||
}
|
||||
|
||||
protected override ConfigurationPropertyCollection Properties {
|
||||
get {
|
||||
return _properties;
|
||||
}
|
||||
}
|
||||
|
||||
public object[] AllKeys {
|
||||
get {
|
||||
return BaseGetAllKeys();
|
||||
}
|
||||
}
|
||||
|
||||
public void Add( DeviceFilterElement deviceFilter ) {
|
||||
BaseAdd( deviceFilter );
|
||||
}
|
||||
|
||||
public void Remove( string name ) {
|
||||
BaseRemove( name );
|
||||
}
|
||||
|
||||
public void Remove( DeviceFilterElement deviceFilter ) {
|
||||
BaseRemove( GetElementKey( deviceFilter ) );
|
||||
}
|
||||
|
||||
public void RemoveAt( int index ) {
|
||||
BaseRemoveAt( index );
|
||||
}
|
||||
|
||||
public new DeviceFilterElement this[ string name ] {
|
||||
get {
|
||||
return (DeviceFilterElement)BaseGet( name );
|
||||
}
|
||||
}
|
||||
|
||||
public DeviceFilterElement this[ int index ] {
|
||||
get {
|
||||
return (DeviceFilterElement)BaseGet( index );
|
||||
}
|
||||
set {
|
||||
if ( BaseGet( index ) != null) {
|
||||
BaseRemoveAt( index );
|
||||
}
|
||||
|
||||
BaseAdd( index, value );
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear() {
|
||||
BaseClear();
|
||||
}
|
||||
|
||||
protected override ConfigurationElement CreateNewElement() {
|
||||
return new DeviceFilterElement();
|
||||
}
|
||||
|
||||
protected override Object GetElementKey( ConfigurationElement element ) {
|
||||
return ( (DeviceFilterElement)element ).Name;
|
||||
}
|
||||
|
||||
protected override string ElementName {
|
||||
get
|
||||
{
|
||||
return "filter";
|
||||
}
|
||||
}
|
||||
|
||||
public override ConfigurationElementCollectionType CollectionType {
|
||||
get {
|
||||
return ConfigurationElementCollectionType.BasicMap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[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.")]
|
||||
public sealed class DeviceFilterElement : ConfigurationElement {
|
||||
private static readonly ConfigurationElementProperty s_elemProperty = new ConfigurationElementProperty( new CallbackValidator( typeof( DeviceFilterElement ), ValidateElement ) );
|
||||
private static ConfigurationPropertyCollection _properties;
|
||||
|
||||
#region Property Declarations
|
||||
private static readonly ConfigurationProperty _propName =
|
||||
new ConfigurationProperty( "name",
|
||||
typeof( string ),
|
||||
null,
|
||||
null,
|
||||
DeviceFiltersSection.NonEmptyStringValidator,
|
||||
ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey );
|
||||
|
||||
private static readonly ConfigurationProperty _propFilterClass =
|
||||
new ConfigurationProperty( "type",
|
||||
typeof( Type ),
|
||||
null,
|
||||
DeviceFiltersSection.StdTypeNameConverter,
|
||||
null,
|
||||
ConfigurationPropertyOptions.IsTypeStringTransformationRequired);
|
||||
|
||||
private static readonly ConfigurationProperty _propMethod =
|
||||
new ConfigurationProperty( "method",
|
||||
typeof( string ),
|
||||
null,
|
||||
null,
|
||||
DeviceFiltersSection.NonEmptyStringValidator,
|
||||
ConfigurationPropertyOptions.None );
|
||||
|
||||
private static readonly ConfigurationProperty _propCompare =
|
||||
new ConfigurationProperty( "compare",
|
||||
typeof( string ),
|
||||
null,
|
||||
null,
|
||||
DeviceFiltersSection.NonEmptyStringValidator,
|
||||
ConfigurationPropertyOptions.None );
|
||||
|
||||
private static readonly ConfigurationProperty _propArgument =
|
||||
new ConfigurationProperty( "argument",
|
||||
typeof( string ),
|
||||
null,
|
||||
null,
|
||||
DeviceFiltersSection.NonEmptyStringValidator,
|
||||
ConfigurationPropertyOptions.None );
|
||||
#endregion
|
||||
|
||||
static DeviceFilterElement() {
|
||||
// Property initialization
|
||||
_properties = new ConfigurationPropertyCollection();
|
||||
_properties.Add( _propName );
|
||||
_properties.Add( _propFilterClass );
|
||||
_properties.Add( _propMethod );
|
||||
_properties.Add( _propCompare );
|
||||
_properties.Add( _propArgument );
|
||||
}
|
||||
|
||||
internal DeviceFilterElement() {
|
||||
}
|
||||
|
||||
public DeviceFilterElement( string name, Type filterClass, string method ) {
|
||||
base[_propName] = name;
|
||||
base[_propFilterClass] = filterClass;
|
||||
base[_propMethod] = method;
|
||||
}
|
||||
|
||||
public DeviceFilterElement( string name, string compareName, string argument ) {
|
||||
base[_propName] = name;
|
||||
base[_propCompare] = compareName;
|
||||
base[_propArgument] = argument;
|
||||
}
|
||||
|
||||
protected override ConfigurationPropertyCollection Properties {
|
||||
get {
|
||||
return _properties;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("name", IsRequired = true, IsKey = true)]
|
||||
[StringValidator(MinLength = 1)]
|
||||
public string Name {
|
||||
get {
|
||||
return (string)base[ _propName ];
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("type")]
|
||||
[TypeConverter(typeof(MobileTypeNameConverter))]
|
||||
public Type FilterClass {
|
||||
get {
|
||||
return (Type)base[ _propFilterClass ];
|
||||
}
|
||||
set {
|
||||
base[ _propFilterClass ] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("method")]
|
||||
[StringValidator(MinLength = 1)]
|
||||
public string Method {
|
||||
get {
|
||||
return (string)base[ _propMethod ];
|
||||
}
|
||||
set {
|
||||
base[ _propMethod ] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("compare")]
|
||||
[StringValidator(MinLength = 1)]
|
||||
public string Compare {
|
||||
get {
|
||||
return (string)base[ _propCompare ];
|
||||
}
|
||||
set {
|
||||
base[ _propCompare ] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty("argument")]
|
||||
[StringValidator(MinLength = 1)]
|
||||
public string Argument {
|
||||
get {
|
||||
return (string)base[ _propArgument ];
|
||||
}
|
||||
set {
|
||||
base[ _propArgument ] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected override ConfigurationElementProperty ElementProperty
|
||||
{
|
||||
get
|
||||
{
|
||||
return s_elemProperty;
|
||||
}
|
||||
}
|
||||
|
||||
internal MobileCapabilities.EvaluateCapabilitiesDelegate GetDelegate() {
|
||||
try {
|
||||
return (MobileCapabilities.EvaluateCapabilitiesDelegate)MobileCapabilities.EvaluateCapabilitiesDelegate.CreateDelegate(
|
||||
typeof(MobileCapabilities.EvaluateCapabilitiesDelegate),
|
||||
FilterClass,
|
||||
Method);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new ConfigurationErrorsException(
|
||||
SR.GetString(SR.DevCapSect_NoCapabilityEval, Method, e.Message));
|
||||
}
|
||||
}
|
||||
|
||||
static private void ValidateElement( object value ) {
|
||||
Debug.Assert((value != null) && (value is DeviceFilterElement));
|
||||
|
||||
DeviceFilterElement elem = (DeviceFilterElement)value;
|
||||
|
||||
// If the filter class is specified, we need the method attribute but
|
||||
// not the compare and argument attributes.
|
||||
if (elem.FilterClass != null) {
|
||||
if(string.IsNullOrEmpty(elem.Method)) {
|
||||
throw new ConfigurationErrorsException(
|
||||
SR.GetString(SR.ConfigSect_MissingAttr, "method"));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(elem.Compare)) {
|
||||
throw new ConfigurationErrorsException(SR.GetString(SR.DevCapSect_ExtraCompareDelegator));
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(elem.Argument)) {
|
||||
throw new ConfigurationErrorsException(SR.GetString(SR.DevCapSect_ExtraArgumentDelegator));
|
||||
}
|
||||
|
||||
// Resolve the method
|
||||
elem.GetDelegate();
|
||||
}
|
||||
// Otherwise, we need the compare and argument attributes but not
|
||||
// the method attribute.
|
||||
else {
|
||||
if (string.IsNullOrEmpty(elem.Compare)) {
|
||||
throw new ConfigurationErrorsException(
|
||||
SR.GetString(SR.DevCapSect_MustSpecify));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(elem.Method)) {
|
||||
throw new ConfigurationErrorsException(
|
||||
SR.GetString(SR.DevCapSect_ComparisonAlreadySpecified));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="ErrorHandlerModule.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Diagnostics;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
using System.Security.Permissions;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Web.Mobile
|
||||
{
|
||||
/*
|
||||
* Error Handler Module
|
||||
* An Http Module that traps errors, and formats them for the appropriate
|
||||
* device.
|
||||
*
|
||||
* Copyright (c) 2000 Microsoft Corporation
|
||||
*/
|
||||
|
||||
/// <include file='doc\ErrorHandlerModule.uex' path='docs/doc[@for="ErrorHandlerModule"]/*' />
|
||||
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[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.")]
|
||||
public class ErrorHandlerModule : IHttpModule
|
||||
{
|
||||
/// <include file='doc\ErrorHandlerModule.uex' path='docs/doc[@for="ErrorHandlerModule.IHttpModule.Init"]/*' />
|
||||
/// <internalonly/>
|
||||
void IHttpModule.Init(HttpApplication application)
|
||||
{
|
||||
// application.BeginRequest += (new EventHandler(this.Application_BeginRequest));
|
||||
application.Error += (new EventHandler(this.Application_Error));
|
||||
// application.EndRequest += (new EventHandler(this.Application_EndRequest));
|
||||
}
|
||||
|
||||
/* obsolete
|
||||
private void Application_BeginRequest(Object source, EventArgs e)
|
||||
{
|
||||
HttpApplication application = (HttpApplication)source;
|
||||
HttpContext context = application.Context;
|
||||
if (context != null)
|
||||
{
|
||||
// Some device/gateway combination sends postdata's charset
|
||||
// in a separate header rather than in Content-Type.
|
||||
SetCharsetInRequestHeader(context);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetCharsetInRequestHeader(HttpContext context)
|
||||
{
|
||||
String userAgent = context.Request.UserAgent;
|
||||
|
||||
if (userAgent != null && CultureInfo.InvariantCulture.CompareInfo.IsPrefix(userAgent, "UP"))
|
||||
{
|
||||
String postDataCharset = context.Request.Headers["x-up-devcap-post-charset"];
|
||||
if (postDataCharset != null && postDataCharset.Length > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
context.Request.ContentEncoding = Encoding.GetEncoding(postDataCharset);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Exception may be thrown when charset is not valid.
|
||||
// In this case, do nothing, and let the framework
|
||||
// use the configured RequestEncoding setting.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/* Obsolete
|
||||
private void Application_EndRequest(Object source, EventArgs e)
|
||||
{
|
||||
HttpApplication application = (HttpApplication)source;
|
||||
HttpContext context = application.Context;
|
||||
if (context != null)
|
||||
{
|
||||
MobileRedirect.CheckForInvalidRedirection(context);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
private void Application_Error(Object source, EventArgs e)
|
||||
{
|
||||
HttpApplication application = (HttpApplication)source;
|
||||
HttpContext context = null;
|
||||
bool useAdaptiveErrorReporting = false;
|
||||
|
||||
try
|
||||
{
|
||||
context = application.Context;
|
||||
|
||||
if(context.IsCustomErrorEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Exception error = context.Server.GetLastError();
|
||||
|
||||
if ((error == null) || (!RequiresAdaptiveErrorReporting(context, error)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
useAdaptiveErrorReporting = true;
|
||||
|
||||
MobileErrorInfo errorInfo = new MobileErrorInfo(error);
|
||||
context.Items[MobileErrorInfo.ContextKey] = errorInfo;
|
||||
|
||||
context.Response.Clear();
|
||||
IHttpHandler errorHandler = CreateErrorFormatter(context);
|
||||
errorHandler.ProcessRequest(context);
|
||||
}
|
||||
catch(Exception e2)
|
||||
{
|
||||
if (useAdaptiveErrorReporting && context != null)
|
||||
{
|
||||
// Failed to format error. Let it continue through
|
||||
// default processing.
|
||||
|
||||
context.Response.Write(e2.ToString());
|
||||
context.Server.ClearError();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
context.Server.ClearError();
|
||||
}
|
||||
|
||||
/// <include file='doc\ErrorHandlerModule.uex' path='docs/doc[@for="ErrorHandlerModule.IHttpModule.Dispose"]/*' />
|
||||
/// <internalonly/>
|
||||
void IHttpModule.Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
private bool RequiresAdaptiveErrorReporting(HttpContext context, Exception error)
|
||||
{
|
||||
// Check if the error message is a non-500 error.
|
||||
|
||||
HttpException httpError = error as HttpException;
|
||||
if (httpError != null && httpError.GetHttpCode() != 500)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool b;
|
||||
|
||||
// Checks whether custom error formatting is required for the
|
||||
// given device.
|
||||
|
||||
MobileCapabilities caps = context.Request.Browser as MobileCapabilities;
|
||||
if (caps == null)
|
||||
{
|
||||
b = false;
|
||||
}
|
||||
else if (caps.PreferredRenderingMime != "text/html")
|
||||
{
|
||||
b = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
b = caps.RequiresHtmlAdaptiveErrorReporting;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
private IHttpHandler CreateErrorFormatter(HttpContext context)
|
||||
{
|
||||
//
|
||||
|
||||
return new System.Web.UI.MobileControls.ErrorFormatterPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,187 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="MobileDeviceCapabilitiesSectionHandler.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Web.Mobile
|
||||
{
|
||||
using System.Collections;
|
||||
using System.Configuration;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
using System.Security.Permissions;
|
||||
|
||||
/// <include file='doc\MobileDeviceCapabilitiesSectionHandler.uex' path='docs/doc[@for="MobileDeviceCapabilitiesSectionHandler"]/*' />
|
||||
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[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.")]
|
||||
public class MobileDeviceCapabilitiesSectionHandler : IConfigurationSectionHandler
|
||||
{
|
||||
// IConfigurationSectionHandler Methods
|
||||
/// <include file='doc\MobileDeviceCapabilitiesSectionHandler.uex' path='docs/doc[@for="MobileDeviceCapabilitiesSectionHandler.IConfigurationSectionHandler.Create"]/*' />
|
||||
/// <internalonly/>
|
||||
Object IConfigurationSectionHandler.Create(Object parent, Object context,
|
||||
XmlNode node)
|
||||
{
|
||||
return Create(parent, context, node);
|
||||
}
|
||||
|
||||
protected object Create(Object parent, Object context, XmlNode node) {
|
||||
// see ASURT 123738
|
||||
if (context == null || context.GetType() != typeof(System.Web.Configuration.HttpConfigurationContext)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
DeviceFilterDictionary currentFilterDictionary;
|
||||
|
||||
if(parent == null)
|
||||
{
|
||||
currentFilterDictionary = new DeviceFilterDictionary();
|
||||
}
|
||||
else
|
||||
{
|
||||
currentFilterDictionary = new DeviceFilterDictionary(
|
||||
(DeviceFilterDictionary)parent);
|
||||
}
|
||||
|
||||
ConfigurationSectionHelper helper = new ConfigurationSectionHelper();
|
||||
foreach(XmlNode child in node.ChildNodes)
|
||||
{
|
||||
helper.Node = child;
|
||||
|
||||
// skip whitespace and comments
|
||||
if(helper.IsWhitespaceOrComment())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// reject nonelements
|
||||
helper.RejectNonElement();
|
||||
|
||||
// handle <filter> tags
|
||||
|
||||
if(child.Name.Equals("filter"))
|
||||
{
|
||||
String name = helper.RemoveStringAttribute("name", true);
|
||||
String className = helper.RemoveStringAttribute("type", false);
|
||||
|
||||
if(className != null)
|
||||
{
|
||||
const String methodAttributeName = "method";
|
||||
String methodName = helper.RemoveStringAttribute(methodAttributeName, false);
|
||||
String capabilityName = helper.RemoveStringAttribute("compare", false);
|
||||
String argumentValue = helper.RemoveStringAttribute("argument", false);
|
||||
|
||||
helper.CheckForUnrecognizedAttributes();
|
||||
|
||||
if(className == String.Empty)
|
||||
{
|
||||
throw new
|
||||
ConfigurationErrorsException(SR.GetString(SR.DevCapSect_EmptyClass), child);
|
||||
}
|
||||
|
||||
if(methodName == null)
|
||||
{
|
||||
throw new
|
||||
ConfigurationErrorsException(SR.GetString(SR.ConfigSect_MissingAttr, methodAttributeName), child);
|
||||
}
|
||||
|
||||
if(methodName == String.Empty)
|
||||
{
|
||||
throw new
|
||||
ConfigurationErrorsException(SR.GetString(SR.ConfigSect_MissingValue, methodAttributeName), child);
|
||||
}
|
||||
|
||||
if(capabilityName != null || argumentValue != null)
|
||||
{
|
||||
String msg;
|
||||
if (capabilityName != null)
|
||||
{
|
||||
msg = SR.GetString(SR.DevCapSect_ExtraCompareDelegator);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = SR.GetString(SR.DevCapSect_ExtraArgumentDelegator);
|
||||
}
|
||||
|
||||
throw new ConfigurationErrorsException(msg, child);
|
||||
}
|
||||
|
||||
MobileCapabilities.EvaluateCapabilitiesDelegate evaluator;
|
||||
|
||||
Type evaluatorClass = Type.GetType(className);
|
||||
|
||||
if(null == evaluatorClass)
|
||||
{
|
||||
String msg =
|
||||
SR.GetString(SR.DevCapSect_NoTypeInfo, className);
|
||||
throw new ConfigurationErrorsException(msg, child);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
evaluator =
|
||||
(MobileCapabilities.EvaluateCapabilitiesDelegate)
|
||||
MobileCapabilities.EvaluateCapabilitiesDelegate.CreateDelegate(
|
||||
typeof(MobileCapabilities.EvaluateCapabilitiesDelegate),
|
||||
evaluatorClass, methodName);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
String msg =
|
||||
SR.GetString(SR.DevCapSect_NoCapabilityEval,
|
||||
methodName, e.Message);
|
||||
throw new ConfigurationErrorsException(msg, child);
|
||||
}
|
||||
|
||||
currentFilterDictionary.AddCapabilityDelegate(name, evaluator);
|
||||
}
|
||||
else
|
||||
{
|
||||
String capabilityName = helper.RemoveStringAttribute("compare", false);
|
||||
String argumentValue = helper.RemoveStringAttribute("argument", false);
|
||||
String methodName = helper.RemoveStringAttribute("method", false);
|
||||
|
||||
helper.CheckForUnrecognizedAttributes();
|
||||
|
||||
if(String.IsNullOrEmpty(capabilityName))
|
||||
{
|
||||
throw new ConfigurationErrorsException(
|
||||
SR.GetString(SR.DevCapSect_MustSpecify),
|
||||
child);
|
||||
}
|
||||
|
||||
if(methodName != null)
|
||||
{
|
||||
throw new ConfigurationErrorsException(
|
||||
SR.GetString(SR.DevCapSect_ComparisonAlreadySpecified),
|
||||
child);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
currentFilterDictionary.AddComparisonDelegate(name, capabilityName, argumentValue);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
String msg = SR.GetString(SR.DevCapSect_UnableAddDelegate,
|
||||
name, e.Message);
|
||||
throw new ConfigurationErrorsException(msg, child);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
String msg = SR.GetString(SR.DevCapSect_UnrecognizedTag,
|
||||
child.Name);
|
||||
throw new ConfigurationErrorsException(msg, child);
|
||||
}
|
||||
|
||||
helper.Node = null;
|
||||
}
|
||||
|
||||
return currentFilterDictionary;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,337 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="MobileErrorInfo.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace System.Web.Mobile
|
||||
{
|
||||
/*
|
||||
* Mobile Error Info
|
||||
* Contains information about an error that occurs in a mobile application.
|
||||
* This information can be used to format the error for the target device.
|
||||
*
|
||||
*
|
||||
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[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.")]
|
||||
public class MobileErrorInfo
|
||||
{
|
||||
/// <include file='doc\MobileErrorInfo.uex' path='docs/doc[@for="MobileErrorInfo.ContextKey"]/*' />
|
||||
public static readonly String ContextKey = "MobileErrorInfo";
|
||||
private static object _lockObject = new object();
|
||||
|
||||
private const String _errorType = "Type";
|
||||
private const String _errorDescription = "Description";
|
||||
private const String _errorMiscTitle = "MiscTitle";
|
||||
private const String _errorMiscText = "MiscText";
|
||||
private const String _errorFile = "File";
|
||||
private const String _errorLineNumber = "LineNumber";
|
||||
private static Regex[] _searchExpressions = null;
|
||||
private static bool _searchExpressionsBuilt = false;
|
||||
private const int _expressionCount = 3;
|
||||
|
||||
private StringDictionary _dictionary = new StringDictionary();
|
||||
|
||||
internal MobileErrorInfo(Exception e)
|
||||
{
|
||||
// Don't want any failure to escape here...
|
||||
try
|
||||
{
|
||||
// For some reason, the compile exception lives in the
|
||||
// InnerException.
|
||||
HttpCompileException compileException =
|
||||
e.InnerException as HttpCompileException;
|
||||
|
||||
if (compileException != null)
|
||||
{
|
||||
this.Type = SR.GetString(SR.MobileErrorInfo_CompilationErrorType);
|
||||
this.Description = SR.GetString(SR.MobileErrorInfo_CompilationErrorDescription);
|
||||
this.MiscTitle = SR.GetString(SR.MobileErrorInfo_CompilationErrorMiscTitle);
|
||||
|
||||
CompilerErrorCollection errors = compileException.Results.Errors;
|
||||
|
||||
if (errors != null && errors.Count >= 1)
|
||||
{
|
||||
CompilerError error = errors[0];
|
||||
this.LineNumber = error.Line.ToString(CultureInfo.InvariantCulture);
|
||||
this.File = error.FileName;
|
||||
this.MiscText = error.ErrorNumber + ":" + error.ErrorText;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.LineNumber = SR.GetString(SR.MobileErrorInfo_Unknown);
|
||||
this.File = SR.GetString(SR.MobileErrorInfo_Unknown);
|
||||
this.MiscText = SR.GetString(SR.MobileErrorInfo_Unknown);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
HttpParseException parseException = e as HttpParseException;
|
||||
if (parseException != null)
|
||||
{
|
||||
this.Type = SR.GetString(SR.MobileErrorInfo_ParserErrorType);
|
||||
this.Description = SR.GetString(SR.MobileErrorInfo_ParserErrorDescription);
|
||||
this.MiscTitle = SR.GetString(SR.MobileErrorInfo_ParserErrorMiscTitle);
|
||||
this.LineNumber = parseException.Line.ToString(CultureInfo.InvariantCulture);
|
||||
this.File = parseException.FileName;
|
||||
this.MiscText = parseException.Message;
|
||||
return;
|
||||
}
|
||||
|
||||
// We try to use the hacky way of parsing an HttpException of an
|
||||
// unknown subclass.
|
||||
HttpException httpException = e as HttpException;
|
||||
if (httpException != null && ParseHttpException(httpException))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Don't need to do anything here, just continue to base case
|
||||
// below.
|
||||
}
|
||||
|
||||
// Default to the most basic if none of the above succeed.
|
||||
this.Type = e.GetType().FullName;
|
||||
this.Description = e.Message;
|
||||
this.MiscTitle = SR.GetString(SR.MobileErrorInfo_SourceObject);
|
||||
String s = e.StackTrace;
|
||||
if(s != null) {
|
||||
int i = s.IndexOf('\r');
|
||||
if (i != -1)
|
||||
{
|
||||
s = s.Substring(0, i);
|
||||
}
|
||||
this.MiscText = s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <include file='doc\MobileErrorInfo.uex' path='docs/doc[@for="MobileErrorInfo.this"]/*' />
|
||||
public String this[String key]
|
||||
{
|
||||
get
|
||||
{
|
||||
String s = _dictionary[key];
|
||||
return (s == null) ? String.Empty : s;
|
||||
}
|
||||
set
|
||||
{
|
||||
_dictionary[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\MobileErrorInfo.uex' path='docs/doc[@for="MobileErrorInfo.Type"]/*' />
|
||||
public String Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[_errorType];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[_errorType] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\MobileErrorInfo.uex' path='docs/doc[@for="MobileErrorInfo.Description"]/*' />
|
||||
public String Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[_errorDescription];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[_errorDescription] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\MobileErrorInfo.uex' path='docs/doc[@for="MobileErrorInfo.MiscTitle"]/*' />
|
||||
public String MiscTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[_errorMiscTitle];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[_errorMiscTitle] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\MobileErrorInfo.uex' path='docs/doc[@for="MobileErrorInfo.MiscText"]/*' />
|
||||
public String MiscText
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[_errorMiscText];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[_errorMiscText] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\MobileErrorInfo.uex' path='docs/doc[@for="MobileErrorInfo.File"]/*' />
|
||||
public String File
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[_errorFile];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[_errorFile] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\MobileErrorInfo.uex' path='docs/doc[@for="MobileErrorInfo.LineNumber"]/*' />
|
||||
public String LineNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[_errorLineNumber];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[_errorLineNumber] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Return true if we succeed
|
||||
private bool ParseHttpException(HttpException e)
|
||||
{
|
||||
int i;
|
||||
Match match = null;
|
||||
|
||||
String errorMessage = e.GetHtmlErrorMessage();
|
||||
if (errorMessage == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Use regular expressions to scrape the message output
|
||||
// for meaningful data. One problem: Some parts of the
|
||||
// output are optional, and any regular expression that
|
||||
// uses the ()? syntax doesn't pick it up. So, we have
|
||||
// to have all the different combinations of expressions,
|
||||
// and use each one in order.
|
||||
|
||||
EnsureSearchExpressions();
|
||||
for (i = 0; i < _expressionCount; i++)
|
||||
{
|
||||
match = _searchExpressions[i].Match(errorMessage);
|
||||
if (match.Success)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == _expressionCount)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
this.Type = TrimAndClean(match.Result("${title}"));
|
||||
this.Description = TrimAndClean(match.Result("${description}"));
|
||||
if (i <= 1)
|
||||
{
|
||||
// These expressions were able to match the miscellaneous
|
||||
// title/text section.
|
||||
this.MiscTitle = TrimAndClean(match.Result("${misctitle}"));
|
||||
this.MiscText = TrimAndClean(match.Result("${misctext}"));
|
||||
}
|
||||
if (i == 0)
|
||||
{
|
||||
// This expression was able to match the file/line #
|
||||
// section.
|
||||
this.File = TrimAndClean(match.Result("${file}"));
|
||||
this.LineNumber = TrimAndClean(match.Result("${linenumber}"));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void EnsureSearchExpressions()
|
||||
{
|
||||
// Create precompiled search expressions. They're here
|
||||
// rather than in static variables, so that we can load
|
||||
// them from resources on demand. But once they're loaded,
|
||||
// they're compiled and always available.
|
||||
|
||||
if (!_searchExpressionsBuilt)
|
||||
{
|
||||
lock(_lockObject)
|
||||
{
|
||||
if (!_searchExpressionsBuilt)
|
||||
{
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Why three similar expressions? See ParseHttpException above.
|
||||
|
||||
_searchExpressions = new Regex[_expressionCount];
|
||||
|
||||
_searchExpressions[0] = new Regex(
|
||||
"<title>(?'title'.*?)</title>.*?" +
|
||||
": </b>(?'description'.*?)<br>.*?" +
|
||||
"(<b>(?'misctitle'.*?): </b>(?'misctext'.*?)<br)+.*?" +
|
||||
"(Source File:</b>(?'file'.*?) <b>Line:</b>(?'linenumber'.*?)<br)+",
|
||||
RegexOptions.Singleline |
|
||||
RegexOptions.IgnoreCase |
|
||||
RegexOptions.CultureInvariant |
|
||||
RegexOptions.Compiled);
|
||||
|
||||
_searchExpressions[1] = new Regex(
|
||||
"<title>(?'title'.*?)</title>.*?" +
|
||||
": </b>(?'description'.*?)<br>.*?" +
|
||||
"(<b>(?'misctitle'.*?): </b>(?'misctext'.*?)<br)+.*?",
|
||||
RegexOptions.Singleline |
|
||||
RegexOptions.IgnoreCase |
|
||||
RegexOptions.CultureInvariant |
|
||||
RegexOptions.Compiled);
|
||||
|
||||
_searchExpressions[2] = new Regex(
|
||||
"<title>(?'title'.*?)</title>.*?: </b>(?'description'.*?)<br>",
|
||||
RegexOptions.Singleline |
|
||||
RegexOptions.IgnoreCase |
|
||||
RegexOptions.CultureInvariant |
|
||||
RegexOptions.Compiled);
|
||||
|
||||
_searchExpressionsBuilt = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String TrimAndClean(String s)
|
||||
{
|
||||
return s.Replace("\r\n", " ").Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="MobileFormsAuthentication.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Security;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI.MobileControls;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace System.Web.Mobile
|
||||
{
|
||||
/*
|
||||
* MobileFormsAuthentication
|
||||
* provides mobile comopatible version of ASP.Net methods
|
||||
*
|
||||
* Copyright (c) 2000 Microsoft Corporation
|
||||
*/
|
||||
|
||||
|
||||
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[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.")]
|
||||
public class MobileFormsAuthentication
|
||||
{
|
||||
// Class only contains statics, so make the constructor private.
|
||||
private MobileFormsAuthentication()
|
||||
{
|
||||
}
|
||||
|
||||
/// <include file='doc\MobileFormsAuthentication.uex' path='docs/doc[@for="MobileFormsAuthentication.RedirectFromLoginPage"]/*' />
|
||||
public static void RedirectFromLoginPage(String userName, bool createPersistentCookie)
|
||||
{
|
||||
FormsAuthentication.RedirectFromLoginPage(userName, createPersistentCookie, FormsAuthentication.FormsCookiePath);
|
||||
}
|
||||
|
||||
/// <include file='doc\MobileFormsAuthentication.uex' path='docs/doc[@for="MobileFormsAuthentication.RedirectFromLoginPage1"]/*' />
|
||||
public static void RedirectFromLoginPage(String userName, bool createPersistentCookie, String strCookiePath)
|
||||
{
|
||||
FormsAuthentication.RedirectFromLoginPage(userName, createPersistentCookie, strCookiePath);
|
||||
/*
|
||||
// Disallow redirection to an absolute url.
|
||||
String requestReturnUrl = HttpContext.Current.Request["ReturnUrl"];
|
||||
if (requestReturnUrl != null && requestReturnUrl.IndexOf (":") != -1)
|
||||
{
|
||||
throw new SecurityException(SR.GetString(SR.Security_ReturnUrlCannotBeAbsolute, requestReturnUrl));
|
||||
}
|
||||
|
||||
// GetRedirectUrl redirects to returnUrl if it exists, current app's default.aspx otherwise.
|
||||
String redirectUrl = FormsAuthentication.GetRedirectUrl(userName, createPersistentCookie);
|
||||
Debug.Assert (redirectUrl == requestReturnUrl || requestReturnUrl == null);
|
||||
|
||||
String updatedRedirectUrl = redirectUrl;
|
||||
String cookieName = FormsAuthentication.FormsCookieName;
|
||||
HttpCookie cookie = FormsAuthentication.GetAuthCookie(userName, createPersistentCookie, strCookiePath);
|
||||
String strEncrypted = cookie.Value;
|
||||
|
||||
int ticketLoc = redirectUrl.IndexOf(cookieName + "=");
|
||||
if(ticketLoc != -1)
|
||||
{
|
||||
updatedRedirectUrl = redirectUrl.Substring(0, ticketLoc);
|
||||
updatedRedirectUrl += cookieName + "=" + strEncrypted;
|
||||
int ampersandLoc = redirectUrl.IndexOf('&', ticketLoc);
|
||||
if(ampersandLoc != -1)
|
||||
{
|
||||
updatedRedirectUrl += redirectUrl.Substring(ampersandLoc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int loc = updatedRedirectUrl.IndexOf('?');
|
||||
updatedRedirectUrl += (loc != -1) ? "&" : "?";
|
||||
updatedRedirectUrl += cookieName + "=" + strEncrypted;
|
||||
}
|
||||
|
||||
HttpContext.Current.Response.Redirect(updatedRedirectUrl, true);
|
||||
// MobileRedirect.RedirectToUrl(HttpContext.Current, updatedRedirectUrl, true);
|
||||
*/
|
||||
}
|
||||
|
||||
/// <include file='doc\MobileFormsAuthentication.uex' path='docs/doc[@for="MobileFormsAuthentication.SignOut"]/*' />
|
||||
public static void SignOut()
|
||||
{
|
||||
/*
|
||||
MobilePage page = HttpContext.Current.Handler as MobilePage;
|
||||
if (page != null)
|
||||
{
|
||||
page.Adapter.PersistCookielessData = false;
|
||||
if (!page.Device.SupportsEmptyStringInCookieValue)
|
||||
{
|
||||
// Desktop signout with empty cookie value is not handled properly by the device.
|
||||
InternalSignOut ();
|
||||
return;
|
||||
}
|
||||
}
|
||||
*/
|
||||
FormsAuthentication.SignOut();
|
||||
}
|
||||
|
||||
/*
|
||||
private static void InternalSignOut ()
|
||||
{
|
||||
HttpContext context = HttpContext.Current;
|
||||
String userName =
|
||||
context.User == null || context.User.Identity == null || context.User.Identity.Name == null ?
|
||||
"" :
|
||||
context.User.Identity.Name;
|
||||
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket (
|
||||
1, // version
|
||||
userName,
|
||||
DateTime.Now, // Issue-Date
|
||||
new DateTime(1999, 10, 12), // Expiration
|
||||
false, // IsPersistent
|
||||
"", // User-Data
|
||||
FormsAuthentication.FormsCookiePath);
|
||||
String encryptedTicket = FormsAuthentication.Encrypt (ticket);
|
||||
if (encryptedTicket == null) { // Encrypt returned null
|
||||
encryptedTicket = "x";
|
||||
}
|
||||
HttpCookie cookie = new HttpCookie (FormsAuthentication.FormsCookieName, encryptedTicket);
|
||||
cookie.Path = FormsAuthentication.FormsCookiePath;
|
||||
cookie.Expires = new System.DateTime (1999, 10, 12);
|
||||
cookie.Secure = FormsAuthentication.RequireSSL;
|
||||
context.Response.Cookies.Remove (FormsAuthentication.FormsCookieName);
|
||||
context.Response.Cookies.Add (cookie);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="MobileRedirect.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.UI.MobileControls;
|
||||
|
||||
namespace System.Web.Mobile
|
||||
{
|
||||
/*
|
||||
* Mobile Redirect
|
||||
* An internal helper class that provides methods to work around redirection issues with
|
||||
* mobile devices.
|
||||
*
|
||||
* Copyright (c) 2000 Microsoft Corporation
|
||||
*/
|
||||
[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.")]
|
||||
internal class MobileRedirect
|
||||
{
|
||||
|
||||
//
|
||||
internal static readonly String QueryStringVariable = "__redir";
|
||||
internal static readonly String QueryStringValue = "1";
|
||||
|
||||
/* Obsolete
|
||||
internal static readonly String QueryStringAssignment = QueryStringVariable + "=" + QueryStringValue;
|
||||
|
||||
private static readonly String _redirectQueryString = "?" + QueryStringAssignment;
|
||||
private static readonly String _redirectQueryStringInline = QueryStringAssignment + "&";
|
||||
private static readonly String _disallowRedirectionKey = "_disallowRedirection";
|
||||
*/
|
||||
|
||||
// This class should not be instantiated.
|
||||
private MobileRedirect()
|
||||
{
|
||||
}
|
||||
|
||||
/* Obsolete
|
||||
internal static void AllowRedirection(HttpContext context)
|
||||
{
|
||||
context.Items.Remove(_disallowRedirectionKey);
|
||||
}
|
||||
|
||||
internal static void DisallowRedirection(HttpContext context)
|
||||
{
|
||||
context.Items[_disallowRedirectionKey] = 1;
|
||||
}
|
||||
|
||||
internal static void CheckForInvalidRedirection(HttpContext context)
|
||||
{
|
||||
HttpResponse response = context.Response;
|
||||
if (response != null &&
|
||||
response.StatusCode == 302 &&
|
||||
context.Items[_disallowRedirectionKey] != null)
|
||||
{
|
||||
response.ClearHeaders();
|
||||
throw new Exception(SR.GetString(SR.MobileRedirect_RedirectNotAllowed));
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/* functionality merged into Response.Redirect
|
||||
internal static void RedirectToUrl(HttpContext context, String url, bool endResponse)
|
||||
{
|
||||
//do not add __redir=1 if it already exists
|
||||
int i = url.IndexOf(QueryStringAssignment);
|
||||
if(i == -1)
|
||||
{
|
||||
i = url.IndexOf('?');
|
||||
if (i >= 0)
|
||||
{
|
||||
url = url.Insert(i + 1, _redirectQueryStringInline);
|
||||
}
|
||||
else
|
||||
{
|
||||
url = String.Concat(url, _redirectQueryString);
|
||||
}
|
||||
}
|
||||
AllowRedirection(context);
|
||||
MobilePage page = context.Handler as MobilePage;
|
||||
|
||||
// cookieless authentication already handles this.
|
||||
if ( (page != null) && (!page.Device.SupportsRedirectWithCookie) )
|
||||
{
|
||||
String formsAuthCookieName = Security.FormsAuthentication.FormsCookieName;
|
||||
if(formsAuthCookieName != String.Empty)
|
||||
{
|
||||
context.Response.Cookies.Remove(formsAuthCookieName);
|
||||
}
|
||||
}
|
||||
context.Response.Redirect(url, endResponse);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
263
mcs/class/referencesource/System.Web.Mobile/Mobile/UrlPath.cs
Normal file
263
mcs/class/referencesource/System.Web.Mobile/Mobile/UrlPath.cs
Normal file
@@ -0,0 +1,263 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="UrlPath.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* UrlPath class.
|
||||
*
|
||||
* Copyright (c) 1999 Microsoft Corporation
|
||||
*/
|
||||
|
||||
using System.Text;
|
||||
using System.Runtime.Serialization.Formatters;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Web.Mobile
|
||||
{
|
||||
/*
|
||||
* URL Path library.
|
||||
*/
|
||||
[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.")]
|
||||
internal static class UrlPath
|
||||
{
|
||||
private const char appRelativeCharacter = '~';
|
||||
|
||||
internal static bool IsRooted(String basepath)
|
||||
{
|
||||
return(basepath == null || basepath.Length == 0 || basepath[0] == '/' || basepath[0] == '\\');
|
||||
}
|
||||
|
||||
internal static bool IsRelativeUrl(string url)
|
||||
{
|
||||
// If it has a protocol, it's not relative
|
||||
if (url.IndexOf(":", StringComparison.Ordinal) != -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return !IsRooted(url);
|
||||
}
|
||||
|
||||
internal static String GetDirectory(String path)
|
||||
{
|
||||
if (path == null || path.Length == 0)
|
||||
{
|
||||
throw new ArgumentException(SR.GetString(SR.UrlPath_EmptyPathHasNoDirectory));
|
||||
}
|
||||
|
||||
if (path[0] != '/' && path[0] != appRelativeCharacter)
|
||||
{
|
||||
throw new ArgumentException(SR.GetString(SR.UrlPath_PathMustBeRooted));
|
||||
}
|
||||
|
||||
// Make sure there is a filename after the last '/'
|
||||
Debug.Assert(path[path.Length-1] != '/', "Path should not end with a /");
|
||||
|
||||
string dir = path.Substring(0, path.LastIndexOf('/'));
|
||||
|
||||
// If it's the root dir, we would end up with "". Return "/" instead
|
||||
if (dir.Length == 0)
|
||||
{
|
||||
return "/";
|
||||
}
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
||||
private static void FailIfPhysicalPath(string path)
|
||||
{
|
||||
if (path == null || path.Length < 4)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (path[1] == ':' || (path[0] == '\\' && path[1] == '\\'))
|
||||
{
|
||||
throw new Exception(SR.GetString(SR.UrlPath_PhysicalPathNotAllowed, path));
|
||||
}
|
||||
}
|
||||
|
||||
internal static String Combine(String basepath, String relative)
|
||||
{
|
||||
String path;
|
||||
|
||||
// Make sure the relative path is not a physical path (bug 73641)
|
||||
FailIfPhysicalPath(relative);
|
||||
|
||||
if (IsRooted(relative))
|
||||
{
|
||||
path = relative;
|
||||
if (path == null || path.Length == 0)
|
||||
{
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the relative path starts with "~/" or "~\", treat it as app root
|
||||
// relative (bug 68628)
|
||||
if (relative.Length >=3 && relative[0] == appRelativeCharacter && (relative[1] == '/' || relative[1] == '\\'))
|
||||
{
|
||||
String appPath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
if (appPath.Length > 1)
|
||||
{
|
||||
path = appPath + "/" + relative.Substring(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
path = "/" + relative.Substring(2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (basepath == null || (basepath.Length == 1 && basepath[0] == '/'))
|
||||
{
|
||||
basepath = String.Empty;
|
||||
}
|
||||
|
||||
path = basepath + "/" + relative;
|
||||
}
|
||||
}
|
||||
|
||||
return Reduce(path);
|
||||
}
|
||||
|
||||
internal static String Reduce(String path)
|
||||
{
|
||||
// ignore query string
|
||||
String queryString = null;
|
||||
if (path != null)
|
||||
{
|
||||
int iqs = path.IndexOf('?');
|
||||
if (iqs >= 0)
|
||||
{
|
||||
queryString = path.Substring(iqs);
|
||||
path = path.Substring(0, iqs);
|
||||
}
|
||||
}
|
||||
|
||||
int length = path.Length;
|
||||
int examine;
|
||||
|
||||
// Make sure we don't have any back slashes
|
||||
path = path.Replace('\\', '/');
|
||||
|
||||
// quickly rule out situations in which there are no . or ..
|
||||
|
||||
for (examine = 0; ; examine++)
|
||||
{
|
||||
examine = path.IndexOf('.', examine);
|
||||
if (examine < 0)
|
||||
{
|
||||
return (queryString != null) ? (path + queryString) : path;
|
||||
}
|
||||
|
||||
if ((examine == 0 || path[examine - 1] == '/')
|
||||
&& (examine + 1 == length || path[examine + 1] == '/' ||
|
||||
(path[examine + 1] == '.' && (examine + 2 == length || path[examine + 2] == '/'))))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// OK, we found a . or .. so process it:
|
||||
|
||||
ArrayList list = new ArrayList();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int start;
|
||||
examine = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
start = examine;
|
||||
examine = path.IndexOf('/', start + 1);
|
||||
|
||||
if (examine < 0)
|
||||
{
|
||||
examine = length;
|
||||
}
|
||||
|
||||
if (examine - start <= 3 &&
|
||||
(examine < 1 || path[examine - 1] == '.') &&
|
||||
(start + 1 >= length || path[start + 1] == '.'))
|
||||
{
|
||||
if (examine - start == 3)
|
||||
{
|
||||
if (list.Count == 0)
|
||||
{
|
||||
throw new Exception(SR.GetString(SR.UrlPath_CannotExitUpTopDirectory));
|
||||
}
|
||||
|
||||
sb.Length = (int)list[list.Count - 1];
|
||||
list.RemoveRange(list.Count - 1, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(sb.Length);
|
||||
|
||||
sb.Append(path, start, examine - start);
|
||||
}
|
||||
|
||||
if (examine == length)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString() + queryString;
|
||||
}
|
||||
|
||||
private const string dummyProtocolAndServer = "http://foo";
|
||||
|
||||
// Return the relative vpath path from one rooted vpath to another
|
||||
internal static string MakeRelative(string from, string to)
|
||||
{
|
||||
// If either path is app relative (~/...), make it absolute, since the Uri
|
||||
// class wouldn't know how to deal with it.
|
||||
from = MakeVirtualPathAppAbsolute(from);
|
||||
to = MakeVirtualPathAppAbsolute(to);
|
||||
|
||||
// Make sure both virtual paths are rooted
|
||||
Debug.Assert(IsRooted(from));
|
||||
Debug.Assert(IsRooted(to));
|
||||
|
||||
// Uri's need full url's so, we use a dummy root
|
||||
Uri fromUri = new Uri(dummyProtocolAndServer + from);
|
||||
Uri toUri = new Uri(dummyProtocolAndServer + to);
|
||||
return fromUri.MakeRelative(toUri);
|
||||
}
|
||||
|
||||
// If a virtual path is app relative (i.e. starts with ~/), change it to
|
||||
// start with the actuall app path.
|
||||
// E.g. ~/Sub/foo.aspx --> /MyApp/Sub/foo.aspx
|
||||
internal static string MakeVirtualPathAppAbsolute(string virtualPath) {
|
||||
|
||||
// If the path is exactly "~", just return the app root path
|
||||
if (virtualPath.Length == 1 && virtualPath[0] == appRelativeCharacter)
|
||||
return HttpRuntime.AppDomainAppVirtualPath;
|
||||
|
||||
// If the virtual path starts with "~/" or "~\", replace with the app path
|
||||
// relative (ASURT 68628)
|
||||
if (virtualPath.Length >=2 && virtualPath[0] == appRelativeCharacter &&
|
||||
(virtualPath[1] == '/' || virtualPath[1] == '\\')) {
|
||||
|
||||
string appPath = HttpRuntime.AppDomainAppVirtualPath;
|
||||
|
||||
if (appPath.Length > 1)
|
||||
return appPath + "/" + virtualPath.Substring(2);
|
||||
else
|
||||
return "/" + virtualPath.Substring(2);
|
||||
}
|
||||
|
||||
// Return it unchanged
|
||||
return virtualPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,323 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="AdRotator.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing.Design;
|
||||
using System.Web.Mobile;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.Util;
|
||||
using WebCntrls = System.Web.UI.WebControls;
|
||||
using System.Security.Permissions;
|
||||
|
||||
namespace System.Web.UI.MobileControls
|
||||
{
|
||||
|
||||
/*
|
||||
* Mobile AdRotator class.
|
||||
* The AdRotator control is for rotating advertisement links every time the
|
||||
* same page is revisited.
|
||||
*
|
||||
* This class aggregates the corresponding ASP.NET AdRotator for delegating
|
||||
* the random selection task of advertisement info to the aggregated
|
||||
* class. The ad info is selected during the PreRender phase of the
|
||||
* aggregated control (So the aggregated control needs to have the
|
||||
* property Visible set to true when entering the PreRender process).
|
||||
* For markup adapters that collect the selected ad info for rendering,
|
||||
* they should subscribe to AdCreated event property and collect the ad
|
||||
* info through the event argument.
|
||||
*
|
||||
* This class also contains a mobile Image control for delegating the
|
||||
* rendering since AdRotator's rendering is the same as Image's rendering
|
||||
* by setting the corresponding properties on the control.
|
||||
*
|
||||
* Copyright (c) 2000 Microsoft Corporation
|
||||
*/
|
||||
/// <include file='doc\AdRotator.uex' path='docs/doc[@for="AdRotator"]/*' />
|
||||
[
|
||||
DefaultEvent("AdCreated"),
|
||||
DefaultProperty("AdvertisementFile"),
|
||||
Designer(typeof(System.Web.UI.Design.MobileControls.AdRotatorDesigner)),
|
||||
DesignerAdapter(typeof(System.Web.UI.Design.MobileControls.Adapters.DesignerAdRotatorAdapter)),
|
||||
ToolboxData("<{0}:AdRotator runat=\"server\"></{0}:AdRotator>"),
|
||||
ToolboxItem(typeof(System.Web.UI.Design.WebControlToolboxItem))
|
||||
]
|
||||
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[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.")]
|
||||
public class AdRotator : MobileControl
|
||||
{
|
||||
private WebCntrls.AdRotator _webAdRotator;
|
||||
private Image _image = new Image();
|
||||
|
||||
private static readonly Object EventAdCreated = new Object();
|
||||
private const String ImageKeyDefault = "ImageUrl";
|
||||
private const String NavigateUrlKeyDefault = "NavigateUrl";
|
||||
|
||||
/// <include file='doc\AdRotator.uex' path='docs/doc[@for="AdRotator.AdRotator"]/*' />
|
||||
public AdRotator() : base()
|
||||
{
|
||||
_webAdRotator = CreateWebAdRotator();
|
||||
|
||||
_image.EnableViewState = false;
|
||||
|
||||
this.Controls.Add(_webAdRotator);
|
||||
this.Controls.Add(_image);
|
||||
|
||||
// The default value of the Target property of the web AdRotator is
|
||||
// set to "_top". Since we are not exposing this property, we need
|
||||
// to explicity set it to empty string so this property will not be
|
||||
// shown in the rendered markup when the web AdRotator is used to do
|
||||
// the rendering.
|
||||
_webAdRotator.Target = String.Empty;
|
||||
|
||||
// Due to the fact that C# compiler doesn't allow direct
|
||||
// manipulation of event properties outside of the class that
|
||||
// defines the event variable, the way we delegate the event
|
||||
// handlers to the aggregated web control is to provide a wrapper
|
||||
// to capture the raised event from the aggregated control and
|
||||
// apply the event argument to the event handlers subscribed to
|
||||
// this class.
|
||||
AdCreatedEventHandler adCreatedEventHandler =
|
||||
new AdCreatedEventHandler(WebAdCreated);
|
||||
|
||||
_webAdRotator.AdCreated += adCreatedEventHandler;
|
||||
}
|
||||
|
||||
/// <include file='doc\AdRotator.uex' path='docs/doc[@for="AdRotator.CreateWebAdRotator"]/*' />
|
||||
protected virtual WebCntrls.AdRotator CreateWebAdRotator()
|
||||
{
|
||||
return new WebCntrls.AdRotator();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Mimic the properties exposed in the original AdRotator.
|
||||
// The properties are got and set directly from the original AdRotator.
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// <include file='doc\AdRotator.uex' path='docs/doc[@for="AdRotator.AdvertisementFile"]/*' />
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Gets or sets the path to the XML file that contains advertisement data.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <para>
|
||||
/// The path to the XML file containing the properties of the advertisements to
|
||||
/// render in the <see langword='AdRotator'/>.
|
||||
/// </para>
|
||||
/// </value>
|
||||
[
|
||||
Bindable(true),
|
||||
DefaultValue(""),
|
||||
Editor(typeof(System.Web.UI.Design.XmlUrlEditor), typeof(UITypeEditor)),
|
||||
MobileCategory(SR.Category_Behavior),
|
||||
MobileSysDescription(SR.AdRotator_AdvertisementFile)
|
||||
]
|
||||
public String AdvertisementFile
|
||||
{
|
||||
get
|
||||
{
|
||||
return _webAdRotator.AdvertisementFile;
|
||||
}
|
||||
set
|
||||
{
|
||||
_webAdRotator.AdvertisementFile = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\AdRotator.uex' path='docs/doc[@for="AdRotator.KeywordFilter"]/*' />
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Gets or sets a keyword used to match related advertisements in the ad file.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <para>
|
||||
/// The keyword used to identify advertisements within a specific catagory.
|
||||
/// </para>
|
||||
/// </value>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// If the ad source is AdvertisementFile and this property is not empty, an ad
|
||||
/// with a matching keyword will be selected.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// If the ad source is AdvertisementFile and this property set, but no match
|
||||
/// exists, a blank image is displayed and a trace warning is generated.
|
||||
/// </para>
|
||||
/// If this property is not set, keyword filtering is not used to select an ad.
|
||||
/// </remarks>
|
||||
[
|
||||
Bindable(true),
|
||||
DefaultValue(""),
|
||||
MobileCategory(SR.Category_Behavior),
|
||||
MobileSysDescription(SR.AdRotator_KeywordFilter)
|
||||
]
|
||||
public String KeywordFilter
|
||||
{
|
||||
get
|
||||
{
|
||||
return _webAdRotator.KeywordFilter;
|
||||
}
|
||||
set
|
||||
{
|
||||
_webAdRotator.KeywordFilter = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\AdRotator.uex' path='docs/doc[@for="AdRotator.ImageKey"]/*' />
|
||||
[
|
||||
Bindable(true),
|
||||
DefaultValue(ImageKeyDefault),
|
||||
MobileCategory(SR.Category_Behavior),
|
||||
MobileSysDescription(SR.AdRotator_ImageKey)
|
||||
]
|
||||
public String ImageKey
|
||||
{
|
||||
get
|
||||
{
|
||||
String s = (String) ViewState["ImageKey"];
|
||||
return((s != null) ? s : ImageKeyDefault);
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ImageKey"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\AdRotator.uex' path='docs/doc[@for="AdRotator.NavigateUrlKey"]/*' />
|
||||
[
|
||||
Bindable(true),
|
||||
DefaultValue(NavigateUrlKeyDefault),
|
||||
MobileCategory(SR.Category_Behavior),
|
||||
MobileSysDescription(SR.AdRotator_NavigateUrlKey)
|
||||
]
|
||||
public String NavigateUrlKey
|
||||
{
|
||||
get
|
||||
{
|
||||
String s = (String) ViewState["NavigateUrlKey"];
|
||||
return((s != null) ? s : NavigateUrlKeyDefault);
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["NavigateUrlKey"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\AdRotator.uex' path='docs/doc[@for="AdRotator.AdCreated"]/*' />
|
||||
[
|
||||
MobileCategory(SR.Category_Action),
|
||||
MobileSysDescription(SR.AdRotator_AdCreated)
|
||||
]
|
||||
public event AdCreatedEventHandler AdCreated
|
||||
{
|
||||
add
|
||||
{
|
||||
Events.AddHandler(EventAdCreated, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
Events.RemoveHandler(EventAdCreated, value);
|
||||
}
|
||||
}
|
||||
|
||||
// protected method (which can be overridden by subclasses) for
|
||||
// raising user events
|
||||
/// <include file='doc\AdRotator.uex' path='docs/doc[@for="AdRotator.OnAdCreated"]/*' />
|
||||
protected virtual void OnAdCreated(AdCreatedEventArgs e)
|
||||
{
|
||||
AdCreatedEventHandler handler = (AdCreatedEventHandler)Events[EventAdCreated];
|
||||
if (handler != null)
|
||||
{
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\AdRotator.uex' path='docs/doc[@for="AdRotator.Render"]/*' />
|
||||
protected override void Render(HtmlTextWriter writer)
|
||||
{
|
||||
const String accesskeyName = "accesskey";
|
||||
|
||||
// Delegate specific custom attribute to the child Image control
|
||||
String accesskey = ((IAttributeAccessor) this).GetAttribute(accesskeyName);
|
||||
if (!String.IsNullOrEmpty(accesskey))
|
||||
{
|
||||
_image.CustomAttributes[accesskeyName] = accesskey;
|
||||
}
|
||||
|
||||
_image.RenderControl(writer);
|
||||
}
|
||||
|
||||
private void WebAdCreated(Object sender, AdCreatedEventArgs e)
|
||||
{
|
||||
// Override the value since it may have been changed by device
|
||||
// select
|
||||
|
||||
// AdProperties can be null when ad file is not specified
|
||||
// correctly.
|
||||
if (e.AdProperties != null)
|
||||
{
|
||||
e.ImageUrl = (String) e.AdProperties[ImageKey];
|
||||
e.NavigateUrl = (String) e.AdProperties[NavigateUrlKey];
|
||||
}
|
||||
|
||||
// Then invoke user events for further manipulation specified by
|
||||
// user
|
||||
OnAdCreated(e);
|
||||
|
||||
// Finally, set the necessary properties to the base Image class
|
||||
_image.ImageUrl = ResolveAdRotatorUrl(e.ImageUrl);
|
||||
_image.AlternateText = e.AlternateText;
|
||||
_image.NavigateUrl = ResolveAdRotatorUrl(e.NavigateUrl);
|
||||
}
|
||||
|
||||
// Helper function adopted from ASP.NET AdRotator class (modified
|
||||
// slightly)
|
||||
private String ResolveAdRotatorUrl(String relativeUrl)
|
||||
{
|
||||
if (relativeUrl == null)
|
||||
{
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
// check if it is already absolute, or points to another form
|
||||
if (!UrlPath.IsRelativeUrl(relativeUrl) ||
|
||||
relativeUrl.StartsWith(Constants.FormIDPrefix, StringComparison.Ordinal))
|
||||
{
|
||||
return relativeUrl;
|
||||
}
|
||||
|
||||
// Deal with app relative syntax (e.g. ~/foo)
|
||||
string tplSourceDir = UrlPath.MakeVirtualPathAppAbsolute(TemplateSourceDirectory);
|
||||
|
||||
// For the AdRotator, use the AdvertisementFile directory as the
|
||||
// base, and fall back to the page/user control location as the
|
||||
// base.
|
||||
String absoluteFile = UrlPath.Combine(tplSourceDir,
|
||||
AdvertisementFile);
|
||||
String fileDirectory = UrlPath.GetDirectory(absoluteFile);
|
||||
|
||||
String baseUrl = String.Empty;
|
||||
if (fileDirectory != null)
|
||||
{
|
||||
baseUrl = fileDirectory;
|
||||
}
|
||||
if (baseUrl.Length == 0)
|
||||
{
|
||||
baseUrl = tplSourceDir;
|
||||
}
|
||||
if (baseUrl.Length == 0)
|
||||
{
|
||||
return relativeUrl;
|
||||
}
|
||||
|
||||
// make it absolute
|
||||
return UrlPath.Combine(baseUrl, relativeUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="ChtmlCommandAdapter.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Security.Permissions;
|
||||
|
||||
#if COMPILING_FOR_SHIPPED_SOURCE
|
||||
namespace System.Web.UI.MobileControls.ShippedAdapterSource
|
||||
#else
|
||||
namespace System.Web.UI.MobileControls.Adapters
|
||||
#endif
|
||||
|
||||
{
|
||||
/*
|
||||
* ChtmlCommandAdapter class.
|
||||
*/
|
||||
/// <include file='doc\ChtmlCommandAdapter.uex' path='docs/doc[@for="ChtmlCommandAdapter"]/*' />
|
||||
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[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.")]
|
||||
public class ChtmlCommandAdapter : HtmlCommandAdapter
|
||||
{
|
||||
/// <include file='doc\ChtmlCommandAdapter.uex' path='docs/doc[@for="ChtmlCommandAdapter.RequiresFormTag"]/*' />
|
||||
public override bool RequiresFormTag
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <include file='doc\ChtmlCommandAdapter.uex' path='docs/doc[@for="ChtmlCommandAdapter.AddAttributes"]/*' />
|
||||
protected override void AddAttributes(HtmlMobileTextWriter writer)
|
||||
{
|
||||
AddAccesskeyAttribute(writer);
|
||||
AddJPhoneMultiMediaAttributes(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="ChtmlFormAdapter.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Globalization;
|
||||
using System.Security.Permissions;
|
||||
|
||||
#if COMPILING_FOR_SHIPPED_SOURCE
|
||||
namespace System.Web.UI.MobileControls.ShippedAdapterSource
|
||||
#else
|
||||
namespace System.Web.UI.MobileControls.Adapters
|
||||
#endif
|
||||
|
||||
{
|
||||
/*
|
||||
* ChtmlFormAdapter class.
|
||||
*
|
||||
* Copyright (c) 2000 Microsoft Corporation
|
||||
*/
|
||||
/// <include file='doc\ChtmlFormAdapter.uex' path='docs/doc[@for="ChtmlFormAdapter"]/*' />
|
||||
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[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.")]
|
||||
public class ChtmlFormAdapter : HtmlFormAdapter
|
||||
{
|
||||
private static readonly String _contentTypeMetaTag = "<meta http-equiv=\"Content-Type\" content=\"{0}; charset={1}\">\r\n";
|
||||
|
||||
/// <include file='doc\ChtmlFormAdapter.uex' path='docs/doc[@for="ChtmlFormAdapter.ShouldRenderFormTag"]/*' />
|
||||
protected override bool ShouldRenderFormTag()
|
||||
{
|
||||
if (!Device.RequiresOutputOptimization || Control.PageCount > 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return IsFormTagNeeded(Control);
|
||||
}
|
||||
|
||||
// Recursive method to check if there is any descendant control
|
||||
// requires the form tag. For unknown cases, the method returns true
|
||||
// in case the unknown rendering requires the form tag.
|
||||
private bool IsFormTagNeeded(Control control)
|
||||
{
|
||||
// Check itself first
|
||||
if (!control.Visible)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
MobileControl mobileControl = control as MobileControl;
|
||||
if (mobileControl != null)
|
||||
{
|
||||
// Since we don't have control over what content is included
|
||||
// in the template, to be safe we just generate the form tag.
|
||||
if (mobileControl.IsTemplated)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
HtmlControlAdapter adapter = mobileControl.Adapter as HtmlControlAdapter;
|
||||
if (adapter != null && adapter.RequiresFormTag)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (!(control is UserControl) &&
|
||||
!(control is LiteralControl))
|
||||
{
|
||||
// UserControl simply acts as a container, so the checking
|
||||
// should be delegated to its children below.
|
||||
// LiteralControl is a plain text control. Also, it is
|
||||
// generated for the spaces in between mobile control tags so
|
||||
// we don't want to consider it as a form required control.
|
||||
// For other cases, we should generate form tag as we don't
|
||||
// know the content that will be generated.
|
||||
return true;
|
||||
}
|
||||
|
||||
// No problem with the current control so far, now recursively
|
||||
// check its children.
|
||||
if (control.HasControls())
|
||||
{
|
||||
foreach (Control child in control.Controls)
|
||||
{
|
||||
if (IsFormTagNeeded(child))
|
||||
{
|
||||
// This is to get out of recursive loop without
|
||||
// further checking on other controls.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <include file='doc\ChtmlFormAdapter.uex' path='docs/doc[@for="ChtmlFormAdapter.RenderExtraHeadElements"]/*' />
|
||||
protected override bool RenderExtraHeadElements(HtmlMobileTextWriter writer)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
String metaTagName = Device.RequiredMetaTagNameValue;
|
||||
if (metaTagName != null)
|
||||
{
|
||||
if (writer != null)
|
||||
{
|
||||
writer.Write("<meta NAME=\"" + metaTagName + "\" CONTENT=\"True\">\r\n");
|
||||
}
|
||||
result = true;
|
||||
}
|
||||
|
||||
String charset = Page.Response.Charset;
|
||||
if (Device.RequiresContentTypeMetaTag &&
|
||||
charset != null && charset.Length > 0)
|
||||
{
|
||||
if (writer != null)
|
||||
{
|
||||
writer.Write(String.Format(CultureInfo.InvariantCulture, _contentTypeMetaTag, Device.PreferredRenderingMime, charset));
|
||||
}
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <include file='doc\ChtmlFormAdapter.uex' path='docs/doc[@for="ChtmlFormAdapter.RenderPagerTag"]/*' />
|
||||
protected internal override void RenderPagerTag(
|
||||
HtmlMobileTextWriter writer,
|
||||
int pageToNavigate,
|
||||
String text)
|
||||
{
|
||||
writer.EnterLayout(Style);
|
||||
writer.EnterFormat(Style);
|
||||
writer.WriteBeginTag("input");
|
||||
|
||||
// Specially encode the page number with the control id.
|
||||
// The corresponding code that handles postback should know how
|
||||
// to extract the page number correctly.
|
||||
writer.Write(" name=\"");
|
||||
writer.Write(Control.UniqueID);
|
||||
writer.Write(Constants.PagePrefix);
|
||||
writer.Write(pageToNavigate.ToString(CultureInfo.InvariantCulture));
|
||||
writer.Write("\"");
|
||||
|
||||
writer.WriteAttribute("type", "submit");
|
||||
writer.WriteAttribute("value", text, true);
|
||||
writer.Write("/>");
|
||||
writer.ExitFormat(Style);
|
||||
writer.ExitLayout(Style);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="ChtmlImageAdapter.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Globalization;
|
||||
using System.Web.UI.MobileControls.Adapters;
|
||||
using System.Security.Permissions;
|
||||
|
||||
#if COMPILING_FOR_SHIPPED_SOURCE
|
||||
namespace System.Web.UI.MobileControls.ShippedAdapterSource
|
||||
#else
|
||||
namespace System.Web.UI.MobileControls.Adapters
|
||||
#endif
|
||||
|
||||
{
|
||||
/*
|
||||
* ChtmlImageAdapter class.
|
||||
*/
|
||||
/// <include file='doc\ChtmlImageAdapter.uex' path='docs/doc[@for="ChtmlImageAdapter"]/*' />
|
||||
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[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.")]
|
||||
public class ChtmlImageAdapter : HtmlImageAdapter
|
||||
{
|
||||
/// <include file='doc\ChtmlImageAdapter.uex' path='docs/doc[@for="ChtmlImageAdapter.RenderImage"]/*' />
|
||||
protected internal override void RenderImage(HtmlMobileTextWriter writer)
|
||||
{
|
||||
String source = Control.ImageUrl;
|
||||
|
||||
if (source.StartsWith(Constants.SymbolProtocol, StringComparison.Ordinal) &&
|
||||
(Device.SupportsIModeSymbols || Device.SupportsJPhoneSymbols))
|
||||
{
|
||||
if (Device.SupportsIModeSymbols)
|
||||
{
|
||||
writer.Write("&#");
|
||||
writer.Write(
|
||||
source.Substring(Constants.SymbolProtocol.Length));
|
||||
writer.Write(";");
|
||||
}
|
||||
else
|
||||
{
|
||||
// The ImageUrl should be in the format "symbol:xyyy",
|
||||
// where x is group picture character (either G, E or F),
|
||||
// and yyy (length can vary) is the picture's character
|
||||
// code (in decimal).
|
||||
String symbolChars = source.Substring(
|
||||
Constants.SymbolProtocol.Length);
|
||||
char code = DecimalStringToChar(symbolChars.Substring(1));
|
||||
|
||||
writer.Write("\u001B$");
|
||||
writer.Write(Char.ToUpper(symbolChars[0], CultureInfo.InvariantCulture));
|
||||
writer.Write(code);
|
||||
writer.Write('\u000F');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
base.RenderImage(writer);
|
||||
}
|
||||
}
|
||||
|
||||
// Convert decimal string "xxx" to '\u00xx'
|
||||
private char DecimalStringToChar(String decimalString)
|
||||
{
|
||||
int codeValue = 0;
|
||||
int adj = 1;
|
||||
|
||||
for (int i = decimalString.Length - 1; i >= 0; i--)
|
||||
{
|
||||
codeValue += DecimalCharToInt(decimalString[i]) * adj;
|
||||
adj *= 10;
|
||||
}
|
||||
|
||||
return (char) codeValue;
|
||||
}
|
||||
|
||||
// Convert decimal char 'x' to decimal integer value x
|
||||
private int DecimalCharToInt(char decimalChar)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (decimalChar >= '0' && decimalChar <= '9')
|
||||
{
|
||||
i = decimalChar - '0';
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException(
|
||||
SR.GetString(SR.ChtmlImageAdapterDecimalCodeExpectedAfterGroupChar),
|
||||
"ImageUrl");
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
/// <include file='doc\ChtmlImageAdapter.uex' path='docs/doc[@for="ChtmlImageAdapter.AddAttributes"]/*' />
|
||||
protected override void AddAttributes(HtmlMobileTextWriter writer)
|
||||
{
|
||||
AddAccesskeyAttribute(writer);
|
||||
AddJPhoneMultiMediaAttributes(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="ChtmlLinkAdapter.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Security.Permissions;
|
||||
|
||||
#if COMPILING_FOR_SHIPPED_SOURCE
|
||||
namespace System.Web.UI.MobileControls.ShippedAdapterSource
|
||||
#else
|
||||
namespace System.Web.UI.MobileControls.Adapters
|
||||
#endif
|
||||
|
||||
{
|
||||
/*
|
||||
* ChtmlLinkAdapter class.
|
||||
*/
|
||||
/// <include file='doc\ChtmlLinkAdapter.uex' path='docs/doc[@for="ChtmlLinkAdapter"]/*' />
|
||||
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
|
||||
[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.")]
|
||||
public class ChtmlLinkAdapter : HtmlLinkAdapter
|
||||
{
|
||||
/// <include file='doc\ChtmlLinkAdapter.uex' path='docs/doc[@for="ChtmlLinkAdapter.AddAttributes"]/*' />
|
||||
protected override void AddAttributes(HtmlMobileTextWriter writer)
|
||||
{
|
||||
AddAccesskeyAttribute(writer);
|
||||
AddJPhoneMultiMediaAttributes(writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user