Ejemplo n.º 1
0
 //
 // These are expressions that represent some of the internal data types, used
 // elsewhere
 //
 public static void InitExpressionTypes()
 {
     system_object_expr  = new TypeLookupExpression (object_type);
     system_string_expr  = new TypeLookupExpression (string_type);
     system_boolean_expr = new TypeLookupExpression (bool_type);
     system_decimal_expr = new TypeLookupExpression (decimal_type);
     system_single_expr  = new TypeLookupExpression (float_type);
     system_double_expr  = new TypeLookupExpression (double_type);
     system_sbyte_expr   = new TypeLookupExpression (sbyte_type);
     system_byte_expr    = new TypeLookupExpression (byte_type);
     system_int16_expr   = new TypeLookupExpression (short_type);
     system_uint16_expr  = new TypeLookupExpression (ushort_type);
     system_int32_expr   = new TypeLookupExpression (int32_type);
     system_uint32_expr  = new TypeLookupExpression (uint32_type);
     system_int64_expr   = new TypeLookupExpression (int64_type);
     system_uint64_expr  = new TypeLookupExpression (uint64_type);
     system_char_expr    = new TypeLookupExpression (char_type);
     system_void_expr    = new TypeLookupExpression (void_type);
     system_valuetype_expr  = new TypeLookupExpression (value_type);
 }
Ejemplo n.º 2
0
		void Define_Reset ()
		{
			Method reset = new Method (
				this, null, TypeManager.system_void_expr,
				Modifiers.PUBLIC | Modifiers.DEBUGGER_HIDDEN,
				new MemberName ("Reset", Location),
				Parameters.EmptyReadOnlyParameters, null);
			AddMethod (reset);

			reset.Block = new ToplevelBlock (Location);

			TypeExpr ex_type = new TypeLookupExpression ("System.NotSupportedException");
			reset.Block.AddStatement (new Throw (new New (ex_type, null, Location), Location));
		}