Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / RegisteredScript.cs / 1305376 / RegisteredScript.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System.Diagnostics; using System.Diagnostics.CodeAnalysis; 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
- BindingValueChangedEventArgs.cs
- XmlNamedNodeMap.cs
- WinFormsSecurity.cs
- RegexTree.cs
- Set.cs
- EntitySetBaseCollection.cs
- IIS7ConfigurationLoader.cs
- EncoderParameter.cs
- DropTarget.cs
- ClientRuntimeConfig.cs
- TargetPerspective.cs
- AutomationPropertyInfo.cs
- Panel.cs
- DesignerActionGlyph.cs
- DiagnosticsConfigurationHandler.cs
- EventsTab.cs
- SendMailErrorEventArgs.cs
- QilSortKey.cs
- httpserverutility.cs
- SmiEventSink.cs
- StringInfo.cs
- controlskin.cs
- SafeBitVector32.cs
- Geometry.cs
- ProcessInfo.cs
- Tag.cs
- MembershipValidatePasswordEventArgs.cs
- RelationalExpressions.cs
- SafeSecurityHelper.cs
- FilteredXmlReader.cs
- HMACSHA384.cs
- Base64Encoder.cs
- _DigestClient.cs
- DeferrableContent.cs
- DispatcherHookEventArgs.cs
- SqlDesignerDataSourceView.cs
- XmlReaderSettings.cs
- HttpChannelBindingToken.cs
- Light.cs
- BrowserCapabilitiesFactory35.cs
- FixedHighlight.cs
- Padding.cs
- Pointer.cs
- SecureEnvironment.cs
- _CommandStream.cs
- PropertyInformation.cs
- BaseAsyncResult.cs
- EdmComplexTypeAttribute.cs
- RNGCryptoServiceProvider.cs
- Token.cs
- BinarySerializer.cs
- HttpGetServerProtocol.cs
- COM2FontConverter.cs
- QueryGeneratorBase.cs
- ColumnBinding.cs
- CompiledScopeCriteria.cs
- MultipartContentParser.cs
- WrappedReader.cs
- StrongName.cs
- PropertyPushdownHelper.cs
- RightsManagementPermission.cs
- LicenseProviderAttribute.cs
- DSASignatureFormatter.cs
- SafeCertificateStore.cs
- HwndTarget.cs
- TemplateXamlTreeBuilder.cs
- DataReaderContainer.cs
- ReachFixedDocumentSerializer.cs
- ChildrenQuery.cs
- Rotation3D.cs
- CompleteWizardStep.cs
- DataFieldCollectionEditor.cs
- MemberDescriptor.cs
- safemediahandle.cs
- ResourceDescriptionAttribute.cs
- BaseTreeIterator.cs
- Visual3D.cs
- IntegrationExceptionEventArgs.cs
- querybuilder.cs
- BuildProvider.cs
- RegexCompiler.cs
- Message.cs
- Privilege.cs
- BaseAsyncResult.cs
- SqlExpander.cs
- FontDialog.cs
- ToolStripRenderEventArgs.cs
- CodeObjectCreateExpression.cs
- EmbeddedMailObjectCollectionEditor.cs
- XmlSchemaImport.cs
- Rule.cs
- FieldMetadata.cs
- QuaternionIndependentAnimationStorage.cs
- DebugView.cs
- MultiTrigger.cs
- MonthCalendarDesigner.cs
- PageAdapter.cs
- TextRangeEdit.cs
- MenuAdapter.cs
- ObjectStateEntry.cs