Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MouseEvent.cs
- ObjectQuery.cs
- __TransparentProxy.cs
- ScrollBarRenderer.cs
- FillRuleValidation.cs
- XPathChildIterator.cs
- ProfilePropertySettings.cs
- ControlEvent.cs
- PreservationFileReader.cs
- TreeViewItem.cs
- CodeGenerator.cs
- HandlerFactoryCache.cs
- UnauthorizedWebPart.cs
- ErrorActivity.cs
- OpenTypeLayout.cs
- Knowncolors.cs
- FrameworkContentElementAutomationPeer.cs
- Package.cs
- PolicyException.cs
- CodeAssignStatement.cs
- TemplateLookupAction.cs
- HtmlMeta.cs
- BitmapEffectInputData.cs
- XhtmlBasicSelectionListAdapter.cs
- DesignUtil.cs
- XmlElementAttribute.cs
- FormatControl.cs
- NamespaceList.cs
- FrameworkElementFactory.cs
- BypassElement.cs
- TextParaLineResult.cs
- InternalRelationshipCollection.cs
- PrinterSettings.cs
- HandlerMappingMemo.cs
- TokenFactoryFactory.cs
- ThreadStaticAttribute.cs
- PolicyManager.cs
- WebPartEditorCancelVerb.cs
- ObservableDictionary.cs
- PathFigure.cs
- RecordsAffectedEventArgs.cs
- SerialPinChanges.cs
- Baml2006ReaderContext.cs
- ConvertTextFrag.cs
- ControllableStoryboardAction.cs
- serverconfig.cs
- WebPartDescription.cs
- ICspAsymmetricAlgorithm.cs
- DropDownButton.cs
- ObjectListGeneralPage.cs
- ModelItemCollection.cs
- ViewKeyConstraint.cs
- RowToParametersTransformer.cs
- SHA512.cs
- PermissionRequestEvidence.cs
- OuterGlowBitmapEffect.cs
- XmlSchemaFacet.cs
- ScrollPatternIdentifiers.cs
- FlowPosition.cs
- Graphics.cs
- XmlAtomicValue.cs
- DataRowExtensions.cs
- Sentence.cs
- XPathNodeInfoAtom.cs
- FailedToStartupUIException.cs
- HMAC.cs
- FileNotFoundException.cs
- ToolStripItemCollection.cs
- SecuritySessionFilter.cs
- DataRelationCollection.cs
- SerialErrors.cs
- ContentValidator.cs
- WebPartEditorOkVerb.cs
- ProcessRequestArgs.cs
- XmlPreloadedResolver.cs
- LinqDataSourceView.cs
- MimeTypePropertyAttribute.cs
- ProxyDataContractResolver.cs
- Visual.cs
- DetailsViewUpdateEventArgs.cs
- Processor.cs
- SizeAnimationClockResource.cs
- MbpInfo.cs
- ServicesUtilities.cs
- ResourcePermissionBase.cs
- DependencyPropertyConverter.cs
- ButtonBase.cs
- DPAPIProtectedConfigurationProvider.cs
- ILGenerator.cs
- ImplicitInputBrush.cs
- EditorPartChrome.cs
- ValidationSummary.cs
- SHA384CryptoServiceProvider.cs
- QuaternionConverter.cs
- PipelineModuleStepContainer.cs
- JavaScriptObjectDeserializer.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- XmlSiteMapProvider.cs
- ObjectDataSourceSelectingEventArgs.cs
- PropertyGridCommands.cs