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
- DocumentSchemaValidator.cs
- OutputCacheProviderCollection.cs
- Stroke.cs
- MultiAsyncResult.cs
- MetadataItem_Static.cs
- XPathChildIterator.cs
- PersistChildrenAttribute.cs
- TextParagraphProperties.cs
- CodeCompileUnit.cs
- MailDefinition.cs
- CheckBoxPopupAdapter.cs
- ConfigurationStrings.cs
- ProxyWebPart.cs
- SafeHandle.cs
- ListParaClient.cs
- StringUtil.cs
- CatalogPartChrome.cs
- EnumMemberAttribute.cs
- TemplateField.cs
- LinkedResource.cs
- ValidationResult.cs
- MethodImplAttribute.cs
- PermissionSetEnumerator.cs
- CodeAttributeArgumentCollection.cs
- SizeAnimationClockResource.cs
- TemplateXamlParser.cs
- ManipulationVelocities.cs
- CellCreator.cs
- ProcessRequestArgs.cs
- UpdateException.cs
- InvalidEnumArgumentException.cs
- SurrogateSelector.cs
- Clipboard.cs
- LocalServiceSecuritySettingsElement.cs
- Canonicalizers.cs
- ObjectDataSourceChooseMethodsPanel.cs
- SqlTypeSystemProvider.cs
- XmlDocumentFragment.cs
- TextFragmentEngine.cs
- HwndSubclass.cs
- EntityCollection.cs
- ThaiBuddhistCalendar.cs
- EntityModelBuildProvider.cs
- SqlUtils.cs
- MexBindingBindingCollectionElement.cs
- BrowserCapabilitiesCodeGenerator.cs
- RepeatButton.cs
- Table.cs
- SchemaMapping.cs
- CodeAttributeArgumentCollection.cs
- RemotingConfigParser.cs
- CdpEqualityComparer.cs
- WebPartManagerInternals.cs
- ManualWorkflowSchedulerService.cs
- ListItemCollection.cs
- SharedDp.cs
- StructuredProperty.cs
- StringUtil.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- Input.cs
- EventSourceCreationData.cs
- FieldNameLookup.cs
- FrameworkTemplate.cs
- TextBlock.cs
- SoapServerMethod.cs
- KerberosSecurityTokenParameters.cs
- XmlCDATASection.cs
- diagnosticsswitches.cs
- CurrentTimeZone.cs
- XmlEntity.cs
- IPipelineRuntime.cs
- HtmlInputCheckBox.cs
- DrawItemEvent.cs
- DeobfuscatingStream.cs
- DataTableMappingCollection.cs
- LinkLabel.cs
- ProgressBar.cs
- FileUtil.cs
- BitStream.cs
- BaseAppDomainProtocolHandler.cs
- RootNamespaceAttribute.cs
- Stroke.cs
- CacheRequest.cs
- DiscoveryOperationContext.cs
- DoubleLinkListEnumerator.cs
- FillRuleValidation.cs
- ZoneIdentityPermission.cs
- TypeDelegator.cs
- TextDecorationCollection.cs
- ObjectTokenCategory.cs
- ColumnCollection.cs
- IsolatedStorageException.cs
- WebSysDefaultValueAttribute.cs
- CompressedStack.cs
- ipaddressinformationcollection.cs
- FileDetails.cs
- localization.cs
- AndMessageFilterTable.cs
- TreeIterators.cs
- PassportAuthenticationEventArgs.cs