Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / RegisteredScript.cs / 1305376 / RegisteredScript.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System.Diagnostics; using System.Diagnostics.CodeAnalysis; 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; 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
- TypeDependencyAttribute.cs
- OLEDB_Util.cs
- ellipse.cs
- UseLicense.cs
- ToolCreatedEventArgs.cs
- CheckBox.cs
- XPathSelectionIterator.cs
- SoapReflectionImporter.cs
- ScaleTransform3D.cs
- HostedHttpRequestAsyncResult.cs
- MembershipUser.cs
- HttpCachePolicyElement.cs
- SoapEnumAttribute.cs
- NominalTypeEliminator.cs
- httpstaticobjectscollection.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- ZipFileInfoCollection.cs
- TagNameToTypeMapper.cs
- CreateUserWizard.cs
- Rules.cs
- XmlSecureResolver.cs
- LabelDesigner.cs
- SupportsEventValidationAttribute.cs
- ProcessManager.cs
- _StreamFramer.cs
- GridViewUpdatedEventArgs.cs
- ControlHelper.cs
- TreeBuilder.cs
- SplashScreen.cs
- ReversePositionQuery.cs
- BezierSegment.cs
- AttachInfo.cs
- WebPartRestoreVerb.cs
- Module.cs
- MessageQueueAccessControlEntry.cs
- Accessible.cs
- LoginUtil.cs
- XmlWhitespace.cs
- ITreeGenerator.cs
- SerializationIncompleteException.cs
- InheritanceContextHelper.cs
- DocumentXPathNavigator.cs
- RadioButton.cs
- WsdlBuildProvider.cs
- linebase.cs
- TypedTableBaseExtensions.cs
- DataPager.cs
- HttpCapabilitiesSectionHandler.cs
- XmlEntityReference.cs
- GACIdentityPermission.cs
- TrackingDataItem.cs
- UserControlBuildProvider.cs
- documentsequencetextpointer.cs
- RequiredAttributeAttribute.cs
- DependencyProperty.cs
- SegmentInfo.cs
- UserControlBuildProvider.cs
- AuthenticationModulesSection.cs
- IgnoreFileBuildProvider.cs
- TokenizerHelper.cs
- WebPartActionVerb.cs
- AppDomainProtocolHandler.cs
- SecureEnvironment.cs
- ComplusTypeValidator.cs
- RegisteredArrayDeclaration.cs
- DependencyObject.cs
- EntityConnection.cs
- MatrixUtil.cs
- TreeIterators.cs
- PseudoWebRequest.cs
- InvokeHandlers.cs
- XmlIgnoreAttribute.cs
- AQNBuilder.cs
- MTConfigUtil.cs
- DesignerHelpers.cs
- LocalIdKeyIdentifierClause.cs
- ContentValidator.cs
- DataGridViewRowsAddedEventArgs.cs
- MessagingDescriptionAttribute.cs
- TimeStampChecker.cs
- PolicyLevel.cs
- TableCellCollection.cs
- processwaithandle.cs
- DefaultTraceListener.cs
- RawTextInputReport.cs
- ServiceManager.cs
- PinnedBufferMemoryStream.cs
- AvTraceDetails.cs
- TypeFieldSchema.cs
- TextTreeTextBlock.cs
- DrawingCollection.cs
- FactoryGenerator.cs
- PostBackOptions.cs
- NotCondition.cs
- DocumentGrid.cs
- ObjectQuery_EntitySqlExtensions.cs
- DataControlExtensions.cs
- Internal.cs
- NativeCppClassAttribute.cs
- HttpContextWrapper.cs