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
- ZipIOExtraField.cs
- HtmlEmptyTagControlBuilder.cs
- TableRowCollection.cs
- SqlTypeSystemProvider.cs
- List.cs
- VisualStyleElement.cs
- XsltArgumentList.cs
- SHA512Managed.cs
- SafeTokenHandle.cs
- ClientConfigurationSystem.cs
- DataGridViewAccessibleObject.cs
- ClrProviderManifest.cs
- ContextStaticAttribute.cs
- SendActivity.cs
- AdapterUtil.cs
- JoinGraph.cs
- Camera.cs
- LogAppendAsyncResult.cs
- JapaneseCalendar.cs
- _Events.cs
- ParserStreamGeometryContext.cs
- UIElement3D.cs
- BamlTreeNode.cs
- ComplexPropertyEntry.cs
- StrokeCollectionConverter.cs
- CodeAccessSecurityEngine.cs
- FtpCachePolicyElement.cs
- EncodingStreamWrapper.cs
- ReachUIElementCollectionSerializer.cs
- SQLDoubleStorage.cs
- XamlPoint3DCollectionSerializer.cs
- CodeTypeMember.cs
- XmlSchemaSimpleContentExtension.cs
- EventDescriptorCollection.cs
- ISFClipboardData.cs
- SQLDoubleStorage.cs
- SqlCacheDependencyDatabase.cs
- Ipv6Element.cs
- FastEncoderWindow.cs
- XsdBuildProvider.cs
- SymLanguageVendor.cs
- NameNode.cs
- ExpressionBuilder.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- RealizationDrawingContextWalker.cs
- TerminatorSinks.cs
- DeclarativeCatalogPartDesigner.cs
- __ComObject.cs
- DaylightTime.cs
- HostProtectionPermission.cs
- ImageListUtils.cs
- PreservationFileReader.cs
- GcSettings.cs
- keycontainerpermission.cs
- CancellationTokenSource.cs
- Brush.cs
- OutputCacheModule.cs
- ContentPresenter.cs
- FormsIdentity.cs
- MouseButtonEventArgs.cs
- ServiceAuthorizationElement.cs
- DateTimeConstantAttribute.cs
- CheckedPointers.cs
- OdbcConnectionString.cs
- CustomErrorsSection.cs
- _OverlappedAsyncResult.cs
- TextTreeFixupNode.cs
- FileDialog.cs
- SqlPersonalizationProvider.cs
- MemberPath.cs
- LOSFormatter.cs
- DesignerView.Commands.cs
- ProviderException.cs
- ClientProxyGenerator.cs
- LayoutExceptionEventArgs.cs
- EncoderExceptionFallback.cs
- BCLDebug.cs
- CatalogZone.cs
- IIS7UserPrincipal.cs
- ObjectMemberMapping.cs
- TextUtf8RawTextWriter.cs
- ConfigurationSectionGroup.cs
- XmlSchemaAny.cs
- DefaultValueAttribute.cs
- GridLengthConverter.cs
- EntityDataSourceSelectedEventArgs.cs
- StringInfo.cs
- Utils.cs
- DataContractSerializerSection.cs
- SelectedCellsChangedEventArgs.cs
- WindowsListViewItem.cs
- SqlDataRecord.cs
- GenerateTemporaryTargetAssembly.cs
- TextProperties.cs
- CommonProperties.cs
- ToolboxDataAttribute.cs
- CompatibleComparer.cs
- ImmComposition.cs
- behaviorssection.cs
- DataControlFieldHeaderCell.cs