private void InitializeCtors() { if (ctors_initted) { return; } if (Parent != null) { Parent.InitializeCtors(); } var valid_ctors = new List <Ctor>(); clash_map = new Dictionary <string, Ctor>(); foreach (Ctor ctor in ctors) { if (nameConstructors) { ctor.IsStatic = true; if (Parent != null && Parent.HasStaticCtor(ctor.StaticName)) { ctor.Modifiers = "new "; } } else if (clash_map.ContainsKey(ctor.Signature.Types)) { Ctor clash = clash_map [ctor.Signature.Types]; Ctor alter = ctor.Preferred ? clash : ctor; alter.IsStatic = true; if (Parent != null && Parent.HasStaticCtor(alter.StaticName)) { alter.Modifiers = "new "; } } else { clash_map [ctor.Signature.Types] = ctor; } valid_ctors.Add(ctor); } ctors = valid_ctors; ctors_initted = true; }
private void InitializeCtors() { if (ctors_initted) { return; } if (Parent != null) { Parent.InitializeCtors(); } ArrayList valid_ctors = new ArrayList(); clash_map = new Hashtable(); foreach (Ctor ctor in ctors) { if (clash_map.Contains(ctor.Signature.Types)) { Ctor clash = clash_map [ctor.Signature.Types] as Ctor; Ctor alter = ctor.Preferred ? clash : ctor; alter.IsStatic = true; if (Parent != null && Parent.HasStaticCtor(alter.StaticName)) { alter.Modifiers = "new "; } } else { clash_map [ctor.Signature.Types] = ctor; } valid_ctors.Add(ctor); } ctors = valid_ctors; ctors_initted = true; }