Move IReflect.cs to shared partition. (dotnet/coreclr#10415)
authorAtsushi Kanamori <AtsushiKan@users.noreply.github.com>
Thu, 23 Mar 2017 14:02:28 +0000 (07:02 -0700)
committerJan Kotas <jkotas@microsoft.com>
Thu, 23 Mar 2017 14:02:28 +0000 (07:02 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/8f485224cd9a5899e5f8e991f2db87cef5566b1b

src/coreclr/src/mscorlib/System.Private.CoreLib.csproj
src/coreclr/src/mscorlib/shared/System.Private.CoreLib.Shared.projitems
src/coreclr/src/mscorlib/shared/System/Reflection/IReflect.cs [moved from src/coreclr/src/mscorlib/src/System/Reflection/IReflect.cs with 58% similarity]

index 9ca26e5..ca6e4d1 100644 (file)
     <Compile Include="$(BclSourcesRoot)\System\Reflection\InterfaceMapping.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Reflection\InvalidFilterCriteriaException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Reflection\INVOCATION_FLAGS.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Reflection\IReflect.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Reflection\LoaderAllocator.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Reflection\LocalVariableInfo.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Reflection\ManifestResourceInfo.cs" />
index 174a99c..6d07579 100644 (file)
     <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\ConstructorInfo.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\EventInfo.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\FieldInfo.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\IReflect.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\MemberInfo.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\MethodInfo.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)System\Reflection\MethodBase.cs" />
@@ -2,81 +2,49 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////
-//
-// IReflect is an interface that defines a subset of the Type reflection methods.
-// 
-//    This interface is used to access and invoke members of a Type.  It can be either
-//    type based (like Type) or instance based (like Expando). This interface is used in 
-//    combination with IExpando to model the IDispatchEx expando capibilities in
-//    the interop layer. 
-//
-//
+using System.Globalization;
 
 namespace System.Reflection
 {
-    using System;
-    using System.Runtime.InteropServices;
-    using CultureInfo = System.Globalization.CultureInfo;
-
-    // Interface does not need to be marked with the serializable attribute
-    [Guid("AFBF15E5-C37C-11d2-B88E-00A0C9B471B8")]
     public interface IReflect
     {
         // Return the requested method if it is implemented by the Reflection object.  The
         // match is based upon the name and DescriptorInfo which describes the signature
         // of the method. 
-        MethodInfo GetMethod(String name, BindingFlags bindingAttr, Binder binder,
-                Type[] types, ParameterModifier[] modifiers);
+        MethodInfo GetMethod(string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers);
 
         // Return the requested method if it is implemented by the Reflection object.  The
         // match is based upon the name of the method.  If the object implementes multiple methods
         // with the same name an AmbiguousMatchException is thrown.
-        MethodInfo GetMethod(String name, BindingFlags bindingAttr);
+        MethodInfo GetMethod(string name, BindingFlags bindingAttr);
 
         MethodInfo[] GetMethods(BindingFlags bindingAttr);
 
         // Return the requestion field if it is implemented by the Reflection object.  The
         // match is based upon a name.  There cannot be more than a single field with
         // a name.
-        FieldInfo GetField(
-                String name,
-                BindingFlags bindingAttr);
+        FieldInfo GetField(string name, BindingFlags bindingAttr);
 
-        FieldInfo[] GetFields(
-                BindingFlags bindingAttr);
+        FieldInfo[] GetFields(BindingFlags bindingAttr);
 
         // Return the property based upon name.  If more than one property has the given
         // name an AmbiguousMatchException will be thrown.  Returns null if no property
         // is found.
-        PropertyInfo GetProperty(
-                String name,
-                BindingFlags bindingAttr);
+        PropertyInfo GetProperty(string name, BindingFlags bindingAttr);
 
         // Return the property based upon the name and Descriptor info describing the property
         // indexing.  Return null if no property is found.
-        PropertyInfo GetProperty(
-                String name,
-                BindingFlags bindingAttr,
-                Binder binder,
-                Type returnType,
-                Type[] types,
-                ParameterModifier[] modifiers);
+        PropertyInfo GetProperty(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers);
 
         // Returns an array of PropertyInfos for all the properties defined on 
         // the Reflection object.
-        PropertyInfo[] GetProperties(
-                BindingFlags bindingAttr);
+        PropertyInfo[] GetProperties(BindingFlags bindingAttr);
 
         // Return an array of members which match the passed in name.
-        MemberInfo[] GetMember(
-                String name,
-                BindingFlags bindingAttr);
+        MemberInfo[] GetMember(string name, BindingFlags bindingAttr);
 
         // Return an array of all of the members defined for this object.
-        MemberInfo[] GetMembers(
-                BindingFlags bindingAttr);
+        MemberInfo[] GetMembers(BindingFlags bindingAttr);
 
         // Description of the Binding Process.
         // We must invoke a method that is accessable and for which the provided
@@ -99,21 +67,10 @@ namespace System.Reflection
         // For the default binder, the most specific method will be selected.
         // 
         // This will invoke a specific member...
-        Object InvokeMember(
-                String name,
-                BindingFlags invokeAttr,
-                Binder binder,
-                Object target,
-                Object[] args,
-                ParameterModifier[] modifiers,
-                CultureInfo culture,
-                String[] namedParameters);
+        object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters);
 
         // Return the underlying Type that represents the IReflect Object.  For expando object,
         // this is the (Object) IReflectInstance.GetType().  For Type object it is this.
-        Type UnderlyingSystemType
-        {
-            get;
-        }
+        Type UnderlyingSystemType { get; }
     }
 }