public MethodCallExpression(string name, CsType csType) { this.name = name; this.caller = csType; IsStaticMethodCall = true; parameters = new List<Expression>(); genericArgumentTypes = new List<CsType>(); }
public ConstructorStatement(CsType type, BlockStatement block) { AccessModifier = AccessModifier.Public; this.type = type; body = block; parameterList = new ParameterListStatement(); baseParameters = new List<Expression>(); }
public static CastExpression CastTo(this Expression expression, CsType type) { return new CastExpression(expression, type); }
public static DeclarationStatement OfType(this DeclarationStatement declarationStatement, CsType type) { declarationStatement.Type = type; return declarationStatement; }
public static ConstructorStatement Param(this ConstructorStatement constructorStatement, string name, CsType type) { constructorStatement.AddParam(new ParameterStatement(name, type)); return constructorStatement; }
public static ClassStatement Inherits(this ClassStatement classStatement, CsType baseType) { classStatement.Base = baseType; return classStatement; }
public static FieldStatement OfType(this FieldStatement fieldStatement, CsType type) { fieldStatement.FieldType = type; return fieldStatement; }
public AttributeStatement(CsType type) { this.type = type; parameters = new List<Expression>(); }
public CastExpression(Expression castedExpression, CsType type) { this.castedExpression = castedExpression; this.type = type; }
public static MethodStatement Param(this MethodStatement methodStatement, string name, CsType type) { methodStatement.AddParam(new ParameterStatement(name, type)); return methodStatement; }
public static MethodStatement OfType(this MethodStatement methodStatement, CsType type) { methodStatement.ReturnType = type; return methodStatement; }
public static PropertyStatement OfType(this PropertyStatement propertyStatement, CsType type) { propertyStatement.ReturnType = type; return propertyStatement; }
public DictionaryType(CsType keyType, CsType valueType) : base("IDictionary", keyType, valueType) { }
public void AddGenericArgument(CsType argument) { genericArgumentTypes.Add(argument); }
public static CsType List(CsType type) { return new ListType(type); }
public NullableType(CsType genericArgumentType) : base("Nullable", genericArgumentType) { GenericArgumentType = genericArgumentType; }
public static ParameterStatement Param(string name, CsType type) { return new ParameterStatement(name, type); }
public void AddInterface(CsType type) { interfaces.Add(type); }
public ParameterStatement(string name, CsType type) : base(new ReferenceExpression(name), type) { attributes = new List<AttributeStatement>(); }
public TypeOfExpression(CsType type) { this.type = type; }
public ListType(CsType genericArgumentType) : base("IList", genericArgumentType) { }
public static TypeOfExpression TypeOf(CsType type) { return new TypeOfExpression(type); }
public static ClassStatement Implements(this ClassStatement classStatement, CsType interfaceType) { classStatement.AddInterface(interfaceType); return classStatement; }
public static DefaultExpression Default(CsType type) { return new DefaultExpression(type); }
public IEnumerableType(CsType genericArgumentType) : base("IEnumerable", genericArgumentType) { }
public static CsType Dictionary(CsType keyType, CsType valueType) { return new DictionaryType(keyType, valueType); }
public NewExpression(CsType type) { this.type = type; parameters = new List<Expression>(); initializer = new CollectionInitializerExpression(); }
public static GenericType IEnumerableOf(CsType argumentType) { return new IEnumerableType(argumentType); }
public DeclarationStatement(ReferenceExpression name, CsType type) { declaredVar = name; Type = type; }
public DefaultExpression(CsType type) { this.type = type; }