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