// // Mono.ILASM.PropertyDef // // Author(s): // Jackson Harper (Jackson@LatitudeGeo.com) // // (C) 2003 Jackson Harper, All right reserved // using System; using System.Collections; namespace Mono.ILASM { public class PropertyDef : ICustomAttrTarget { private FeatureAttr attr; private string name; private BaseTypeRef type; private ArrayList arg_list; private PEAPI.Property prop_def; private bool is_resolved; private ArrayList customattr_list; private MethodRef _get; private MethodRef _set; private MethodRef other; private PEAPI.Constant init_value; public PropertyDef (FeatureAttr attr, BaseTypeRef type, string name, ArrayList arg_list) { this.attr = attr; this.name = name; this.type = type; this.arg_list = arg_list; is_resolved = false; } public void AddCustomAttribute (CustomAttr customattr) { if (customattr_list == null) customattr_list = new ArrayList (); customattr_list.Add (customattr); } public PEAPI.Property Resolve (CodeGen code_gen, PEAPI.ClassDef classdef) { if (is_resolved) return prop_def; PEAPI.Type[] type_list = new PEAPI.Type[arg_list.Count]; for (int i=0; i