Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / ui / RegisteredScript.cs / 1 / 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; } } 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignTimeTemplateParser.cs
- HtmlObjectListAdapter.cs
- WinEventWrap.cs
- StateManagedCollection.cs
- StringBlob.cs
- ToolStripActionList.cs
- ToolStripDropDownClosingEventArgs.cs
- TextElementCollectionHelper.cs
- DoubleAnimation.cs
- MultiTouchSystemGestureLogic.cs
- SafeEventLogWriteHandle.cs
- WebPartMovingEventArgs.cs
- SettingsContext.cs
- RotateTransform.cs
- ContextStack.cs
- OutputCacheSection.cs
- CrossContextChannel.cs
- rsa.cs
- DragDropManager.cs
- SafeEventLogWriteHandle.cs
- ApplicationFileParser.cs
- RelationshipConverter.cs
- TextSyndicationContent.cs
- _Events.cs
- CompositeFontInfo.cs
- MexTcpBindingCollectionElement.cs
- UserPersonalizationStateInfo.cs
- FrameworkElementFactory.cs
- ToolStripItemRenderEventArgs.cs
- ZipIOCentralDirectoryBlock.cs
- Types.cs
- WorkflowTransactionService.cs
- LayoutTableCell.cs
- MetaTableHelper.cs
- Nodes.cs
- Image.cs
- PictureBox.cs
- QilTypeChecker.cs
- StringFormat.cs
- _FtpDataStream.cs
- TrackBarRenderer.cs
- DispatcherTimer.cs
- SqlDataSourceDesigner.cs
- ServicePointManager.cs
- SplineKeyFrames.cs
- AdornerPresentationContext.cs
- DataGridCellEditEndingEventArgs.cs
- ConstraintManager.cs
- HttpClientProtocol.cs
- Int32RectConverter.cs
- ProfilePropertySettingsCollection.cs
- SystemWebSectionGroup.cs
- TextElementEnumerator.cs
- DbConnectionPoolOptions.cs
- MemberMaps.cs
- DirectoryObjectSecurity.cs
- SqlBooleanMismatchVisitor.cs
- UniqueEventHelper.cs
- XmlDataProvider.cs
- XmlQueryRuntime.cs
- PartialTrustHelpers.cs
- X509Utils.cs
- ParallelRangeManager.cs
- XmlC14NWriter.cs
- Light.cs
- CacheModeValueSerializer.cs
- TextChangedEventArgs.cs
- CompoundFileStorageReference.cs
- MostlySingletonList.cs
- DataServicePagingProviderWrapper.cs
- ActiveDocumentEvent.cs
- DefaultExpression.cs
- SrgsItemList.cs
- OdbcInfoMessageEvent.cs
- XPathEmptyIterator.cs
- DataGridViewComboBoxCell.cs
- DataGridViewSelectedColumnCollection.cs
- LicenseManager.cs
- XPathDocumentBuilder.cs
- IPAddressCollection.cs
- HttpCacheVaryByContentEncodings.cs
- AutomationProperties.cs
- PositiveTimeSpanValidator.cs
- XmlNullResolver.cs
- BitSet.cs
- InstalledFontCollection.cs
- DocumentPageHost.cs
- TextFormatterHost.cs
- DefaultHttpHandler.cs
- XmlSerializationWriter.cs
- WindowsNonControl.cs
- RectConverter.cs
- BinaryObjectReader.cs
- SafeLocalAllocation.cs
- ProvideValueServiceProvider.cs
- IISMapPath.cs
- OperationAbortedException.cs
- DataTablePropertyDescriptor.cs
- HashMembershipCondition.cs
- SqlPersistenceProviderFactory.cs