Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Reflection / TypeDelegator.cs / 1 / TypeDelegator.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // TypeDelegator // This class wraps a Type object and delegates all methods to that Type. namespace System.Reflection { using System; using System.Runtime.Remoting.Activation; using System.Runtime.InteropServices; using CultureInfo = System.Globalization.CultureInfo; [Serializable()] [System.Runtime.InteropServices.ComVisible(true)] public class TypeDelegator : Type { protected Type typeImpl; protected TypeDelegator() {} public TypeDelegator(Type delegatingType) { if (delegatingType == null) throw new ArgumentNullException("delegatingType"); typeImpl = delegatingType; } public override Guid GUID { get {return typeImpl.GUID;} } public override int MetadataToken { get { return typeImpl.MetadataToken; } } public override Object InvokeMember(String name,BindingFlags invokeAttr,Binder binder,Object target, Object[] args,ParameterModifier[] modifiers,CultureInfo culture,String[] namedParameters) { return typeImpl.InvokeMember(name,invokeAttr,binder,target,args,modifiers,culture,namedParameters); } public override Module Module { get {return typeImpl.Module;} } public override Assembly Assembly { get {return typeImpl.Assembly;} } public override RuntimeTypeHandle TypeHandle { get{return typeImpl.TypeHandle;} } public override String Name { get{return typeImpl.Name;} } public override String FullName { get{return typeImpl.FullName;} } public override String Namespace { get{return typeImpl.Namespace;} } public override String AssemblyQualifiedName { get { return typeImpl.AssemblyQualifiedName; } } public override Type BaseType { get{return typeImpl.BaseType;} } protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr,Binder binder, CallingConventions callConvention, Type[] types,ParameterModifier[] modifiers) { return typeImpl.GetConstructor(bindingAttr,binder,callConvention,types,modifiers); } [System.Runtime.InteropServices.ComVisible(true)] public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) { return typeImpl.GetConstructors(bindingAttr); } protected override MethodInfo GetMethodImpl(String name,BindingFlags bindingAttr,Binder binder, CallingConventions callConvention, Type[] types,ParameterModifier[] modifiers) { // This is interesting there are two paths into the impl. One that validates // type as non-null and one where type may be null. if (types == null) return typeImpl.GetMethod(name,bindingAttr); else return typeImpl.GetMethod(name,bindingAttr,binder,callConvention,types,modifiers); } public override MethodInfo[] GetMethods(BindingFlags bindingAttr) { return typeImpl.GetMethods(bindingAttr); } public override FieldInfo GetField(String name, BindingFlags bindingAttr) { return typeImpl.GetField(name,bindingAttr); } public override FieldInfo[] GetFields(BindingFlags bindingAttr) { return typeImpl.GetFields(bindingAttr); } public override Type GetInterface(String name, bool ignoreCase) { return typeImpl.GetInterface(name,ignoreCase); } public override Type[] GetInterfaces() { return typeImpl.GetInterfaces(); } public override EventInfo GetEvent(String name,BindingFlags bindingAttr) { return typeImpl.GetEvent(name,bindingAttr); } public override EventInfo[] GetEvents() { return typeImpl.GetEvents(); } protected override PropertyInfo GetPropertyImpl(String name,BindingFlags bindingAttr,Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) { if (returnType == null && types == null) return typeImpl.GetProperty(name,bindingAttr); else return typeImpl.GetProperty(name,bindingAttr,binder,returnType,types,modifiers); } public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) { return typeImpl.GetProperties(bindingAttr); } public override EventInfo[] GetEvents(BindingFlags bindingAttr) { return typeImpl.GetEvents(bindingAttr); } public override Type[] GetNestedTypes(BindingFlags bindingAttr) { return typeImpl.GetNestedTypes(bindingAttr); } public override Type GetNestedType(String name, BindingFlags bindingAttr) { return typeImpl.GetNestedType(name,bindingAttr); } public override MemberInfo[] GetMember(String name, MemberTypes type, BindingFlags bindingAttr) { return typeImpl.GetMember(name,type,bindingAttr); } public override MemberInfo[] GetMembers(BindingFlags bindingAttr) { return typeImpl.GetMembers(bindingAttr); } protected override TypeAttributes GetAttributeFlagsImpl() { return typeImpl.Attributes; } protected override bool IsArrayImpl() { return typeImpl.IsArray; } protected override bool IsPrimitiveImpl() { return typeImpl.IsPrimitive; } protected override bool IsByRefImpl() { return typeImpl.IsByRef; } protected override bool IsPointerImpl() { return typeImpl.IsPointer; } protected override bool IsValueTypeImpl() { return typeImpl.IsValueType; } protected override bool IsCOMObjectImpl() { return typeImpl.IsCOMObject; } public override Type GetElementType() { return typeImpl.GetElementType(); } protected override bool HasElementTypeImpl() { return typeImpl.HasElementType; } public override Type UnderlyingSystemType { get {return typeImpl.UnderlyingSystemType;} } // ICustomAttributeProvider public override Object[] GetCustomAttributes(bool inherit) { return typeImpl.GetCustomAttributes(inherit); } public override Object[] GetCustomAttributes(Type attributeType, bool inherit) { return typeImpl.GetCustomAttributes(attributeType, inherit); } public override bool IsDefined(Type attributeType, bool inherit) { return typeImpl.IsDefined(attributeType, inherit); } [System.Runtime.InteropServices.ComVisible(true)] public override InterfaceMapping GetInterfaceMap(Type interfaceType) { return typeImpl.GetInterfaceMap(interfaceType); } } } // 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
- MethodMessage.cs
- FormViewInsertedEventArgs.cs
- DispatcherObject.cs
- MessageVersionConverter.cs
- AttributeProviderAttribute.cs
- SmiSettersStream.cs
- IgnoreSectionHandler.cs
- LinqToSqlWrapper.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- objectresult_tresulttype.cs
- EncodingTable.cs
- WebDisplayNameAttribute.cs
- Route.cs
- SessionParameter.cs
- OrthographicCamera.cs
- PreviewPrintController.cs
- AppDomainInstanceProvider.cs
- GradientBrush.cs
- TextEffectResolver.cs
- SqlFacetAttribute.cs
- XmlUrlResolver.cs
- GridViewCommandEventArgs.cs
- FileDialog_Vista.cs
- GcSettings.cs
- Filter.cs
- AspNetHostingPermission.cs
- AudioBase.cs
- PartitionerStatic.cs
- XmlILModule.cs
- SqlGatherProducedAliases.cs
- CacheForPrimitiveTypes.cs
- RelationshipSet.cs
- AsnEncodedData.cs
- IpcClientChannel.cs
- ComponentResourceKeyConverter.cs
- EventItfInfo.cs
- RequestTimeoutManager.cs
- SqlDataSourceCache.cs
- FilterException.cs
- ContentType.cs
- MulticastIPAddressInformationCollection.cs
- GlyphsSerializer.cs
- ConfigurationConverterBase.cs
- SelectedDatesCollection.cs
- RoleServiceManager.cs
- JsonReaderDelegator.cs
- DataRecordInternal.cs
- WebPartsSection.cs
- SemanticBasicElement.cs
- PtsCache.cs
- IRCollection.cs
- VisualBrush.cs
- ProcessHostMapPath.cs
- HttpHostedTransportConfiguration.cs
- FigureParaClient.cs
- HostingMessageProperty.cs
- ToolStripDesignerAvailabilityAttribute.cs
- XmlILAnnotation.cs
- SqlVisitor.cs
- TemplateColumn.cs
- MenuItemStyleCollection.cs
- FrameworkRichTextComposition.cs
- RemoteX509AsymmetricSecurityKey.cs
- DirectionalLight.cs
- RijndaelCryptoServiceProvider.cs
- SafeLibraryHandle.cs
- BindMarkupExtensionSerializer.cs
- DbConnectionOptions.cs
- ExpressionBuilderContext.cs
- DataGridViewCell.cs
- CounterSet.cs
- TextRangeEditLists.cs
- GenericsNotImplementedException.cs
- AppManager.cs
- MessageQueueException.cs
- ToolStripPanelCell.cs
- GridView.cs
- ToolStripLocationCancelEventArgs.cs
- FormViewUpdatedEventArgs.cs
- MetadataProperty.cs
- HyperLinkColumn.cs
- DefaultBinder.cs
- UrlPropertyAttribute.cs
- X509Certificate2Collection.cs
- WebPartTransformer.cs
- SystemDropShadowChrome.cs
- SecurityContext.cs
- DbProviderFactoriesConfigurationHandler.cs
- CodeParameterDeclarationExpression.cs
- StringOutput.cs
- MeasurementDCInfo.cs
- XmlAutoDetectWriter.cs
- CompensatableTransactionScopeActivity.cs
- WmpBitmapEncoder.cs
- SelfIssuedAuthRSACryptoProvider.cs
- XmlWrappingReader.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- CompleteWizardStep.cs
- PolygonHotSpot.cs