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
- ProgramNode.cs
- RepeatInfo.cs
- XmlWrappingReader.cs
- ConstraintCollection.cs
- SimplePropertyEntry.cs
- SpoolingTaskBase.cs
- Quad.cs
- SQLDoubleStorage.cs
- WebPartCloseVerb.cs
- Int32CAMarshaler.cs
- TextEditorTyping.cs
- WorkflowCommandExtensionItem.cs
- SQLDateTime.cs
- CodeAccessPermission.cs
- SymLanguageVendor.cs
- XmlAtomicValue.cs
- nulltextcontainer.cs
- WebPartConnectionsEventArgs.cs
- Listener.cs
- ViewManager.cs
- TableStyle.cs
- ColorConvertedBitmap.cs
- FederatedMessageSecurityOverHttp.cs
- XmlNullResolver.cs
- PropertyChangedEventArgs.cs
- WsrmTraceRecord.cs
- TagMapCollection.cs
- LocalizationParserHooks.cs
- GeneralTransformCollection.cs
- PnrpPermission.cs
- LayoutTableCell.cs
- BaseCodeDomTreeGenerator.cs
- PrivilegeNotHeldException.cs
- DataGridViewCellStyleChangedEventArgs.cs
- ProjectionCamera.cs
- WaitForChangedResult.cs
- UserControl.cs
- Lookup.cs
- UIElementIsland.cs
- StateManager.cs
- FixUpCollection.cs
- SwitchCase.cs
- DataGridCellsPanel.cs
- DockPanel.cs
- Substitution.cs
- IntSecurity.cs
- DataSourceProvider.cs
- WebConfigurationFileMap.cs
- ListParagraph.cs
- SharedStatics.cs
- ResXFileRef.cs
- SiteOfOriginPart.cs
- SqlReorderer.cs
- Monitor.cs
- LazyInitializer.cs
- HttpFileCollectionWrapper.cs
- Ref.cs
- GifBitmapEncoder.cs
- XmlTextReaderImpl.cs
- SettingsContext.cs
- EventManager.cs
- Inline.cs
- CryptoApi.cs
- SemanticResolver.cs
- FrugalMap.cs
- WebPartUtil.cs
- TableLayoutStyle.cs
- RolePrincipal.cs
- SingleConverter.cs
- WindowsFormsSynchronizationContext.cs
- RestHandlerFactory.cs
- EventListener.cs
- FlowDecision.cs
- AuthorizationRule.cs
- MouseCaptureWithinProperty.cs
- LambdaCompiler.Generated.cs
- SemaphoreSecurity.cs
- TextSimpleMarkerProperties.cs
- SelectedPathEditor.cs
- DelegatedStream.cs
- ConnectionStringsExpressionBuilder.cs
- WebPartTransformerAttribute.cs
- EditorPart.cs
- KeyConverter.cs
- counter.cs
- FillErrorEventArgs.cs
- Helper.cs
- FlowSwitch.cs
- FileDialogCustomPlacesCollection.cs
- WebPartEditorApplyVerb.cs
- PrintControllerWithStatusDialog.cs
- HttpServerUtilityWrapper.cs
- SchemaCollectionPreprocessor.cs
- ControlParameter.cs
- WsdlBuildProvider.cs
- EntitySqlQueryState.cs
- PreservationFileWriter.cs
- WindowsComboBox.cs
- IncrementalReadDecoders.cs
- TypeConverterMarkupExtension.cs