Skip to content

SharpChecker JSON Formats

Paul G.B edited this page Jun 24, 2020 · 2 revisions

The following subsections are JSON formats from SharpChecker copied over, since the formats are used frequently in this project.

Table of Contents

TypeList

All the information of types with it's associated library or executable.

types as (Map<string, string[]>): A hashmap of a library or executable mapping to a list of types it contains.

QuickTypeInfo

A quick look into the information of the type.

unlocalizedName as (string): The name of the type as found within the library's IL code.

nonInstancedFullName as (string): The name of the type that is slightly localized but not generically instanced.

name as (string): The name of the type as found when looking at the code.

fullName as (string): The full name of the type as found when looking at the code. Includes the namespace and the name within this variable.

namespaceName as (string): The name of the namespace where the type is located in.

genericParameters as (GenericParametersInfo[]): The list of generic parameters that the type contains.

isGenericType as (boolean): Set to true if the type is a generic type.

TypeInfo

All the information relevant to types.

typeInfo as (QuickTypeInfo): The quick look at the information of the type (including name, namespace, generic parameters).

assemblyName as (string): The name of the assembly where the type is found in.

isDelegate as (boolean): Set to true if the type is a delegate declaration.

isNested as (boolean): Set to true if the type is a nested type.

isStatic as (boolean): Set to true if the type is static and cannot have any instances only static members.

isAbstract as (boolean): Set to true if the type is abstract and needs to be inherited to be used as an instance.

isSealed as (boolean): Set to true if the type is sealed and cannot be inheritted from.

accessor as (string): The accessor of the type (such as internal, private, protected, public).

modifier as (string): Any modifiers that the type contains (such as static, sealed, abstract, etc.).

objectType as (string): The object type of the type (such as class, struct, enum, or interface).

hasDeclaringType as (boolean): Set to true if the type is nested and has a parent type.

declaringType as (QuickTypeInfo): Gets the parent type in which this type is nested under. If it is not a nested type, then it will be null. Check hasDeclaringType to see if it exists to begin with.

declaration as (string): The partial declaration of the class within the inheritance declaration that can be found within the code.

fullDeclaration as (string): The full declaration of the type as it would be found within the code.

baseType as (QuickTypeInfo): The information of the base type that the type inherits.

attributes as (AttributeInfo[]): The array of attributes that the type contains.

interfaces as (QuickTypeInfo[]): The array of type information of interfaces that the type implements.

constructors as (MethodInfo[]): The array of constructors that the type contains.

fields as (FieldInfo[]): The array of fields that the type contains.

staticFields as (FieldInfo[]): The array of static fields that the type contains.

properties as (PropertyInfo[]): The array of properties that the type contains.

staticProperties as (PropertyInfo[]): The array of static properties that the type contains.

events as (EventInfo[]): The array of events that the type contains.

staticEvents as (EventInfo[]): The array of static events that the type contains.

methods as (MethodInfo[]): The array of methods that the type contains.

staticMethods as (MethodInfo[]): The array of static methods that the type contains.

operators as (MethodInfo[]): The array of operators that the type contains.

GenericParametersInfo

All the information relevant to generic parameters.

unlocalizedName as (string): The unlocalized name of the generic parameter as it would appear in the IL code.

name as (string): The name of the generic parameter.

constraints as (QuickTypeInfo[]): The list of constraints of what type the generic parameter should be.

AttributeFieldInfo

All the information relevant to the attribute's fields.

name as (string): The name of the attribute field.

value as (string): The value of the attribute field.

typeInfo as (QuickTypeInfo): The information of the attribute field's type.

AttributeInfo

All the information relevant to an attribute.

typeInfo as (QuickTypeInfo): The information of the type that the attribute is.

constructorArgs as (AttributeFieldInfo[]): The list of constructor arguments that the attribute is declaring.

properties as (AttributeFieldInfo[]): The list of fields and properties that the attribute is declaring.

parameterDeclaration as (string): The declaration of parameters as seen if looking at the code.

fullDeclaration as (string): The declaration of the attribute as a whole, with name and parameters as seen if looking at the code.

FieldInfo

All the information relevant to fields.

name as (string): The name of the field.

value as (string): The value of the field (if it's a constant).

isConstant as (boolean): Set to true if the field is constant.

isStatic as (boolean): Set to true if the field is static.

isReadonly as (boolean): Set to true if the field is readonly.

attributes as (AttributeInfo[]): The list of attributes that the field contains.

accessor as (string): The accessor of the field (such as internal, private, protected, public).

modifier as (string): Any modifiers to the field (such as static, const, static readonly, etc).

typeInfo as (QuickTypeInfo): The type information of the field's type.

implementedType as (QuickTypeInfo): The type the field is implemented in.

fullDeclaration as (string): The declaration of the field as it is found witihn the code.

PropertyInfo

All the information relevant to the property.

name as (string): The name of the property.

isStatic as (boolean): Set to true if the property is static.

hasGetter as (boolean): Set to true if the property has a getter method.

hasSetter as (boolean): Set to true if the property has a setter method.

attributes as (AttributeInfo[]): The list of attributes associated with the property.

accessor as (string): The accessor of the property (such as internal, private, protected, public).

modifier as (string): Any modifiers to the property (such as static, virtual, override, etc.).

typeInfo as (QuickTypeInfo): The information of the property's type.

implementedType as (QuickTypeInfo): The information of where the property was implemented.

parameters as (ParameterInfo[]): The parameters the property has (if any).

getter as (MethodInfo): The getter method of the property (this can be null, you must check the hasGetter variable).

setter as (MethodInfo): The setter method of the property (this can be null, you must check the hasSetter variable).

declaration as (string): The partial declaration of the property as can be found in the code.

parameterDeclaration as (string): The partial declaration of the property's parameters (if any) as can be found in the code.

getSetDeclaration as (string): The partial declaration of the property that determines the accessibility of the get and set methods as can be found in the code.

fullDeclaration as (string): The full declaration of the property as can be found in the code.

EventInfo

All the information relevant to events.

name as (string): The name of the event.

isStatic as (boolean): Set to true if the event is static.

accessor as (string): The accessor of the event (such as internal, private, protected, public).

modifier as (string): Any modifiers of the event (such as static, virtual, override, etc.).

attributes as (AttributeInfo[]): The attributes associated with the event.

typeInfo as (QuickTypeInfo): The information of the event's type.

implementedType as (QuickTypeInfo): The type the event is implemented in.

adder as (MethodInfo): The information of the event's adding method.

remover as (MethodInfo): The information of the event's removing method.

fullDeclaration as (string): The declaration of the event as it would be found in the code.

MethodInfo

All the information relevant to methods.

name as (string): The name of the method.

accessor as (string): The accessor of the method (such as internal, private, protected, public).

modifier as (string): Any modifiers of the method (such as static, virtual, override, etc.).

isAbstract as (boolean): Set to true if the method is abstract.

isConstructor as (boolean): Set to true if the method is a constructor.

isConversionOperator as (boolean): Set to true if the method is a conversion operator.

isExtension as (boolean): Set to true if the method is an extension.

isOperator as (boolean): Set to true if the method is an operator.

isOverriden as (boolean): Set to true if the method is overriden.

isStatic as (boolean): Set to true if the method is static.

isVirtual as (boolean): Set to true if the method is virtual.

implementedType as (QuickTypeInfo): The type that the method is implemented in.

returnType as (QuickTypeInfo): The type that the method returns.

attributes as (AttributeInfo[]): The attributes of the methods.

parameters as (ParameterInfo[]): The parameters that the methods contains.

genericParameters as (GenericParametersInfo[]): The generic parameters that the method uses.

declaration as (string): The partial declaration of the method (without parameters) that can be found in the code.

genericDeclaration as (string): The partial declaration of the generics that can be found in the code.

parameterDeclaration as (string): The partial declaration of the parameters that can be found in the code.

fullDeclaration as (string): The full declaration of the method that can be found in the code.

ParameterInfo

All the information relevant to parameters.

name as (string): The name of the parameter.

defaultValue as (string): The default value of the parameter (if it exists).

attributes as (AttributeInfo[]): The list of attributes that the parameter contains.

modifier as (string): Any modifiers to the parameter (such as ref, in, out, params, etc.).

isOptional as (boolean): Set to true if the parameter is optional and can be left out when calling the method.

typeInfo as (QuickTypeInfo): The information of the parameter's type.

genericParameterDeclarations as (string[]): The list of types used for the generic parameters.

fullDeclaration as (string): The full declaration of the parameter as it would be found within the code.

Clone this wiki locally