Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / xsp / System / Web / Extensions / ui / RegisteredScript.cs / 2 / RegisteredScript.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), ] public sealed class RegisteredScript { private RegisteredScriptType _scriptType; private Control _control; private string _key; private string _script; private Type _type; private bool _addScriptTags; private string _url; internal RegisteredScript(Control control, Type type, string key, string url) { Debug.Assert(control != null); Debug.Assert(type != null); Debug.Assert(!String.IsNullOrEmpty(url)); // null and empty "key" are treated different by asp.net script duplicate detection so null is allowed. _scriptType = RegisteredScriptType.ClientScriptInclude; _control = control; _type = type; _key = key; _url = url; } internal RegisteredScript(RegisteredScriptType scriptType, Control control, Type type, string key, string script, bool addScriptTags) { Debug.Assert(control != null); Debug.Assert( scriptType != RegisteredScriptType.OnSubmitStatement || !addScriptTags, "OnSubmitStatements cannot have addScriptTags."); Debug.Assert(type != null); // null and empty "key" are treated different by asp.net script duplicate detection so null is allowed. // null script allowed _scriptType = scriptType; _control = control; _type = type; _key = key; _script = script; _addScriptTags = addScriptTags; } public bool AddScriptTags { get { return _addScriptTags; } } public Control Control { get { return _control; } } public string Key { get { // may be null return _key; } } public string Script { get { // may be null return _script; } } public RegisteredScriptType ScriptType { get { return _scriptType; } } [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Justification = "Refers to a Control, not my Object.GetType()")] public Type Type { get { return _type; } } [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Justification = "Consistent with RegisterClientScriptInclude.")] public string Url { get { // null if this is not a client script include or resource return _url; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), ] public sealed class RegisteredScript { private RegisteredScriptType _scriptType; private Control _control; private string _key; private string _script; private Type _type; private bool _addScriptTags; private string _url; internal RegisteredScript(Control control, Type type, string key, string url) { Debug.Assert(control != null); Debug.Assert(type != null); Debug.Assert(!String.IsNullOrEmpty(url)); // null and empty "key" are treated different by asp.net script duplicate detection so null is allowed. _scriptType = RegisteredScriptType.ClientScriptInclude; _control = control; _type = type; _key = key; _url = url; } internal RegisteredScript(RegisteredScriptType scriptType, Control control, Type type, string key, string script, bool addScriptTags) { Debug.Assert(control != null); Debug.Assert( scriptType != RegisteredScriptType.OnSubmitStatement || !addScriptTags, "OnSubmitStatements cannot have addScriptTags."); Debug.Assert(type != null); // null and empty "key" are treated different by asp.net script duplicate detection so null is allowed. // null script allowed _scriptType = scriptType; _control = control; _type = type; _key = key; _script = script; _addScriptTags = addScriptTags; } public bool AddScriptTags { get { return _addScriptTags; } } public Control Control { get { return _control; } } public string Key { get { // may be null return _key; } } public string Script { get { // may be null return _script; } } public RegisteredScriptType ScriptType { get { return _scriptType; } } [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Justification = "Refers to a Control, not my Object.GetType()")] public Type Type { get { return _type; } } [SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Justification = "Consistent with RegisterClientScriptInclude.")] public string Url { get { // null if this is not a client script include or resource return _url; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FixedFindEngine.cs
- _NegoState.cs
- serverconfig.cs
- WebContext.cs
- MeasureData.cs
- VarRefManager.cs
- ReceiveContext.cs
- CompModSwitches.cs
- WebPartConnectionsCancelEventArgs.cs
- ConfigurationStrings.cs
- MultiView.cs
- UrlMappingCollection.cs
- UpDownEvent.cs
- PartialTrustHelpers.cs
- MultiViewDesigner.cs
- ScrollItemProviderWrapper.cs
- MsmqInputMessagePool.cs
- Margins.cs
- CodeDomLocalizationProvider.cs
- UnionCodeGroup.cs
- HtmlInputImage.cs
- PeerNearMe.cs
- SingleKeyFrameCollection.cs
- Int32KeyFrameCollection.cs
- ToolStripDropDownDesigner.cs
- recordstate.cs
- NonPrimarySelectionGlyph.cs
- ReadOnlyCollection.cs
- FixedTextContainer.cs
- WriteFileContext.cs
- ControlTemplate.cs
- TreeNodeMouseHoverEvent.cs
- PictureBoxDesigner.cs
- SessionStateModule.cs
- ReadWriteObjectLock.cs
- QualifiedId.cs
- RawAppCommandInputReport.cs
- ComponentResourceKeyConverter.cs
- ScriptMethodAttribute.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- SByteStorage.cs
- pingexception.cs
- Membership.cs
- BackgroundFormatInfo.cs
- HttpFileCollection.cs
- TypeLibConverter.cs
- CqlIdentifiers.cs
- EventLog.cs
- OraclePermissionAttribute.cs
- ComAdminWrapper.cs
- ConfigurationElementCollection.cs
- XmlAttributeAttribute.cs
- DbConnectionPoolGroupProviderInfo.cs
- AdornedElementPlaceholder.cs
- DocumentationServerProtocol.cs
- CombinedTcpChannel.cs
- HMACSHA384.cs
- OleDbPermission.cs
- DoubleAnimationUsingKeyFrames.cs
- ClientCredentialsSecurityTokenManager.cs
- DataSourceSelectArguments.cs
- DataGridViewAutoSizeModeEventArgs.cs
- ObjectSpanRewriter.cs
- ConfigXmlCDataSection.cs
- QuotedPrintableStream.cs
- UIElement3DAutomationPeer.cs
- securitycriticaldataClass.cs
- ErrorFormatter.cs
- HtmlInputControl.cs
- LicenseException.cs
- MemberHolder.cs
- NavigationProperty.cs
- DebugView.cs
- CommandPlan.cs
- StyleConverter.cs
- CommonDialog.cs
- IntegrationExceptionEventArgs.cs
- IPipelineRuntime.cs
- SystemFonts.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- PersonalizationProvider.cs
- RequestContext.cs
- StorageAssociationSetMapping.cs
- InvokePatternIdentifiers.cs
- HttpUnhandledOperationInvoker.cs
- ContainerSelectorActiveEvent.cs
- DeclaredTypeValidatorAttribute.cs
- ToolStripSplitStackLayout.cs
- SEHException.cs
- VoiceObjectToken.cs
- RootProfilePropertySettingsCollection.cs
- FrameDimension.cs
- LongCountAggregationOperator.cs
- FileLevelControlBuilderAttribute.cs
- ManagementQuery.cs
- ByteStack.cs
- StreamUpgradeBindingElement.cs
- DependencyObjectType.cs
- EventsTab.cs
- SendKeys.cs