Method | Description | |
---|---|---|
AddVariable ( IVariable variable ) : |
Adds a new variable or lambda parameter to the current block.
|
|
CSharpResolver ( ICSharpCode.NRefactory.CSharp.TypeSystem.CSharpTypeResolveContext context ) : System | ||
CSharpResolver ( ICompilation compilation ) : System | ||
CreateMemberLookup ( ) : ICSharpCode.NRefactory.CSharp.Resolver.MemberLookup |
Creates a MemberLookup instance using this resolver's settings.
|
|
CreateMemberLookup ( NameLookupMode lookupMode ) : ICSharpCode.NRefactory.CSharp.Resolver.MemberLookup |
Creates a MemberLookup instance using this resolver's settings.
|
|
GetDefaultValue ( IType type ) : object | ||
GetExtensionMethods ( IType targetType, string name = null, IList
|
Gets the extension methods that are called 'name' and are applicable with a first argument type of 'targetType'. The results are stored in nested lists because they are grouped by using scope. That is, for "using SomeExtensions; namespace X { using MoreExtensions; ... }", the return value will be new List { new List { all extensions from MoreExtensions }, new List { all extensions from SomeExtensions } } |
|
GetExtensionMethods ( string name = null, IList
|
Gets all extension methods that are available in the current context. The results are stored in nested lists because they are grouped by using scope. That is, for "using SomeExtensions; namespace X { using MoreExtensions; ... }", the return value will be new List { new List { all extensions from MoreExtensions }, new List { all extensions from SomeExtensions } } |
|
IsEligibleExtensionMethod ( IType targetType, IMethod method, bool useTypeInference, IType &outInferredTypes ) : bool |
Checks whether the specified extension method is eligible on the target type.
|
|
IsVariableReferenceWithSameType ( ResolveResult rr, string identifier, TypeResolveResult &trr ) : bool | ||
LookupSimpleNameOrTypeName ( string identifier, IList |
||
PopBlock ( ) : CSharpResolver |
Closes the current scope for local variables; removing all variables in that scope.
|
|
PopLastVariable ( ) : CSharpResolver |
Removes the variable that was just added.
|
|
PopObjectInitializer ( ) : CSharpResolver | ||
PushBlock ( ) : CSharpResolver |
Opens a new scope for local variables.
|
|
PushObjectInitializer ( ResolveResult initializedObject ) : CSharpResolver |
Pushes the type of the object that is currently being initialized.
|
|
ResolveAlias ( string identifier ) : ResolveResult |
Looks up an alias (identifier in front of :: operator)
|
|
ResolveArrayCreation ( IType elementType, ResolveResult sizeArguments, ResolveResult initializerElements = null ) : ArrayCreateResolveResult |
Resolves an array creation.
|
|
ResolveArrayCreation ( IType elementType, int sizeArguments, ResolveResult initializerElements = null ) : ArrayCreateResolveResult |
Resolves an array creation.
|
|
ResolveAssignment ( AssignmentOperatorType op, ResolveResult lhs, ResolveResult rhs ) : ResolveResult | ||
ResolveBaseReference ( ) : ResolveResult |
Resolves 'base'.
|
|
ResolveBinaryOperator ( BinaryOperatorType op, ResolveResult lhs, ResolveResult rhs ) : ResolveResult | ||
ResolveCast ( IType targetType, ResolveResult expression ) : ResolveResult | ||
ResolveCondition ( ResolveResult input ) : ResolveResult |
Converts the input to
|
|
ResolveConditionFalse ( ResolveResult input ) : ResolveResult |
Converts the negated input to
|
|
ResolveConditional ( ResolveResult condition, ResolveResult trueExpression, ResolveResult falseExpression ) : ResolveResult | ||
ResolveDefaultValue ( IType type ) : ResolveResult | ||
ResolveIdentifierInObjectInitializer ( string identifier ) : ResolveResult | ||
ResolveIndexer ( ResolveResult target, ResolveResult arguments, string argumentNames = null ) : ResolveResult |
Resolves an indexer access.
|
|
ResolveInvocation ( ResolveResult target, ResolveResult arguments, string argumentNames = null ) : ResolveResult |
Resolves an invocation.
|
|
ResolveMemberAccess ( ResolveResult target, string identifier, IList |
||
ResolveObjectCreation ( IType type, ResolveResult arguments, string argumentNames = null, bool allowProtectedAccess = false, IList |
Resolves an object creation.
|
|
ResolvePrimitive ( object value ) : ResolveResult | ||
ResolveSimpleName ( string identifier, IList |
||
ResolveSizeOf ( IType type ) : ResolveResult |
Resolves 'sizeof(type)'.
|
|
ResolveThisReference ( ) : ResolveResult |
Resolves 'this'.
|
|
ResolveTypeOf ( IType referencedType ) : ResolveResult | ||
ResolveUnaryOperator ( UnaryOperatorType op, ResolveResult expression ) : ResolveResult | ||
WithCheckForOverflow ( bool checkForOverflow ) : CSharpResolver |
Sets whether the current context is
|
|
WithCurrentMember ( IMember member ) : CSharpResolver |
Sets the current member definition. Don't forget to also set CurrentTypeDefinition when setting CurrentMember; setting one of the properties does not automatically set the other. |
|
WithCurrentTypeDefinition ( ITypeDefinition typeDefinition ) : CSharpResolver |
Sets the current type definition.
|
|
WithCurrentUsingScope ( ResolvedUsingScope usingScope ) : CSharpResolver |
Sets the current using scope that is used to look up identifiers as class names.
|
|
WithIsWithinLambdaExpression ( bool isWithinLambdaExpression ) : CSharpResolver |
Sets whether the resolver is currently within a lambda expression.
|
Method | Description | |
---|---|---|
AddArgumentNamesIfNecessary ( ResolveResult arguments, string argumentNames ) : IList |
||
AdjustArrayAccessArguments ( ResolveResult arguments ) : void |
Converts all arguments to int,uint,long or ulong.
|
|
BinaryNumericPromotion ( bool isNullable, ResolveResult &lhs, ResolveResult &rhs, bool allowNullableConstants ) : bool | ||
BinaryOperatorResolveResult ( IType resultType, ResolveResult lhs, BinaryOperatorType op, ResolveResult rhs, bool isLifted = false ) : ResolveResult | ||
CSharpPrimitiveCast ( TypeCode targetType, object input ) : object | ||
CSharpResolver ( ICompilation compilation, CSharpConversions conversions, ICSharpCode.NRefactory.CSharp.TypeSystem.CSharpTypeResolveContext context, bool checkForOverflow, bool isWithinLambdaExpression, TypeDefinitionCache currentTypeDefinitionCache, ImmutableStack |
||
CastTo ( TypeCode targetType, bool isNullable, ResolveResult expression, bool allowNullableConstants ) : ResolveResult | ||
Clone ( ) : |
||
Convert ( ResolveResult rr, IType targetType ) : ResolveResult | ||
Convert ( ResolveResult rr, IType targetType, Conversion c ) : ResolveResult | ||
CreateOverloadResolution ( ResolveResult arguments, string argumentNames = null, IType typeArguments = null ) : |
||
CreateParameters ( ResolveResult arguments, string argumentNames ) : List |
||
CreateResolveResultForUserDefinedOperator ( |
||
GetAllExtensionMethods ( ICSharpCode.NRefactory.CSharp.Resolver.MemberLookup lookup ) : IList
|
Gets all extension methods available in the current using scope. This list includes inaccessible methods.
|
|
GetEnumUnderlyingType ( IType enumType ) : IType | ||
GetExtensionMethods ( ICSharpCode.NRefactory.CSharp.Resolver.MemberLookup lookup, INamespace ns ) : IEnumerable |
||
GetOverloadableOperatorName ( BinaryOperatorType op ) : string | ||
GetOverloadableOperatorName ( UnaryOperatorType op ) : string | ||
GetUserDefinedOperatorCandidates ( IType type, string operatorName ) : IEnumerable |
||
GuessParameterName ( ResolveResult rr ) : string | ||
HandleEnumComparison ( BinaryOperatorType op, IType enumType, bool isNullable, ResolveResult lhs, ResolveResult rhs ) : ResolveResult |
Handle the case where an enum value is compared with another enum value bool operator op(E x, E y);
|
|
HandleEnumOperator ( bool isNullable, IType enumType, BinaryOperatorType op, ResolveResult lhs, ResolveResult rhs ) : ResolveResult |
Handle the following enum operators: E operator +(E x, U y); E operator +(U x, E y); E operator –(E x, U y); E operator &(E x, E y); E operator |(E x, E y); E operator ^(E x, E y);
|
|
HandleEnumSubtraction ( bool isNullable, IType enumType, ResolveResult lhs, ResolveResult rhs ) : ResolveResult |
Handle the case where an enum value is subtracted from another enum value U operator –(E x, E y);
|
|
HasType ( ResolveResult r ) : bool | ||
ITypeResolveContext ( IMember member ) : ITypeResolveContext | ||
ITypeResolveContext ( ITypeDefinition typeDefinition ) : ITypeResolveContext | ||
IsBetterConditionalConversion ( Conversion c1, Conversion c2 ) : bool | ||
IsComparisonOperator ( IMethod m ) : bool | ||
IsEligibleExtensionMethod ( ICompilation compilation, CSharpConversions conversions, IType targetType, IMethod method, bool useTypeInference, IType &outInferredTypes ) : bool | ||
IsNullableTypeOrNonValueType ( IType type ) : bool | ||
IsSigned ( TypeCode code, ResolveResult rr ) : bool | ||
LiftUserDefinedOperator ( IMethod m ) : LiftedUserDefinedOperator | ||
LiftUserDefinedOperators ( List |
||
LookInCurrentType ( string identifier, IList |
||
LookInCurrentUsingScope ( string identifier, IList |
||
LookInUsingScopeNamespace ( ResolvedUsingScope usingScope, INamespace n, string identifier, IList |
||
MakeNullable ( IType type, bool isNullable ) : IType | ||
MakeParameterName ( string variableName ) : string | ||
PointerArithmeticOperator ( IType resultType, IType inputType1, IType inputType2 ) : CSharpOperators.BinaryOperatorMethod | ||
PointerArithmeticOperator ( IType resultType, IType inputType1, KnownTypeCode inputType2 ) : CSharpOperators.BinaryOperatorMethod | ||
PointerArithmeticOperator ( IType resultType, KnownTypeCode inputType1, IType inputType2 ) : CSharpOperators.BinaryOperatorMethod | ||
ResolveExternAlias ( string alias ) : ResolveResult | ||
ResolveInvocation ( ResolveResult target, ResolveResult arguments, string argumentNames, bool allowOptionalParameters ) : ResolveResult | ||
ResolveMemberAccessOnNamespace ( NamespaceResolveResult nrr, string identifier, IList |
||
ResolveMemberType ( ResolveResult target, string identifier, IList |
||
ResolveNullCoalescingOperator ( ResolveResult lhs, ResolveResult rhs ) : ResolveResult | ||
TopLevelTypeDefinitionIsAccessible ( ITypeDefinition typeDef ) : bool | ||
TryConvert ( ResolveResult &rr, IType targetType ) : bool | ||
TryConvertEnum ( ResolveResult &rr, IType targetType, bool &isNullable, ResolveResult &enumRR, bool allowConversionFromConstantZero = true ) : bool |
|
|
UnaryNumericPromotion ( UnaryOperatorType op, IType &type, bool isNullable, ResolveResult expression ) : ResolveResult | ||
UnaryOperatorResolveResult ( IType resultType, UnaryOperatorType op, ResolveResult expression, bool isLifted = false ) : OperatorResolveResult | ||
WithContext ( CSharpTypeResolveContext newContext ) : CSharpResolver | ||
WithLocalVariableStack ( ImmutableStack |
||
WithObjectInitializerStack ( ObjectInitializerContext stack ) : CSharpResolver |
public AddVariable ( IVariable variable ) : |
||
variable | IVariable | |
return |
public CSharpResolver ( ICSharpCode.NRefactory.CSharp.TypeSystem.CSharpTypeResolveContext context ) : System | ||
context | ICSharpCode.NRefactory.CSharp.TypeSystem.CSharpTypeResolveContext | |
return | System |
public CSharpResolver ( ICompilation compilation ) : System | ||
compilation | ICompilation | |
return | System |
public CreateMemberLookup ( ) : ICSharpCode.NRefactory.CSharp.Resolver.MemberLookup | ||
return | ICSharpCode.NRefactory.CSharp.Resolver.MemberLookup |
public CreateMemberLookup ( NameLookupMode lookupMode ) : ICSharpCode.NRefactory.CSharp.Resolver.MemberLookup | ||
lookupMode | NameLookupMode | |
return | ICSharpCode.NRefactory.CSharp.Resolver.MemberLookup |
public static GetDefaultValue ( IType type ) : object | ||
type | IType | |
return | object |
public GetExtensionMethods ( IType targetType, string name = null, IList
|
||
targetType | IType | Type of the 'this' argument |
name | string | Name of the extension method. Pass null to retrieve all extension methods. |
typeArguments | IList |
Explicitly provided type arguments.
/// An empty list will return all matching extension method definitions;
/// a non-empty list will return |
substituteInferredTypes | bool |
/// Specifies whether to produce a |
return | List
|
public GetExtensionMethods ( string name = null, IList
|
||
name | string | Name of the extension method. Pass null to retrieve all extension methods. |
typeArguments | IList |
Explicitly provided type arguments.
/// An empty list will return all matching extension method definitions;
/// a non-empty list will return |
return | List
|
public static IsEligibleExtensionMethod ( IType targetType, IMethod method, bool useTypeInference, IType &outInferredTypes ) : bool | ||
targetType | IType | Target type that is passed as first argument to the extension method. |
method | IMethod | The extension method. |
useTypeInference | bool | Whether to perform type inference for the method.
/// Use |
outInferredTypes | IType | If the method is generic and |
return | bool |
public IsVariableReferenceWithSameType ( ResolveResult rr, string identifier, TypeResolveResult &trr ) : bool | ||
rr | ResolveResult | |
identifier | string | |
trr | TypeResolveResult | |
return | bool |
public LookupSimpleNameOrTypeName ( string identifier, IList |
||
identifier | string | |
typeArguments | IList |
|
lookupMode | NameLookupMode | |
return | ResolveResult |
public PopObjectInitializer ( ) : CSharpResolver | ||
return | CSharpResolver |
public PushObjectInitializer ( ResolveResult initializedObject ) : CSharpResolver | ||
initializedObject | ResolveResult | |
return | CSharpResolver |
public ResolveAlias ( string identifier ) : ResolveResult | ||
identifier | string | |
return | ResolveResult |
public ResolveArrayCreation ( IType elementType, ResolveResult sizeArguments, ResolveResult initializerElements = null ) : ArrayCreateResolveResult | ||
elementType | IType | /// The array element type. /// Pass null to resolve an implicitly-typed array creation. /// |
sizeArguments | ResolveResult |
/// The size arguments.
/// The length of this array will be used as the number of dimensions of the array type.
/// The resolver may mutate this array to wrap elements in |
initializerElements | ResolveResult |
/// The initializer elements. May be null if no array initializer was specified.
/// The resolver may mutate this array to wrap elements in |
return | ArrayCreateResolveResult |
public ResolveArrayCreation ( IType elementType, int sizeArguments, ResolveResult initializerElements = null ) : ArrayCreateResolveResult | ||
elementType | IType | /// The array element type. /// Pass null to resolve an implicitly-typed array creation. /// |
sizeArguments | int | /// The size arguments. /// The length of this array will be used as the number of dimensions of the array type. /// Negative values will be treated as errors. /// |
initializerElements | ResolveResult |
/// The initializer elements. May be null if no array initializer was specified.
/// The resolver may mutate this array to wrap elements in |
return | ArrayCreateResolveResult |
public ResolveAssignment ( AssignmentOperatorType op, ResolveResult lhs, ResolveResult rhs ) : ResolveResult | ||
op | AssignmentOperatorType | |
lhs | ResolveResult | |
rhs | ResolveResult | |
return | ResolveResult |
public ResolveBaseReference ( ) : ResolveResult | ||
return | ResolveResult |
public ResolveBinaryOperator ( BinaryOperatorType op, ResolveResult lhs, ResolveResult rhs ) : ResolveResult | ||
op | BinaryOperatorType | |
lhs | ResolveResult | |
rhs | ResolveResult | |
return | ResolveResult |
public ResolveCast ( IType targetType, ResolveResult expression ) : ResolveResult | ||
targetType | IType | |
expression | ResolveResult | |
return | ResolveResult |
public ResolveCondition ( ResolveResult input ) : ResolveResult | ||
input | ResolveResult | |
return | ResolveResult |
public ResolveConditionFalse ( ResolveResult input ) : ResolveResult | ||
input | ResolveResult | |
return | ResolveResult |
public ResolveConditional ( ResolveResult condition, ResolveResult trueExpression, ResolveResult falseExpression ) : ResolveResult | ||
condition | ResolveResult | |
trueExpression | ResolveResult | |
falseExpression | ResolveResult | |
return | ResolveResult |
public ResolveDefaultValue ( IType type ) : ResolveResult | ||
type | IType | |
return | ResolveResult |
public ResolveIdentifierInObjectInitializer ( string identifier ) : ResolveResult | ||
identifier | string | |
return | ResolveResult |
public ResolveIndexer ( ResolveResult target, ResolveResult arguments, string argumentNames = null ) : ResolveResult | ||
target | ResolveResult | Target expression. |
arguments | ResolveResult |
/// Arguments passed to the indexer.
/// The resolver may mutate this array to wrap elements in |
argumentNames | string | /// The argument names. Pass the null string for positional arguments. /// |
return | ResolveResult |
public ResolveInvocation ( ResolveResult target, ResolveResult arguments, string argumentNames = null ) : ResolveResult | ||
target | ResolveResult | The target of the invocation. Usually a MethodGroupResolveResult. |
arguments | ResolveResult |
/// Arguments passed to the method.
/// The resolver may mutate this array to wrap elements in |
argumentNames | string | /// The argument names. Pass the null string for positional arguments. /// |
return | ResolveResult |
public ResolveMemberAccess ( ResolveResult target, string identifier, IList |
||
target | ResolveResult | |
identifier | string | |
typeArguments | IList |
|
lookupMode | NameLookupMode | |
return | ResolveResult |
public ResolveObjectCreation ( IType type, ResolveResult arguments, string argumentNames = null, bool allowProtectedAccess = false, IList |
||
type | IType | Type of the object to create. |
arguments | ResolveResult |
/// Arguments passed to the constructor.
/// The resolver may mutate this array to wrap elements in |
argumentNames | string | /// The argument names. Pass the null string for positional arguments. /// |
allowProtectedAccess | bool | /// Whether to allow calling protected constructors. /// This should be false except when resolving constructor initializers. /// |
initializerStatements | IList |
/// Statements for Objects/Collections initializer.
/// |
return | ResolveResult |
public ResolvePrimitive ( object value ) : ResolveResult | ||
value | object | |
return | ResolveResult |
public ResolveSimpleName ( string identifier, IList |
||
identifier | string | |
typeArguments | IList |
|
isInvocationTarget | bool | |
return | ResolveResult |
public ResolveSizeOf ( IType type ) : ResolveResult | ||
type | IType | |
return | ResolveResult |
public ResolveThisReference ( ) : ResolveResult | ||
return | ResolveResult |
public ResolveTypeOf ( IType referencedType ) : ResolveResult | ||
referencedType | IType | |
return | ResolveResult |
public ResolveUnaryOperator ( UnaryOperatorType op, ResolveResult expression ) : ResolveResult | ||
op | UnaryOperatorType | |
expression | ResolveResult | |
return | ResolveResult |
public WithCheckForOverflow ( bool checkForOverflow ) : CSharpResolver | ||
checkForOverflow | bool | |
return | CSharpResolver |
public WithCurrentMember ( IMember member ) : CSharpResolver | ||
member | IMember | |
return | CSharpResolver |
public WithCurrentTypeDefinition ( ITypeDefinition typeDefinition ) : CSharpResolver | ||
typeDefinition | ITypeDefinition | |
return | CSharpResolver |
public WithCurrentUsingScope ( ResolvedUsingScope usingScope ) : CSharpResolver | ||
usingScope | ResolvedUsingScope | |
return | CSharpResolver |
public WithIsWithinLambdaExpression ( bool isWithinLambdaExpression ) : CSharpResolver | ||
isWithinLambdaExpression | bool | |
return | CSharpResolver |