Пример #1
0
 public MethodCallExpression(string name, CsType csType)
 {
     this.name = name;
     this.caller = csType;
     IsStaticMethodCall = true;
     parameters = new List<Expression>();
     genericArgumentTypes = new List<CsType>();
 }
Пример #2
0
        public ConstructorStatement(CsType type, BlockStatement block)
        {
            AccessModifier = AccessModifier.Public;

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