You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@ -1 +0,0 @@
|
||||
45248a8b9c9d64780305e4889e69523825a5c1ed
|
@ -40,120 +40,21 @@ using System.Text;
|
||||
|
||||
namespace System.Reflection.Emit
|
||||
{
|
||||
internal enum TypeKind : int {
|
||||
SZARRAY = 0x1d,
|
||||
ARRAY = 0x14
|
||||
}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
internal abstract class DerivedType : Type
|
||||
abstract partial class SymbolType
|
||||
{
|
||||
internal Type elementType;
|
||||
internal Type m_baseType;
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
internal static extern void create_unmanaged_type (Type type);
|
||||
static extern void create_unmanaged_type (Type type);
|
||||
|
||||
internal DerivedType (Type elementType)
|
||||
internal SymbolType (Type elementType)
|
||||
{
|
||||
this.elementType = elementType;
|
||||
this.m_baseType = elementType;
|
||||
}
|
||||
|
||||
internal abstract String FormatName (string elementName);
|
||||
|
||||
public override Type GetInterface (string name, bool ignoreCase)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override Type[] GetInterfaces ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override Type GetElementType ()
|
||||
{
|
||||
return elementType;
|
||||
}
|
||||
|
||||
public override EventInfo GetEvent (string name, BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override EventInfo[] GetEvents (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override FieldInfo GetField( string name, BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override FieldInfo[] GetFields (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override MemberInfo[] GetMembers (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override MethodInfo GetMethodImpl (string name, BindingFlags bindingAttr, Binder binder,
|
||||
CallingConventions callConvention, Type[] types,
|
||||
ParameterModifier[] modifiers)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override MethodInfo[] GetMethods (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override Type GetNestedType (string name, BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override Type[] GetNestedTypes (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override PropertyInfo[] GetProperties (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override PropertyInfo GetPropertyImpl (string name, BindingFlags bindingAttr, Binder binder,
|
||||
Type returnType, Type[] types, ParameterModifier[] modifiers)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override ConstructorInfo GetConstructorImpl (BindingFlags bindingAttr,
|
||||
Binder binder,
|
||||
CallingConventions callConvention,
|
||||
Type[] types,
|
||||
ParameterModifier[] modifiers)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
|
||||
protected override TypeAttributes GetAttributeFlagsImpl ()
|
||||
{
|
||||
/*LAMEIMPL MS just return the elementType.Attributes*/
|
||||
return elementType.Attributes;
|
||||
}
|
||||
|
||||
protected override bool HasElementTypeImpl ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool IsArrayImpl ()
|
||||
{
|
||||
return false;
|
||||
@ -164,60 +65,11 @@ namespace System.Reflection.Emit
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override bool IsCOMObjectImpl ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override bool IsPointerImpl ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override bool IsPrimitiveImpl ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override ConstructorInfo[] GetConstructors (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override object InvokeMember (string name, BindingFlags invokeAttr,
|
||||
Binder binder, object target, object[] args,
|
||||
ParameterModifier[] modifiers,
|
||||
CultureInfo culture, string[] namedParameters)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override InterfaceMapping GetInterfaceMap (Type interfaceType)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override bool IsInstanceOfType (object o)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool IsAssignableFrom (Type c)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool ContainsGenericParameters {
|
||||
get { return elementType.ContainsGenericParameters; }
|
||||
}
|
||||
|
||||
//FIXME this should be handled by System.Type
|
||||
public override Type MakeGenericType (params Type[] typeArguments)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override Type MakeArrayType ()
|
||||
{
|
||||
return new ArrayType (this, 0);
|
||||
@ -242,59 +94,31 @@ namespace System.Reflection.Emit
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return FormatName (elementType.ToString ());
|
||||
}
|
||||
|
||||
public override GenericParameterAttributes GenericParameterAttributes {
|
||||
get { throw new NotSupportedException (); }
|
||||
}
|
||||
|
||||
public override StructLayoutAttribute StructLayoutAttribute {
|
||||
get { throw new NotSupportedException (); }
|
||||
}
|
||||
|
||||
public override Assembly Assembly {
|
||||
get { return elementType.Assembly; }
|
||||
return FormatName (m_baseType.ToString ());
|
||||
}
|
||||
|
||||
public override string AssemblyQualifiedName {
|
||||
get {
|
||||
string fullName = FormatName (elementType.FullName);
|
||||
string fullName = FormatName (m_baseType.FullName);
|
||||
if (fullName == null)
|
||||
return null;
|
||||
return fullName + ", " + elementType.Assembly.FullName;
|
||||
return fullName + ", " + m_baseType.Assembly.FullName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override string FullName {
|
||||
get {
|
||||
return FormatName (elementType.FullName);
|
||||
return FormatName (m_baseType.FullName);
|
||||
}
|
||||
}
|
||||
|
||||
public override string Name {
|
||||
get {
|
||||
return FormatName (elementType.Name);
|
||||
return FormatName (m_baseType.Name);
|
||||
}
|
||||
}
|
||||
|
||||
public override Guid GUID {
|
||||
get { throw new NotSupportedException (); }
|
||||
}
|
||||
|
||||
public override Module Module {
|
||||
get { return elementType.Module; }
|
||||
}
|
||||
|
||||
public override string Namespace {
|
||||
get { return elementType.Namespace; }
|
||||
}
|
||||
|
||||
public override RuntimeTypeHandle TypeHandle {
|
||||
get { throw new NotSupportedException (); }
|
||||
}
|
||||
|
||||
public override Type UnderlyingSystemType {
|
||||
get {
|
||||
create_unmanaged_type (this);
|
||||
@ -302,31 +126,15 @@ namespace System.Reflection.Emit
|
||||
}
|
||||
}
|
||||
|
||||
//MemberInfo
|
||||
public override bool IsDefined (Type attributeType, bool inherit)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override object [] GetCustomAttributes (bool inherit)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override object [] GetCustomAttributes (Type attributeType, bool inherit)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
internal override bool IsUserType {
|
||||
get {
|
||||
return elementType.IsUserType;
|
||||
return m_baseType.IsUserType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
internal class ArrayType : DerivedType
|
||||
internal class ArrayType : SymbolType
|
||||
{
|
||||
int rank;
|
||||
|
||||
@ -342,7 +150,7 @@ namespace System.Reflection.Emit
|
||||
|
||||
internal override Type InternalResolve ()
|
||||
{
|
||||
Type et = elementType.InternalResolve ();
|
||||
Type et = m_baseType.InternalResolve ();
|
||||
if (rank == 0)
|
||||
return et.MakeArrayType ();
|
||||
return et.MakeArrayType (rank);
|
||||
@ -358,15 +166,6 @@ namespace System.Reflection.Emit
|
||||
return (rank == 0) ? 1 : rank;
|
||||
}
|
||||
|
||||
public override Type BaseType {
|
||||
get { return typeof (System.Array); }
|
||||
}
|
||||
|
||||
protected override TypeAttributes GetAttributeFlagsImpl ()
|
||||
{
|
||||
return elementType.Attributes;
|
||||
}
|
||||
|
||||
internal override String FormatName (string elementName)
|
||||
{
|
||||
if (elementName == null)
|
||||
@ -383,7 +182,7 @@ namespace System.Reflection.Emit
|
||||
}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
internal class ByRefType : DerivedType
|
||||
internal class ByRefType : SymbolType
|
||||
{
|
||||
internal ByRefType (Type elementType) : base (elementType)
|
||||
{
|
||||
@ -391,7 +190,7 @@ namespace System.Reflection.Emit
|
||||
|
||||
internal override Type InternalResolve ()
|
||||
{
|
||||
return elementType.InternalResolve ().MakeByRefType ();
|
||||
return m_baseType.InternalResolve ().MakeByRefType ();
|
||||
}
|
||||
|
||||
protected override bool IsByRefImpl ()
|
||||
@ -399,10 +198,6 @@ namespace System.Reflection.Emit
|
||||
return true;
|
||||
}
|
||||
|
||||
public override Type BaseType {
|
||||
get { return typeof (Array); }
|
||||
}
|
||||
|
||||
internal override String FormatName (string elementName)
|
||||
{
|
||||
if (elementName == null)
|
||||
@ -432,7 +227,7 @@ namespace System.Reflection.Emit
|
||||
}
|
||||
|
||||
[StructLayout (LayoutKind.Sequential)]
|
||||
internal class PointerType : DerivedType
|
||||
internal class PointerType : SymbolType
|
||||
{
|
||||
internal PointerType (Type elementType) : base (elementType)
|
||||
{
|
||||
@ -440,7 +235,7 @@ namespace System.Reflection.Emit
|
||||
|
||||
internal override Type InternalResolve ()
|
||||
{
|
||||
return elementType.InternalResolve ().MakePointerType ();
|
||||
return m_baseType.InternalResolve ().MakePointerType ();
|
||||
}
|
||||
|
||||
protected override bool IsPointerImpl ()
|
||||
@ -448,10 +243,6 @@ namespace System.Reflection.Emit
|
||||
return true;
|
||||
}
|
||||
|
||||
public override Type BaseType {
|
||||
get { return typeof(Array); }
|
||||
}
|
||||
|
||||
internal override String FormatName (string elementName)
|
||||
{
|
||||
if (elementName == null)
|
||||
|
@ -283,6 +283,12 @@ namespace System.Reflection.Emit
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override ParameterInfo ReturnParameter {
|
||||
get {
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
public override ICustomAttributeProvider ReturnTypeCustomAttributes {
|
||||
get {
|
||||
throw new NotSupportedException ();
|
||||
|
Reference in New Issue
Block a user