Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / xsp / System / Web / Extensions / ui / RegisteredScript.cs / 2 / 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; } } [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; 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; } } [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
- InputScope.cs
- EventHandlersStore.cs
- ProxyWebPartManager.cs
- SocketPermission.cs
- SQLByte.cs
- EtwTrace.cs
- FileVersionInfo.cs
- CompressStream.cs
- IList.cs
- XmlSchemaGroup.cs
- DataListCommandEventArgs.cs
- DoubleAnimationClockResource.cs
- ThreadInterruptedException.cs
- TrackingMemoryStream.cs
- ProtectedProviderSettings.cs
- COM2Enum.cs
- ToolStripLabel.cs
- EventLogPermissionEntry.cs
- ComponentSerializationService.cs
- GetRecipientRequest.cs
- Binding.cs
- DataColumn.cs
- X509RawDataKeyIdentifierClause.cs
- OleDbConnectionFactory.cs
- DataGridViewRowsAddedEventArgs.cs
- TreeNodeBindingCollection.cs
- CodeNamespaceImport.cs
- RectangleGeometry.cs
- WpfMemberInvoker.cs
- RightsManagementInformation.cs
- Event.cs
- SecurityTimestamp.cs
- ClipboardProcessor.cs
- EdmPropertyAttribute.cs
- DBConnection.cs
- StrokeCollection2.cs
- RecommendedAsConfigurableAttribute.cs
- precedingsibling.cs
- DataControlCommands.cs
- PaperSource.cs
- TextSearch.cs
- FixedPosition.cs
- CodeTypeReferenceExpression.cs
- VectorAnimationBase.cs
- SecurityTokenSpecification.cs
- GACIdentityPermission.cs
- QilName.cs
- RootBrowserWindow.cs
- DateTimeOffsetStorage.cs
- SmiEventStream.cs
- MenuItemBindingCollection.cs
- WebAdminConfigurationHelper.cs
- SiteOfOriginContainer.cs
- NavigationProperty.cs
- XmlAttributes.cs
- ConstraintConverter.cs
- DispatcherExceptionFilterEventArgs.cs
- DataGridGeneralPage.cs
- XmlSchemaGroupRef.cs
- KnownBoxes.cs
- TextSchema.cs
- XPathDescendantIterator.cs
- UInt64Storage.cs
- UInt64Storage.cs
- ImportCatalogPart.cs
- X509Certificate2.cs
- XslTransform.cs
- UserInitiatedNavigationPermission.cs
- ItemCollection.cs
- ToolStripItemRenderEventArgs.cs
- AspProxy.cs
- DataGridSortCommandEventArgs.cs
- PolyLineSegmentFigureLogic.cs
- SamlSubject.cs
- HttpValueCollection.cs
- SignerInfo.cs
- SEHException.cs
- InputBinder.cs
- PackagingUtilities.cs
- VisualTarget.cs
- DataGridViewLinkCell.cs
- InvokeMethodActivity.cs
- AssociationSet.cs
- RedirectionProxy.cs
- ReleaseInstanceMode.cs
- TitleStyle.cs
- SecurityCriticalDataForSet.cs
- MenuAdapter.cs
- PenContext.cs
- PageCanvasSize.cs
- ObjectDataSourceFilteringEventArgs.cs
- HtmlCommandAdapter.cs
- Brush.cs
- PrintPreviewControl.cs
- ActivationServices.cs
- OdbcParameter.cs
- SqlConnectionFactory.cs
- StrokeCollectionConverter.cs
- WasHttpModulesInstallComponent.cs
- ToolStripItemImageRenderEventArgs.cs