Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / TargetControlTypeCache.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GridViewCancelEditEventArgs.cs
- HMAC.cs
- SeverityFilter.cs
- EntityParameterCollection.cs
- ClientBuildManager.cs
- DateTimeOffset.cs
- BaseServiceProvider.cs
- Quaternion.cs
- PostBackTrigger.cs
- ReadOnlyDataSourceView.cs
- WebRequestModulesSection.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- RegexParser.cs
- HtmlTableRowCollection.cs
- RevocationPoint.cs
- MetroSerializationManager.cs
- RSAPKCS1KeyExchangeFormatter.cs
- UInt16.cs
- ImageInfo.cs
- SessionState.cs
- MarshalByValueComponent.cs
- dbenumerator.cs
- TraceInternal.cs
- InputScopeManager.cs
- StreamResourceInfo.cs
- ImplicitInputBrush.cs
- BlurBitmapEffect.cs
- NavigationHelper.cs
- Msec.cs
- WindowsAuthenticationModule.cs
- XmlHierarchicalDataSourceView.cs
- PageParserFilter.cs
- AutoResetEvent.cs
- Baml6ConstructorInfo.cs
- StylusPoint.cs
- PageHandlerFactory.cs
- Avt.cs
- CacheAxisQuery.cs
- SafePointer.cs
- SQLResource.cs
- DataGridViewHitTestInfo.cs
- DefaultDialogButtons.cs
- TrackingServices.cs
- ViewStateException.cs
- PolyBezierSegment.cs
- RepeatInfo.cs
- ScaleTransform.cs
- EmbeddedMailObjectsCollection.cs
- Registry.cs
- CatalogPart.cs
- MdbDataFileEditor.cs
- LoginName.cs
- control.ime.cs
- httpserverutility.cs
- TreeNodeBinding.cs
- BaseDataListDesigner.cs
- GlyphTypeface.cs
- TabControlDesigner.cs
- X500Name.cs
- DurableServiceAttribute.cs
- CodeMemberField.cs
- FormViewPageEventArgs.cs
- DataTemplateSelector.cs
- StringFunctions.cs
- ProcessModuleCollection.cs
- Transform.cs
- CodeIndexerExpression.cs
- TryCatchDesigner.xaml.cs
- RTLAwareMessageBox.cs
- HwndTarget.cs
- CharacterString.cs
- DocumentXmlWriter.cs
- SaveFileDialog.cs
- URI.cs
- streamingZipPartStream.cs
- X509Chain.cs
- HttpsChannelListener.cs
- AsyncOperationManager.cs
- PositiveTimeSpanValidator.cs
- Dispatcher.cs
- WebPartMinimizeVerb.cs
- SourceLineInfo.cs
- SettingsAttributes.cs
- MarginsConverter.cs
- AnnotationResource.cs
- MsmqProcessProtocolHandler.cs
- HostingEnvironmentSection.cs
- ConfigurationValues.cs
- CaretElement.cs
- RankException.cs
- Char.cs
- HwndStylusInputProvider.cs
- ModelItemDictionaryImpl.cs
- SubstitutionList.cs
- SeekStoryboard.cs
- UIElement.cs
- QueryContinueDragEvent.cs
- FunctionNode.cs
- OptimalBreakSession.cs
- Thread.cs