Exemplo n.º 1
0
 public CodeParameterDeclarationExpression AddParameter(Type type, string name)
 {
     return(AddParameter(Easy.TypeRef(type), name));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Declares a local variable.
 /// </summary>
 public CodeVariableDeclarationStatement DeclareVariable(Type type, string name)
 {
     return(DeclareVariable(Easy.TypeRef(type), name));
 }
Exemplo n.º 3
0
 public static CodeAttributeDeclaration AddAttribute(this CodeTypeMember typeMember, Type type, params CodeExpression[] arguments)
 {
     return(Easy.AddAttribute(typeMember.CustomAttributes, Easy.TypeRef(type), arguments));
 }
Exemplo n.º 4
0
 /// <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));
 }
Exemplo n.º 5
0
 public static EasyProperty AddProperty(this CodeTypeDeclaration typeDecl, Type type, string name)
 {
     return(AddProperty(typeDecl, Easy.TypeRef(type), name));
 }
Exemplo n.º 6
0
 public static CodeMemberField AddField(this CodeTypeDeclaration typeDecl, Type type, string name)
 {
     return(typeDecl.AddField(Easy.TypeRef(type), name));
 }
Exemplo n.º 7
0
 public static CodeCastExpression CastTo(this CodeExpression expr, Type type)
 {
     return(expr.CastTo(Easy.TypeRef(type)));
 }