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
- RoutedEventValueSerializer.cs
- PenThread.cs
- BroadcastEventHelper.cs
- HttpFileCollection.cs
- CacheEntry.cs
- DocumentApplicationJournalEntryEventArgs.cs
- BindUriHelper.cs
- VideoDrawing.cs
- DataRecordInternal.cs
- ButtonBaseDesigner.cs
- WindowsFormsHostAutomationPeer.cs
- TypeInitializationException.cs
- ComContractElementCollection.cs
- BackgroundWorker.cs
- AssemblyUtil.cs
- HwndKeyboardInputProvider.cs
- ItemCollection.cs
- ChangeDirector.cs
- AccessibleObject.cs
- Attribute.cs
- StaticExtensionConverter.cs
- Matrix3D.cs
- WorkflowServiceHostFactory.cs
- UnsafeMethods.cs
- FullTextState.cs
- DataSourceView.cs
- BindingNavigatorDesigner.cs
- SqlGenerator.cs
- DragStartedEventArgs.cs
- DependencyObjectPropertyDescriptor.cs
- EventPropertyMap.cs
- LogArchiveSnapshot.cs
- HebrewCalendar.cs
- BmpBitmapDecoder.cs
- ErasingStroke.cs
- DataGridViewElement.cs
- SendOperation.cs
- FixedMaxHeap.cs
- URIFormatException.cs
- ScaleTransform.cs
- webeventbuffer.cs
- XamlVector3DCollectionSerializer.cs
- WindowsAuthenticationEventArgs.cs
- DurableInstanceProvider.cs
- DateBoldEvent.cs
- BinaryParser.cs
- DragDropManager.cs
- SHA1Managed.cs
- ClientSettings.cs
- CounterSample.cs
- CharacterShapingProperties.cs
- DataList.cs
- MiniLockedBorderGlyph.cs
- Camera.cs
- SamlDelegatingWriter.cs
- DataTableReader.cs
- DataExpression.cs
- InvalidProgramException.cs
- GeneralTransform2DTo3D.cs
- TextEditorLists.cs
- StrongTypingException.cs
- SqlClientFactory.cs
- IdleTimeoutMonitor.cs
- PropertyGeneratedEventArgs.cs
- CryptoProvider.cs
- TextElementEnumerator.cs
- ThicknessConverter.cs
- WebBrowserNavigatingEventHandler.cs
- UpDownBaseDesigner.cs
- BindingManagerDataErrorEventArgs.cs
- PerfCounterSection.cs
- DesignerCommandAdapter.cs
- ButtonPopupAdapter.cs
- Exceptions.cs
- UnSafeCharBuffer.cs
- Geometry.cs
- ExecutedRoutedEventArgs.cs
- StringUtil.cs
- HiddenField.cs
- XmlRawWriterWrapper.cs
- DataPagerField.cs
- MouseEvent.cs
- BaseAutoFormat.cs
- GacUtil.cs
- CriticalHandle.cs
- MappingMetadataHelper.cs
- ipaddressinformationcollection.cs
- MainMenu.cs
- ElementHost.cs
- ColorMatrix.cs
- DrawingCollection.cs
- GroupItem.cs
- AxParameterData.cs
- ToolStripContainer.cs
- BaseCodeDomTreeGenerator.cs
- StylusPoint.cs
- DBParameter.cs
- RuleSetReference.cs
- SecurityHelper.cs
- VoiceInfo.cs