Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / xsp / System / Web / Extensions / ui / ScriptBehaviorDescriptor.cs / 2 / ScriptBehaviorDescriptor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; using System.Web; using System.Web.Resources; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal) ] public class ScriptBehaviorDescriptor : ScriptComponentDescriptor { private string _name; [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ID")] public ScriptBehaviorDescriptor(string type, string elementID) : base(type, elementID) { RegisterDispose = false; } public override string ClientID { get { if (String.IsNullOrEmpty(ID)) { Debug.Assert(!String.IsNullOrEmpty(ElementID), "Base ctor ensures ElementID is not null or empty"); return ElementID + "$" + Name; } else { return ID; } } } [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ID")] public string ElementID { get { return base.ElementIDInternal; } } public string Name { get { if (String.IsNullOrEmpty(_name)) { return GetTypeName(this.Type); } else { return _name; } } set { _name = value; } } // Returns the short name of a possibly namespace-qualified type name. // Examples: // "TestNS1.TestNS2.TestType" -> "TestType" // "TestType" -> "TestType" private static string GetTypeName(string type) { int index = type.LastIndexOf('.'); if (index == -1) { return type; } else { return type.Substring(index + 1); } } protected internal override string GetScript() { if (!String.IsNullOrEmpty(_name)) { AddProperty("name", _name); } return base.GetScript(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; using System.Web; using System.Web.Resources; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal) ] public class ScriptBehaviorDescriptor : ScriptComponentDescriptor { private string _name; [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ID")] public ScriptBehaviorDescriptor(string type, string elementID) : base(type, elementID) { RegisterDispose = false; } public override string ClientID { get { if (String.IsNullOrEmpty(ID)) { Debug.Assert(!String.IsNullOrEmpty(ElementID), "Base ctor ensures ElementID is not null or empty"); return ElementID + "$" + Name; } else { return ID; } } } [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ID")] public string ElementID { get { return base.ElementIDInternal; } } public string Name { get { if (String.IsNullOrEmpty(_name)) { return GetTypeName(this.Type); } else { return _name; } } set { _name = value; } } // Returns the short name of a possibly namespace-qualified type name. // Examples: // "TestNS1.TestNS2.TestType" -> "TestType" // "TestType" -> "TestType" private static string GetTypeName(string type) { int index = type.LastIndexOf('.'); if (index == -1) { return type; } else { return type.Substring(index + 1); } } protected internal override string GetScript() { if (!String.IsNullOrEmpty(_name)) { AddProperty("name", _name); } return base.GetScript(); } } } // 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
- WindowsEditBoxRange.cs
- Mutex.cs
- ValidationEventArgs.cs
- UIElement.cs
- SaveRecipientRequest.cs
- ProfilePropertyNameValidator.cs
- FlowDocumentPaginator.cs
- StylusSystemGestureEventArgs.cs
- EventLogPermissionEntry.cs
- ListMarkerSourceInfo.cs
- DesignerCommandSet.cs
- RequestQueue.cs
- odbcmetadatafactory.cs
- DetailsViewPagerRow.cs
- clipboard.cs
- DataGridViewColumnCollection.cs
- StringUtil.cs
- BinaryObjectReader.cs
- ExecutionContext.cs
- PhysicalAddress.cs
- ChangeProcessor.cs
- BlurBitmapEffect.cs
- DataContractSet.cs
- FilteredReadOnlyMetadataCollection.cs
- LinkConverter.cs
- TextPattern.cs
- HybridCollection.cs
- SByteConverter.cs
- NamespaceQuery.cs
- UrlPropertyAttribute.cs
- NavigationService.cs
- DummyDataSource.cs
- ClientTarget.cs
- ResourceBinder.cs
- QEncodedStream.cs
- EntityDataSourceDesignerHelper.cs
- TextEditorSpelling.cs
- DecoderFallback.cs
- SettingsAttributes.cs
- HandlerWithFactory.cs
- FlowDocument.cs
- Size3D.cs
- XmlDataImplementation.cs
- ReceiveContext.cs
- GridViewRowPresenterBase.cs
- ExtendLockAsyncResult.cs
- ColorAnimationBase.cs
- xsdvalidator.cs
- smtppermission.cs
- PackageProperties.cs
- SoapEnvelopeProcessingElement.cs
- NodeCounter.cs
- ClientBuildManager.cs
- TextureBrush.cs
- NullableBoolConverter.cs
- FacetDescriptionElement.cs
- Empty.cs
- TripleDESCryptoServiceProvider.cs
- ProcessModuleCollection.cs
- ProviderSettings.cs
- ValidateNames.cs
- _NestedMultipleAsyncResult.cs
- UriExt.cs
- ArgumentException.cs
- SizeChangedInfo.cs
- WebPartVerb.cs
- DefaultHttpHandler.cs
- NavigatorOutput.cs
- JsonClassDataContract.cs
- FixedDocumentPaginator.cs
- LinkClickEvent.cs
- ApplicationTrust.cs
- KnownColorTable.cs
- Exception.cs
- LabelLiteral.cs
- ColumnMapCopier.cs
- SizeConverter.cs
- ToolStripRenderer.cs
- CompiledQuery.cs
- ObjectContext.cs
- QueryRewriter.cs
- Size.cs
- WebBaseEventKeyComparer.cs
- CodeSubDirectory.cs
- WebPart.cs
- ObjectTypeMapping.cs
- DuplicateContext.cs
- OracleString.cs
- ContainerControl.cs
- WSFederationHttpBindingCollectionElement.cs
- DrawingAttributeSerializer.cs
- SqlParameterizer.cs
- KeyFrames.cs
- SerializationSectionGroup.cs
- HashCryptoHandle.cs
- BackStopAuthenticationModule.cs
- BinaryFormatterSinks.cs
- SafeTimerHandle.cs
- DebugView.cs
- DataBoundControlHelper.cs