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
- TypeConverter.cs
- SqlGenericUtil.cs
- TraceHandler.cs
- NetworkInterface.cs
- RadioButton.cs
- PhysicalOps.cs
- FixedSOMTableRow.cs
- HMACMD5.cs
- ListViewInsertEventArgs.cs
- CodeDelegateCreateExpression.cs
- OleDbMetaDataFactory.cs
- KeyGesture.cs
- JulianCalendar.cs
- StreamWriter.cs
- RelatedPropertyManager.cs
- TimelineCollection.cs
- BCLDebug.cs
- MemberInfoSerializationHolder.cs
- Span.cs
- PropertyItem.cs
- ProxyWebPart.cs
- RepeatButton.cs
- DataServiceHost.cs
- AnnotationStore.cs
- SmtpAuthenticationManager.cs
- TypeReference.cs
- DocumentGrid.cs
- SystemTcpConnection.cs
- DecimalAnimationBase.cs
- InputLanguageSource.cs
- DemultiplexingClientMessageFormatter.cs
- ListView.cs
- PreloadedPackages.cs
- OdbcReferenceCollection.cs
- ListenerConnectionModeReader.cs
- SingletonConnectionReader.cs
- DependencyPropertyChangedEventArgs.cs
- DbgUtil.cs
- MenuRendererClassic.cs
- PatternMatcher.cs
- StaticDataManager.cs
- UniqueEventHelper.cs
- LinkedResource.cs
- XmlSchemaSimpleType.cs
- PostBackTrigger.cs
- SuspendDesigner.cs
- ModelFunction.cs
- _WinHttpWebProxyDataBuilder.cs
- LocatorManager.cs
- MbpInfo.cs
- GeneralTransform2DTo3DTo2D.cs
- ListViewTableCell.cs
- CompiledRegexRunnerFactory.cs
- SparseMemoryStream.cs
- ExpressionBuilderContext.cs
- ParallelTimeline.cs
- EraserBehavior.cs
- CodePageUtils.cs
- ContentFilePart.cs
- SHA1CryptoServiceProvider.cs
- WebServiceData.cs
- ImageKeyConverter.cs
- CodeGeneratorOptions.cs
- basevalidator.cs
- QueryPageSettingsEventArgs.cs
- precedingquery.cs
- Pkcs7Signer.cs
- CookieParameter.cs
- TextBox.cs
- DbConnectionInternal.cs
- ScrollItemPatternIdentifiers.cs
- Message.cs
- OptionUsage.cs
- MenuCommandService.cs
- InitializeCorrelation.cs
- AsymmetricSignatureDeformatter.cs
- JobPageOrder.cs
- MenuScrollingVisibilityConverter.cs
- CodeDomSerializerException.cs
- basemetadatamappingvisitor.cs
- Attributes.cs
- Brush.cs
- FilterQueryOptionExpression.cs
- RightsManagementErrorHandler.cs
- SecurityTokenAuthenticator.cs
- GroupQuery.cs
- PolicyFactory.cs
- cache.cs
- FilterEventArgs.cs
- FixedSOMGroup.cs
- IndependentAnimationStorage.cs
- XPathBuilder.cs
- DbDataReader.cs
- Decoder.cs
- FlatButtonAppearance.cs
- XmlIterators.cs
- DataTableReader.cs
- GAC.cs
- PassportPrincipal.cs
- IntMinMaxAggregationOperator.cs