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
- SerTrace.cs
- ReflectionServiceProvider.cs
- EntityStoreSchemaFilterEntry.cs
- WindowsFormsSynchronizationContext.cs
- AccessViolationException.cs
- MembershipUser.cs
- ConfigurationStrings.cs
- SqlFunctions.cs
- IISUnsafeMethods.cs
- WorkflowRuntimeEndpoint.cs
- BamlResourceDeserializer.cs
- Constant.cs
- Int16AnimationUsingKeyFrames.cs
- GenericEnumConverter.cs
- AuthenticatingEventArgs.cs
- DecoderNLS.cs
- GB18030Encoding.cs
- DataGridSortingEventArgs.cs
- ScrollEvent.cs
- Material.cs
- XMLUtil.cs
- TripleDESCryptoServiceProvider.cs
- PartialTrustVisibleAssembly.cs
- XmlBinaryReader.cs
- RelationshipConverter.cs
- Visitors.cs
- Int32KeyFrameCollection.cs
- MenuAutomationPeer.cs
- DetailsViewUpdatedEventArgs.cs
- CopyEncoder.cs
- SpeechEvent.cs
- ScriptControlDescriptor.cs
- DataGridViewRowPrePaintEventArgs.cs
- EntityParameterCollection.cs
- ExtenderProvidedPropertyAttribute.cs
- SQLCharsStorage.cs
- MarkupCompiler.cs
- DataTableNewRowEvent.cs
- NativeMethods.cs
- Calendar.cs
- DataViewListener.cs
- ParseChildrenAsPropertiesAttribute.cs
- ThicknessKeyFrameCollection.cs
- TreeWalkHelper.cs
- RecordConverter.cs
- MemberInfoSerializationHolder.cs
- UInt16Storage.cs
- SrgsDocumentParser.cs
- EditBehavior.cs
- DataGridViewControlCollection.cs
- FormsAuthenticationUserCollection.cs
- SiteMapHierarchicalDataSourceView.cs
- assertwrapper.cs
- PassportAuthenticationModule.cs
- CharAnimationBase.cs
- DBCSCodePageEncoding.cs
- MultipartIdentifier.cs
- EngineSiteSapi.cs
- TimeSpanOrInfiniteValidator.cs
- TextTreePropertyUndoUnit.cs
- VectorValueSerializer.cs
- DetailsViewUpdatedEventArgs.cs
- MetadataCache.cs
- SecurityTokenInclusionMode.cs
- LicenseProviderAttribute.cs
- InfoCardTrace.cs
- DataGridBoolColumn.cs
- ReliableSession.cs
- FixedPageStructure.cs
- ExpressionVisitor.cs
- WebServiceBindingAttribute.cs
- PagesSection.cs
- CommandExpr.cs
- StatusBar.cs
- Repeater.cs
- WebPartDisplayModeCollection.cs
- PeerIPHelper.cs
- CancelEventArgs.cs
- FixedPageAutomationPeer.cs
- FastPropertyAccessor.cs
- BitmapEffectGroup.cs
- FileSystemInfo.cs
- FileDialogCustomPlacesCollection.cs
- SqlBooleanizer.cs
- ExpandoClass.cs
- BasicViewGenerator.cs
- XmlText.cs
- TaskDesigner.cs
- WebPartEventArgs.cs
- Msec.cs
- RubberbandSelector.cs
- ObjectDataSourceEventArgs.cs
- AttributeSetAction.cs
- UIAgentRequest.cs
- ApplicationFileParser.cs
- SourceFileInfo.cs
- XmlDataCollection.cs
- DrawingAttributeSerializer.cs
- CategoryGridEntry.cs
- ActivityExecutorSurrogate.cs