C# Class CSharpSourceEmitter.Utils

Show file Open project: visualmutator/visualmutator

Public Methods

Method Description
FindAttribute ( IEnumerable attrs, SpecialAttribute sa ) : ICustomAttribute

IF an attribute of the specified special type exists in the sequence, return it. Otherwise return null.

GetAttributeType ( ICustomAttribute attr ) : SpecialAttribute

Determine if the specified attribute is of a special type, and if so return a code representing it. This is usefull for types not alread in IPlatformType

GetHiddenBaseClassMethod ( IMethodDefinition derivedClassMethod ) : IMethodDefinition

Returns the method from the closest base class that is hidden by the given method according to C# rules. If the method is an interface method definition, then look at it's base interfaces If no such method exists, Dummy.MethodDefinition is returned.

GetHiddenField ( IFieldDefinition derivedClassField ) : IFieldDefinition

Returns the field from the closest base class that is hidden by the given field according to C# rules.

IsMscorlibTypeNamed ( ITypeReference type, string name ) : bool

True if the specified type is defined in mscorlib and has the specified name

Private Methods

Method Description
GetHiddenBaseClassMethod ( IMethodDefinition derivedClassMethod, ITypeDefinition baseClass ) : IMethodDefinition
GetHiddenField ( IFieldDefinition derivedClassField, ITypeDefinition baseClass ) : IFieldDefinition

Method Details

FindAttribute() public static method

IF an attribute of the specified special type exists in the sequence, return it. Otherwise return null.
public static FindAttribute ( IEnumerable attrs, SpecialAttribute sa ) : ICustomAttribute
attrs IEnumerable
sa SpecialAttribute
return ICustomAttribute

GetAttributeType() public static method

Determine if the specified attribute is of a special type, and if so return a code representing it. This is usefull for types not alread in IPlatformType
public static GetAttributeType ( ICustomAttribute attr ) : SpecialAttribute
attr ICustomAttribute
return SpecialAttribute

GetHiddenBaseClassMethod() public static method

Returns the method from the closest base class that is hidden by the given method according to C# rules. If the method is an interface method definition, then look at it's base interfaces If no such method exists, Dummy.MethodDefinition is returned.
public static GetHiddenBaseClassMethod ( IMethodDefinition derivedClassMethod ) : IMethodDefinition
derivedClassMethod IMethodDefinition
return IMethodDefinition

GetHiddenField() public static method

Returns the field from the closest base class that is hidden by the given field according to C# rules.
public static GetHiddenField ( IFieldDefinition derivedClassField ) : IFieldDefinition
derivedClassField IFieldDefinition
return IFieldDefinition

IsMscorlibTypeNamed() public static method

True if the specified type is defined in mscorlib and has the specified name
public static IsMscorlibTypeNamed ( ITypeReference type, string name ) : bool
type ITypeReference
name string
return bool