Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- NotCondition.cs
- InheritanceUI.cs
- MultiPropertyDescriptorGridEntry.cs
- CodeSnippetStatement.cs
- LogPolicy.cs
- CompositeDispatchFormatter.cs
- NumberFunctions.cs
- GeneralTransform3D.cs
- DocumentEventArgs.cs
- XmlSchemaImporter.cs
- OAVariantLib.cs
- TransactionContextValidator.cs
- EpmAttributeNameBuilder.cs
- DataListItemCollection.cs
- Freezable.cs
- SQLInt16.cs
- PlatformCulture.cs
- DataGridViewSortCompareEventArgs.cs
- XmlParserContext.cs
- Rect3DConverter.cs
- EmptyEnumerable.cs
- LinearQuaternionKeyFrame.cs
- XPathBuilder.cs
- mactripleDES.cs
- DrawingGroup.cs
- WpfMemberInvoker.cs
- LocalFileSettingsProvider.cs
- IdentityNotMappedException.cs
- InputLanguageSource.cs
- InvokeBase.cs
- EqualityComparer.cs
- OptimizedTemplateContent.cs
- CompressedStack.cs
- Memoizer.cs
- handlecollector.cs
- ILGenerator.cs
- IODescriptionAttribute.cs
- DataGridComboBoxColumn.cs
- TextRangeEdit.cs
- LockCookie.cs
- Brushes.cs
- IndexerNameAttribute.cs
- FloaterBaseParaClient.cs
- EUCJPEncoding.cs
- TextSelectionHelper.cs
- XsltInput.cs
- TextViewBase.cs
- ObjectReaderCompiler.cs
- RadioButtonRenderer.cs
- ProfileGroupSettings.cs
- FormsAuthenticationEventArgs.cs
- TextComposition.cs
- TableCell.cs
- ProxyWebPartManagerDesigner.cs
- SecureEnvironment.cs
- ActivityInfo.cs
- WindowsSpinner.cs
- TransformerInfoCollection.cs
- RepeatBehaviorConverter.cs
- CqlWriter.cs
- TextServicesCompartmentEventSink.cs
- objectresult_tresulttype.cs
- ContentPresenter.cs
- BitmapEffectCollection.cs
- Tool.cs
- Registry.cs
- CachedPathData.cs
- DataKey.cs
- GridViewRowEventArgs.cs
- ChtmlCommandAdapter.cs
- DeflateInput.cs
- EdmEntityTypeAttribute.cs
- ClusterSafeNativeMethods.cs
- GeneralTransform.cs
- RegionIterator.cs
- DynamicFilter.cs
- ConfigurationProperty.cs
- AuthorizationContext.cs
- StructureChangedEventArgs.cs
- TableRowGroup.cs
- DataTablePropertyDescriptor.cs
- TypeDescriptorFilterService.cs
- HtmlElementEventArgs.cs
- InputLanguage.cs
- GroupItemAutomationPeer.cs
- ColorContext.cs
- Privilege.cs
- SafeRightsManagementHandle.cs
- OracleParameterCollection.cs
- SessionStateContainer.cs
- AdornerHitTestResult.cs
- XmlSchemaAny.cs
- ElementUtil.cs
- ItemContainerGenerator.cs
- _SafeNetHandles.cs
- TabControlAutomationPeer.cs
- PropertyToken.cs
- XPathDocument.cs
- FontCacheUtil.cs
- DataGridViewRowPrePaintEventArgs.cs