private AssemblyTypeInfoGenerator.FieldInfo?GetFieldInfo(TypeDefinition type, FieldDefinition field, bool isDeclaringTypeGenericInstance, Dictionary <TypeReference, TypeReference> genericInstanceTypeMap) { AssemblyTypeInfoGenerator.FieldInfo?result; if (!this.WillSerialize(field)) { result = null; } else { AssemblyTypeInfoGenerator.FieldInfo value = default(AssemblyTypeInfoGenerator.FieldInfo); value.name = field.get_Name(); TypeReference type2; if (isDeclaringTypeGenericInstance) { type2 = this.ResolveGenericInstanceType(field.get_FieldType(), genericInstanceTypeMap); } else { type2 = field.get_FieldType(); } value.type = this.GetMonoEmbeddedFullTypeNameFor(type2); result = new AssemblyTypeInfoGenerator.FieldInfo?(value); } return(result); }
private AssemblyTypeInfoGenerator.FieldInfo?GetFieldInfo(TypeDefinition type, FieldDefinition field, bool isDeclaringTypeGenericInstance, Dictionary <TypeReference, TypeReference> genericInstanceTypeMap) { AssemblyTypeInfoGenerator.FieldInfo?result; if (!this.WillSerialize(field)) { result = null; } else { AssemblyTypeInfoGenerator.FieldInfo value = default(AssemblyTypeInfoGenerator.FieldInfo); value.name = field.Name; TypeReference type2; if (isDeclaringTypeGenericInstance) { type2 = this.ResolveGenericInstanceType(field.FieldType, genericInstanceTypeMap); } else { type2 = field.FieldType; } value.type = this.GetMonoEmbeddedFullTypeNameFor(type2); value.flags = AssemblyTypeInfoGenerator.FieldInfoFlags.None; CustomAttribute fixedBufferAttribute = AssemblyTypeInfoGenerator.GetFixedBufferAttribute(field); if (fixedBufferAttribute != null) { value.flags |= AssemblyTypeInfoGenerator.FieldInfoFlags.FixedBuffer; value.fixedBufferLength = AssemblyTypeInfoGenerator.GetFixedBufferLength(fixedBufferAttribute); value.fixedBufferTypename = AssemblyTypeInfoGenerator.GetFixedBufferTypename(fixedBufferAttribute); } result = new AssemblyTypeInfoGenerator.FieldInfo?(value); } return(result); }
private AssemblyTypeInfoGenerator.FieldInfo?GetFieldInfo(TypeDefinition type, FieldDefinition field, bool isDeclaringTypeGenericInstance, Dictionary <TypeReference, TypeReference> genericInstanceTypeMap) { if (!this.WillSerialize(field)) { return(new AssemblyTypeInfoGenerator.FieldInfo?()); } AssemblyTypeInfoGenerator.FieldInfo fieldInfo = new AssemblyTypeInfoGenerator.FieldInfo(); fieldInfo.name = ((MemberReference)field).get_Name(); TypeReference type1 = !isDeclaringTypeGenericInstance ? ((FieldReference)field).get_FieldType() : this.ResolveGenericInstanceType(((FieldReference)field).get_FieldType(), genericInstanceTypeMap); fieldInfo.type = this.GetMonoEmbeddedFullTypeNameFor(type1); return(new AssemblyTypeInfoGenerator.FieldInfo?(fieldInfo)); }
private AssemblyTypeInfoGenerator.FieldInfo? GetFieldInfo(TypeDefinition type, FieldDefinition field, bool isDeclaringTypeGenericInstance, Dictionary<TypeReference, TypeReference> genericInstanceTypeMap) { if (!this.WillSerialize(field)) return new AssemblyTypeInfoGenerator.FieldInfo?(); AssemblyTypeInfoGenerator.FieldInfo fieldInfo = new AssemblyTypeInfoGenerator.FieldInfo(); fieldInfo.name = ((MemberReference) field).get_Name(); TypeReference type1 = !isDeclaringTypeGenericInstance ? ((FieldReference) field).get_FieldType() : this.ResolveGenericInstanceType(((FieldReference) field).get_FieldType(), genericInstanceTypeMap); fieldInfo.type = this.GetMonoEmbeddedFullTypeNameFor(type1); return new AssemblyTypeInfoGenerator.FieldInfo?(fieldInfo); }