public CodeParameterDeclarationExpression AddParameter(Type type, string name)
 {
     return(AddParameter(Easy.TypeRef(type), name));
 }
 /// <summary>
 /// Declares a local variable.
 /// </summary>
 public CodeVariableDeclarationStatement DeclareVariable(Type type, string name)
 {
     return(DeclareVariable(Easy.TypeRef(type), name));
 }
 /// <summary>
 /// Adds a method with return type <paramref name="type"/> and attributes=Public|Final to this type.
 /// </summary>
 public static EasyMethod AddMethod(this CodeTypeDeclaration typeDecl, Type type, string name)
 {
     return(AddMethod(typeDecl, Easy.TypeRef(type), name));
 }
 public static CodeAttributeDeclaration AddAttribute(this CodeTypeMember typeMember, CodeTypeReference type, params CodeExpression[] arguments)
 {
     return(Easy.AddAttribute(typeMember.CustomAttributes, type, arguments));
 }
 public static CodeMemberField AddField(this CodeTypeDeclaration typeDecl, Type type, string name)
 {
     return(typeDecl.AddField(Easy.TypeRef(type), name));
 }
 public static EasyProperty AddProperty(this CodeTypeDeclaration typeDecl, Type type, string name)
 {
     return(AddProperty(typeDecl, Easy.TypeRef(type), name));
 }
Exemplo n.º 7
0
 public CodeAttributeDeclaration AddAttribute(Type type, params CodeExpression[] arguments)
 {
     return(Easy.AddAttribute(this.CustomAttributes, Easy.TypeRef(type), arguments));
 }
 public static CodeCastExpression CastTo(this CodeExpression expr, Type type)
 {
     return(expr.CastTo(Easy.TypeRef(type)));
 }
Exemplo n.º 9
0
 /// <summary>
 /// Adds a method with return type <paramref name="type"/> and attributes=Public|Final to this type.
 /// </summary>
 public EasyMethod AddMethod(Type type, string name)
 {
     return(AddMethod(Easy.TypeRef(type), name));
 }
Exemplo n.º 10
0
 /// <summary>
 /// Adds a method with return type <c>void</c> and attributes=Public|Final to this type.
 /// </summary>
 public EasyMethod AddMethod(string name)
 {
     return(AddMethod(Easy.TypeRef(typeof(void)), name));
 }
Exemplo n.º 11
0
 public EasyProperty AddProperty(Type type, string name)
 {
     return(AddProperty(Easy.TypeRef(type), name));
 }
Exemplo n.º 12
0
 public EasyField AddField(Type type, string name)
 {
     return(AddField(Easy.TypeRef(type), name));
 }
Exemplo n.º 13
0
 public EasyExpression CastTo(Type type)
 {
     return(CastTo(Easy.TypeRef(type)));
 }