CallingConventions callConvention, Type[] types,
ParameterModifier[] modifiers)
{
+ check_created ();
+
if (ctors == null)
return null;
public Type CreateType() {
/* handle nesting_type */
- check_not_created ();
+ if (created != null)
+ return created;
// Fire TypeResolve events for fields whose type is an unfinished
// value type.
int nnamed = (int)data [pos++];
nnamed |= ((int)data [pos++]) << 8;
for (int i = 0; i < nnamed; ++i) {
- byte named_type = data [pos++];
+ //byte named_type = data [pos++];
+ pos ++;
byte type = data [pos++];
int len;
string named_name;
if (type == 0x55) {
len = CustomAttributeBuilder.decode_len (data, pos, out pos);
- string named_typename = CustomAttributeBuilder.string_from_bytes (data, pos, len);
+ //string named_typename =
+ CustomAttributeBuilder.string_from_bytes (data, pos, len);
pos += len;
// FIXME: Check that 'named_type' and 'named_typename' match, etc.
// See related code/FIXME in mono/mono/metadata/reflection.c
switch ((CharSet)value) {
case CharSet.None:
case CharSet.Ansi:
+ attrs &= ~(TypeAttributes.UnicodeClass | TypeAttributes.AutoClass);
break;
case CharSet.Unicode:
+ attrs &= ~TypeAttributes.AutoClass;
attrs |= TypeAttributes.UnicodeClass;
break;
case CharSet.Auto:
+ attrs &= ~TypeAttributes.UnicodeClass;
attrs |= TypeAttributes.AutoClass;
break;
default:
return base.IsSubclassOf (c);
}
+ [MonoTODO ("arrays")]
+ internal bool IsAssignableTo (Type c)
+ {
+ if (c == this)
+ return true;
+
+ if (c.IsInterface) {
+ if (interfaces == null)
+ return false;
+ foreach (Type t in interfaces)
+ if (c.IsAssignableFrom (t))
+ return true;
+ return false;
+ }
+
+ if (parent == null)
+ return c == typeof (object);
+ else
+ return c.IsAssignableFrom (parent);
+ }
+
#if NET_2_0 || BOOTSTRAP_NET_2_0
public bool IsCreated () {
return is_created;
}
}
- public GenericTypeParameterBuilder[] DefineGenericParameters (string[] names)
+ public GenericTypeParameterBuilder[] DefineGenericParameters (params string[] names)
{
setup_generic_class ();