C# 클래스 Mono.CSharp.Constant

Base class for constants and literals.
상속: Mono.CSharp.Expression
파일 보기 프로젝트 열기: vargaz/mono 1 사용 예제들

공개 메소드들

메소드 설명
Clone ( CloneContext clonectx ) : Mono.CSharp.Expression
ContainsEmitWithAwait ( ) : bool
ConvertExplicitly ( bool in_checked_context, System.TypeSpec target_type ) : Constant

Maybe ConvertTo name is better. It tries to convert `this' constant to target_type. It throws OverflowException

ConvertImplicitly ( System.TypeSpec type ) : Constant
CreateConstantFromValue ( System.TypeSpec t, object v, Mono.CSharp.Location loc ) : Constant
CreateExpressionTree ( ResolveContext ec ) : Mono.CSharp.Expression
EmitSideEffect ( EmitContext ec ) : void
Error_ValueCannotBeConverted ( ResolveContext ec, System.TypeSpec target, bool expl ) : void
ExtractConstantFromValue ( System.TypeSpec t, object v, Mono.CSharp.Location loc ) : Constant
GetTypedValue ( ) : object
GetValue ( ) : object

This is used to obtain the actual value of the literal cast into an object.

GetValueAsLiteral ( ) : string
GetValueAsLong ( ) : long
ImplicitConversionRequired ( ResolveContext ec, System.TypeSpec type ) : Constant
IsDefaultInitializer ( System.TypeSpec type ) : bool

Need to pass type as the constant can require a boxing and in such case no optimization is possible

MakeExpression ( BuilderContext ctx ) : System.Linq.Expressions.Expression
Reduce ( ResolveContext ec, System.TypeSpec target_type ) : Constant
Resolve ( ResolveContext rc ) : bool
ToString ( ) : string
TryReduce ( ResolveContext rc, System.TypeSpec targetType ) : Constant

보호된 메소드들

메소드 설명
CloneTo ( CloneContext clonectx, Mono.CSharp.Expression target ) : void
Constant ( Mono.CSharp.Location loc ) : System
DoResolve ( ResolveContext rc ) : Mono.CSharp.Expression

비공개 메소드들

메소드 설명
ChangeType ( object value, System.TypeSpec targetType, bool &error ) : object
TryReduceConstant ( ResolveContext ec, System.TypeSpec target_type ) : Constant

메소드 상세

Clone() 공개 최종 메소드

public final Clone ( CloneContext clonectx ) : Mono.CSharp.Expression
clonectx CloneContext
리턴 Mono.CSharp.Expression

CloneTo() 보호된 메소드

protected CloneTo ( CloneContext clonectx, Mono.CSharp.Expression target ) : void
clonectx CloneContext
target Mono.CSharp.Expression
리턴 void

Constant() 보호된 메소드

protected Constant ( Mono.CSharp.Location loc ) : System
loc Mono.CSharp.Location
리턴 System

ContainsEmitWithAwait() 공개 메소드

public ContainsEmitWithAwait ( ) : bool
리턴 bool

ConvertExplicitly() 공개 추상적인 메소드

Maybe ConvertTo name is better. It tries to convert `this' constant to target_type. It throws OverflowException
public abstract ConvertExplicitly ( bool in_checked_context, System.TypeSpec target_type ) : Constant
in_checked_context bool
target_type System.TypeSpec
리턴 Constant

ConvertImplicitly() 공개 메소드

public ConvertImplicitly ( System.TypeSpec type ) : Constant
type System.TypeSpec
리턴 Constant

CreateConstantFromValue() 공개 정적인 메소드

public static CreateConstantFromValue ( System.TypeSpec t, object v, Mono.CSharp.Location loc ) : Constant
t System.TypeSpec
v object
loc Mono.CSharp.Location
리턴 Constant

CreateExpressionTree() 공개 메소드

public CreateExpressionTree ( ResolveContext ec ) : Mono.CSharp.Expression
ec ResolveContext
리턴 Mono.CSharp.Expression

DoResolve() 보호된 메소드

protected DoResolve ( ResolveContext rc ) : Mono.CSharp.Expression
rc ResolveContext
리턴 Mono.CSharp.Expression

EmitSideEffect() 공개 메소드

public EmitSideEffect ( EmitContext ec ) : void
ec EmitContext
리턴 void

Error_ValueCannotBeConverted() 공개 메소드

public Error_ValueCannotBeConverted ( ResolveContext ec, System.TypeSpec target, bool expl ) : void
ec ResolveContext
target System.TypeSpec
expl bool
리턴 void

ExtractConstantFromValue() 공개 정적인 메소드

public static ExtractConstantFromValue ( System.TypeSpec t, object v, Mono.CSharp.Location loc ) : Constant
t System.TypeSpec
v object
loc Mono.CSharp.Location
리턴 Constant

GetTypedValue() 공개 메소드

public GetTypedValue ( ) : object
리턴 object

GetValue() 공개 추상적인 메소드

This is used to obtain the actual value of the literal cast into an object.
public abstract GetValue ( ) : object
리턴 object

GetValueAsLiteral() 공개 추상적인 메소드

public abstract GetValueAsLiteral ( ) : string
리턴 string

GetValueAsLong() 공개 추상적인 메소드

public abstract GetValueAsLong ( ) : long
리턴 long

ImplicitConversionRequired() 공개 메소드

public ImplicitConversionRequired ( ResolveContext ec, System.TypeSpec type ) : Constant
ec ResolveContext
type System.TypeSpec
리턴 Constant

IsDefaultInitializer() 공개 메소드

Need to pass type as the constant can require a boxing and in such case no optimization is possible
public IsDefaultInitializer ( System.TypeSpec type ) : bool
type System.TypeSpec
리턴 bool

MakeExpression() 공개 메소드

public MakeExpression ( BuilderContext ctx ) : System.Linq.Expressions.Expression
ctx BuilderContext
리턴 System.Linq.Expressions.Expression

Reduce() 공개 메소드

public Reduce ( ResolveContext ec, System.TypeSpec target_type ) : Constant
ec ResolveContext
target_type System.TypeSpec
리턴 Constant

Resolve() 공개 메소드

public Resolve ( ResolveContext rc ) : bool
rc ResolveContext
리턴 bool

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

TryReduce() 공개 메소드

public TryReduce ( ResolveContext rc, System.TypeSpec targetType ) : Constant
rc ResolveContext
targetType System.TypeSpec
리턴 Constant