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;
 }
Example #8
0
 public AttributeStatement(CsType type)
 {
     this.type = type;
     parameters = new List<Expression>();
 }
Example #9
0
 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;
 }
Example #13
0
 public DictionaryType(CsType keyType, CsType valueType)
     : base("IDictionary", keyType, valueType)
 {
 }
 public void AddGenericArgument(CsType argument)
 {
     genericArgumentTypes.Add(argument);
 }
Example #15
0
 public static CsType List(CsType type)
 {
     return new ListType(type);
 }
Example #16
0
 public NullableType(CsType genericArgumentType)
     : base("Nullable", genericArgumentType)
 {
     GenericArgumentType = genericArgumentType;
 }
Example #17
0
 public static ParameterStatement Param(string name, CsType type)
 {
     return new ParameterStatement(name, type);
 }
Example #18
0
 public void AddInterface(CsType type)
 {
     interfaces.Add(type);
 }
Example #19
0
 public ParameterStatement(string name, CsType type)
     : base(new ReferenceExpression(name), type)
 {
     attributes = new List<AttributeStatement>();
 }
Example #20
0
 public TypeOfExpression(CsType type)
 {
     this.type = type;
 }
Example #21
0
 public ListType(CsType genericArgumentType)
     : base("IList", genericArgumentType)
 {
 }
Example #22
0
 public static TypeOfExpression TypeOf(CsType type)
 {
     return new TypeOfExpression(type);
 }
 public static ClassStatement Implements(this ClassStatement classStatement, CsType interfaceType)
 {
     classStatement.AddInterface(interfaceType);
     return classStatement;
 }
Example #24
0
 public static DefaultExpression Default(CsType type)
 {
     return new DefaultExpression(type);
 }
Example #25
0
 public IEnumerableType(CsType genericArgumentType)
     : base("IEnumerable", genericArgumentType)
 {
 }
Example #26
0
 public static CsType Dictionary(CsType keyType, CsType valueType)
 {
     return new DictionaryType(keyType, valueType);
 }
Example #27
0
 public NewExpression(CsType type)
 {
     this.type = type;
     parameters = new List<Expression>();
     initializer = new CollectionInitializerExpression();
 }
Example #28
0
 public static GenericType IEnumerableOf(CsType argumentType)
 {
     return new IEnumerableType(argumentType);
 }
 public DeclarationStatement(ReferenceExpression name, CsType type)
 {
     declaredVar = name;
     Type = type;
 }
Example #30
0
 public DefaultExpression(CsType type)
 {
     this.type = type;
 }