Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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; } } [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
- SchemaAttDef.cs
- NegotiateStream.cs
- HiddenFieldPageStatePersister.cs
- SubpageParaClient.cs
- ComboBoxItem.cs
- path.cs
- StylusDevice.cs
- DataGridItemCollection.cs
- ColumnReorderedEventArgs.cs
- ProjectedSlot.cs
- HttpCachePolicy.cs
- BitmapEffectDrawingContextState.cs
- AssemblyFilter.cs
- ToolStripRenderEventArgs.cs
- RootContext.cs
- DateTimeUtil.cs
- WebPartTracker.cs
- ParagraphResult.cs
- DbSetClause.cs
- EntryWrittenEventArgs.cs
- ObsoleteAttribute.cs
- Int32Converter.cs
- SmtpNegotiateAuthenticationModule.cs
- RelatedImageListAttribute.cs
- ActivityTypeResolver.xaml.cs
- EncodingNLS.cs
- DataGridViewToolTip.cs
- Keywords.cs
- CachingHintValidation.cs
- ProjectionPathSegment.cs
- DefaultHttpHandler.cs
- GeneralTransformGroup.cs
- ServicePointManager.cs
- TabControlAutomationPeer.cs
- TraceProvider.cs
- EtwTrace.cs
- StrokeNodeEnumerator.cs
- ClientTargetSection.cs
- SystemUnicastIPAddressInformation.cs
- SqlRowUpdatedEvent.cs
- PackageFilter.cs
- ReplacementText.cs
- cookiecontainer.cs
- RawUIStateInputReport.cs
- followingquery.cs
- DecimalFormatter.cs
- TextContainerChangedEventArgs.cs
- HeaderedContentControl.cs
- PropertyEntry.cs
- ExtendedPropertyInfo.cs
- ContentPlaceHolder.cs
- SQLInt16.cs
- NullRuntimeConfig.cs
- WindowsRegion.cs
- PriorityRange.cs
- DocumentPageHost.cs
- StreamUpdate.cs
- Queue.cs
- EdmProviderManifest.cs
- ActiveXHelper.cs
- FontFaceLayoutInfo.cs
- Expander.cs
- OrderedDictionary.cs
- DebugView.cs
- PageBreakRecord.cs
- VirtualizingStackPanel.cs
- ColumnMapVisitor.cs
- _DynamicWinsockMethods.cs
- XsdDateTime.cs
- Application.cs
- DrawingContextWalker.cs
- NavigationWindowAutomationPeer.cs
- CodeIterationStatement.cs
- Journaling.cs
- Themes.cs
- EntityCommandDefinition.cs
- DynamicDocumentPaginator.cs
- EUCJPEncoding.cs
- AccessDataSourceView.cs
- KeyNotFoundException.cs
- SqlDataSourceView.cs
- MulticastIPAddressInformationCollection.cs
- MulticastDelegate.cs
- MLangCodePageEncoding.cs
- TiffBitmapEncoder.cs
- DataGridClipboardHelper.cs
- Util.cs
- Query.cs
- EndpointAddressMessageFilter.cs
- LinearQuaternionKeyFrame.cs
- TreeNodeCollectionEditorDialog.cs
- HwndProxyElementProvider.cs
- WindowsNonControl.cs
- CodeSubDirectoriesCollection.cs
- OverflowException.cs
- RSAPKCS1SignatureDeformatter.cs
- WebPartsSection.cs
- TextAction.cs
- WsdlBuildProvider.cs
- Condition.cs