internal ConstantDeclaration( string name, Declaration declaringType, Type t, SnippetExpression expression ) :base(name,declaringType) { if (t==null) throw new ArgumentNullException("t"); if (expression == null) throw new ArgumentNullException("t"); this.type = t; this.expression = expression; }
internal ConstantDeclaration( string name, Declaration declaringType, Type t, SnippetExpression expression ) : base(name, declaringType) { if (t == null) { throw new ArgumentNullException("t"); } if (expression == null) { throw new ArgumentNullException("t"); } this.type = t; this.expression = expression; }
public ConstantDeclaration AddConstant(Type type, string name, SnippetExpression expression) { if (type == null) { throw new ArgumentNullException("type"); } if (name == null) { throw new ArgumentNullException("name"); } if (expression == null) { throw new ArgumentNullException("expression"); } if (this.constants.Contains(name)) { throw new ArgumentException("field already existing in class"); } ConstantDeclaration c = new ConstantDeclaration(this.Conformer.ToCamel(name), this, type, expression); this.constants.Add(c); return(c); }
public ConstantDeclaration AddConstant(Type type, string name,SnippetExpression expression) { if (type==null) throw new ArgumentNullException("type"); if (name==null) throw new ArgumentNullException("name"); if (expression==null) throw new ArgumentNullException("expression"); if (this.constants.Contains(name)) throw new ArgumentException("field already existing in class"); ConstantDeclaration c = new ConstantDeclaration(this.Conformer.ToCamel(name),this,type,expression); this.constants.Add(c); return c; }