public Property(Visibility visibility, String name, bool @static, bool @virtual, bool @abstract, bool overrided, string returnType, bool getter, bool setter) : base(visibility, name, @static, @virtual, @abstract, overrided, returnType) { Getter = getter; Setter = setter; }
// Fields there is only on Classes or Structs public override void VisitFieldDeclaration(FieldDeclaration fd) { ClassesAndStructs cs = (ClassesAndStructs)GetDeclarationFor(fd); string name = fd.Variables.Single().Name; string returnType = fd.ReturnType.ToString(); Visibility v = new Visibility(VisibilityMapper.Map(fd.Modifiers)); if (al.CheckFlag(fd.Modifiers, Modifiers.Const)) { Constant cf = new Constant(v, name, returnType, fd.Variables.Single().Initializer.ToString()); cs.ConstantFields.Add(cf); } else { Field f = new Field(v, name, al.CheckFlag(fd.Modifiers, Modifiers.Static), al.CheckFlag(fd.Modifiers, Modifiers.Readonly), returnType ); cs.Fields.Add(f); } AddToNotDefaultReferencedTypes(cs, returnType); // call base to forward execution base.VisitFieldDeclaration(fd); }
public Field(Visibility visibility, String name, bool @static, bool @readonly, string returnType) : base(visibility, name) { Static = @static; Readonly = @readonly; ReturnType = returnType; }
public Method(Visibility visibility, String name, bool @static, bool @virtual, bool @abstract, bool overrided, string returnType, bool ctor, ICollection<KeyValuePair<string, string>> arguments) : base(visibility, name, @static, @virtual, @abstract, overrided, returnType) { Ctor = ctor; if (arguments != null && arguments.Count > 0) Arguments = arguments; }
public Constant(Visibility visibility, string name, string returnType, string initialValue) { ParameterValidator.ThrowIfArgumentNullOrEmpty("name", name); ParameterValidator.ThrowIfArgumentNullOrEmpty("returnType", returnType); ParameterValidator.ThrowIfArgumentNullOrEmpty("initialValue", initialValue); Visibility = visibility; Name = name; ReturnType = returnType; InitialValue = initialValue; }