Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / ui / TargetControlTypeCache.cs / 1 / TargetControlTypeCache.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections; // Cache TargetControlTypeAttributes to improve performance internal static class TargetControlTypeCache { // Maps Type (extender control) to Type[] (valid target control types) private static readonly Hashtable _targetControlTypeCache = Hashtable.Synchronized(new Hashtable()); public static Type[] GetTargetControlTypes(Type extenderControlType) { Type[] types = (Type[])_targetControlTypeCache[extenderControlType]; if (types == null) { types = GetTargetControlTypesInternal(extenderControlType); _targetControlTypeCache[extenderControlType] = types; } return types; } private static Type[] GetTargetControlTypesInternal(Type extenderControlType) { object[] attrs = extenderControlType.GetCustomAttributes(typeof(TargetControlTypeAttribute), true); Type[] types = new Type[attrs.Length]; for (int i = 0; i < attrs.Length; i++) { types[i] = ((TargetControlTypeAttribute)attrs[i]).TargetControlType; } return types; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSerializerVersionAttribute.cs
- XmlSchemaType.cs
- HashCryptoHandle.cs
- UnauthorizedAccessException.cs
- NameObjectCollectionBase.cs
- UIPermission.cs
- DelegateHelpers.cs
- Convert.cs
- DbParameterHelper.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DictionaryEntry.cs
- RectConverter.cs
- IndicFontClient.cs
- SqlUdtInfo.cs
- CqlLexerHelpers.cs
- TransformationRules.cs
- Input.cs
- FigureHelper.cs
- RedirectionProxy.cs
- SelectorAutomationPeer.cs
- SafeNativeMethodsCLR.cs
- SamlAuthenticationStatement.cs
- BitmapEffectCollection.cs
- View.cs
- NumericUpDown.cs
- MaskedTextProvider.cs
- Number.cs
- _ServiceNameStore.cs
- Int64AnimationUsingKeyFrames.cs
- DialogWindow.cs
- ObjectStorage.cs
- MsmqBindingBase.cs
- XsltSettings.cs
- BitSet.cs
- GridViewSelectEventArgs.cs
- CodeSnippetTypeMember.cs
- XmlSchemaObjectTable.cs
- RenamedEventArgs.cs
- EncodingStreamWrapper.cs
- CursorConverter.cs
- PropertyIDSet.cs
- MouseCaptureWithinProperty.cs
- ActivationServices.cs
- WebPartDisplayModeCancelEventArgs.cs
- TreeWalkHelper.cs
- ListViewItem.cs
- SettingsAttributeDictionary.cs
- CommonProperties.cs
- MsmqInputChannelBase.cs
- OrderedDictionaryStateHelper.cs
- MessageEncodingBindingElementImporter.cs
- MimeMapping.cs
- HttpRuntime.cs
- WebConfigurationFileMap.cs
- HyperLinkStyle.cs
- XmlEncodedRawTextWriter.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- InvalidPrinterException.cs
- TextWriter.cs
- TextAnchor.cs
- EndGetFileNameFromUserRequest.cs
- BamlTreeUpdater.cs
- XmlAutoDetectWriter.cs
- ThousandthOfEmRealDoubles.cs
- MultipleViewPattern.cs
- X509KeyIdentifierClauseType.cs
- CustomCategoryAttribute.cs
- WindowsTitleBar.cs
- UIServiceHelper.cs
- HtmlWindow.cs
- PropertyChangedEventArgs.cs
- WindowsGraphics2.cs
- ScriptingProfileServiceSection.cs
- AssociativeAggregationOperator.cs
- ListSortDescription.cs
- NetNamedPipeBindingCollectionElement.cs
- _LocalDataStore.cs
- SeekableReadStream.cs
- DoubleLinkListEnumerator.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- CharKeyFrameCollection.cs
- X509CertificateCollection.cs
- SourceElementsCollection.cs
- ellipse.cs
- CollectionTraceRecord.cs
- SiteMapPathDesigner.cs
- WorkflowInvoker.cs
- HtmlEmptyTagControlBuilder.cs
- DataServiceProcessingPipeline.cs
- WebServiceData.cs
- ObjectListFieldCollection.cs
- OleDbTransaction.cs
- TraceContext.cs
- StringReader.cs
- SoapProtocolImporter.cs
- PageSetupDialog.cs
- MenuCommands.cs
- RegexRunner.cs
- DbConnectionClosed.cs
- InputReport.cs