Qit


ProvidedTypeDefinition Type

Represents a provided type definition.

Constructors

Constructor Description

ProvidedTypeDefinition(assembly, namespaceName, className, baseType, ?hideObjectMethods, ?nonNullable, ?isErased, ?isSealed, ?isInterface, ?isAbstract)

Full Usage: ProvidedTypeDefinition(assembly, namespaceName, className, baseType, ?hideObjectMethods, ?nonNullable, ?isErased, ?isSealed, ?isInterface, ?isAbstract)

Parameters:
    assembly : Assembly
    namespaceName : string
    className : string
    baseType : Type option
    ?hideObjectMethods : bool
    ?nonNullable : bool
    ?isErased : bool
    ?isSealed : bool
    ?isInterface : bool
    ?isAbstract : bool

Returns: ProvidedTypeDefinition

When making a cross-targeting type provider, use this method instead of the corresponding ProvidedTypeDefinition constructor from ProvidedTypes

assembly : Assembly
namespaceName : string
className : string
baseType : Type option
?hideObjectMethods : bool
?nonNullable : bool
?isErased : bool
?isSealed : bool
?isInterface : bool
?isAbstract : bool
Returns: ProvidedTypeDefinition

ProvidedTypeDefinition(className, baseType, ?hideObjectMethods, ?nonNullable, ?isErased, ?isSealed, ?isInterface, ?isAbstract)

Full Usage: ProvidedTypeDefinition(className, baseType, ?hideObjectMethods, ?nonNullable, ?isErased, ?isSealed, ?isInterface, ?isAbstract)

Parameters:
    className : string
    baseType : Type option
    ?hideObjectMethods : bool
    ?nonNullable : bool
    ?isErased : bool
    ?isSealed : bool
    ?isInterface : bool
    ?isAbstract : bool

Returns: ProvidedTypeDefinition

When making a cross-targeting type provider, use this method instead of the corresponding ProvidedTypeDefinition constructor from ProvidedTypes

className : string
baseType : Type option
?hideObjectMethods : bool
?nonNullable : bool
?isErased : bool
?isSealed : bool
?isInterface : bool
?isAbstract : bool
Returns: ProvidedTypeDefinition

Instance members

Instance member Description

this.AddAssemblyTypesAsNestedTypesDelayed

Full Usage: this.AddAssemblyTypesAsNestedTypesDelayed

Parameters:

Add the types of the generated assembly as generative types, where types in namespaces get hierarchically positioned as nested types.

assemblyFunction : unit -> Assembly

this.AddCustomAttribute

Full Usage: this.AddCustomAttribute

Parameters:

Add a custom attribute to the provided type definition.

arg0 : CustomAttributeData

this.AddDefinitionLocation

Full Usage: this.AddDefinitionLocation

Parameters:
    line : int
    column : int
    filePath : string

Add definition location information to the provided type definition.

line : int
column : int
filePath : string

this.AddInterfaceImplementation

Full Usage: this.AddInterfaceImplementation

Parameters:
    interfaceType : Type

Add the given type as an implemented interface.

interfaceType : Type

this.AddInterfaceImplementationsDelayed

Full Usage: this.AddInterfaceImplementationsDelayed

Parameters:
    interfacesFunction : unit -> Type list

Add the given function as a set of on-demand computed interfaces.

interfacesFunction : unit -> Type list

this.AddMember

Full Usage: this.AddMember

Parameters:

Add a method, property, nested type or other member to a ProvidedTypeDefinition

memberInfo : MemberInfo

this.AddMemberDelayed

Full Usage: this.AddMemberDelayed

Parameters:
    memberFunction : unit -> 'a

Add a member to a ProvidedTypeDefinition, delaying computation of the members until required by the compilation context.

memberFunction : unit -> 'a

this.AddMembers

Full Usage: this.AddMembers

Parameters:
    memberInfos : 'a list

Add a set of members to a ProvidedTypeDefinition

memberInfos : 'a list

this.AddMembersDelayed

Full Usage: this.AddMembersDelayed

Parameters:
    membersFunction : unit -> 'a list

Add a set of members to a ProvidedTypeDefinition, delaying computation of the members until required by the compilation context.

membersFunction : unit -> 'a list

this.AddObsoleteAttribute

Full Usage: this.AddObsoleteAttribute

Parameters:
    message : string
    ?isError : bool

Add a 'Obsolete' attribute to this provided type definition

message : string
?isError : bool

this.AddXmlDoc

Full Usage: this.AddXmlDoc

Parameters:
    xmlDoc : string

Add XML documentation information to this provided constructor

xmlDoc : string

this.AddXmlDocComputed

Full Usage: this.AddXmlDocComputed

Parameters:
    xmlDocFunction : unit -> string

Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary The documentation is re-computed every time it is required.

xmlDocFunction : unit -> string

this.AddXmlDocDelayed

Full Usage: this.AddXmlDocDelayed

Parameters:
    xmlDocFunction : unit -> string

Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary. The documentation is only computed once.

xmlDocFunction : unit -> string

this.ApplyStaticArguments

Full Usage: this.ApplyStaticArguments

Parameters:
    name : string
    args : obj[]

Returns: ProvidedTypeDefinition
name : string
args : obj[]
Returns: ProvidedTypeDefinition

this.DefineMethodOverride

Full Usage: this.DefineMethodOverride

Parameters:

Specifies that the given method body implements the given method declaration.

methodInfoBody : ProvidedMethod
methodInfoDeclaration : MethodInfo

this.DefineMethodOverridesDelayed

Full Usage: this.DefineMethodOverridesDelayed

Parameters:

Specifies that the given method bodies implement the given method declarations

arg0 : unit -> (ProvidedMethod * MethodInfo) list

this.DefineStaticParameters

Full Usage: this.DefineStaticParameters

Parameters:

Define the static parameters available on a statically parameterized type

parameters : ProvidedStaticParameter list
instantiationFunction : string -> obj[] -> ProvidedTypeDefinition

this.HideObjectMethods

Full Usage: this.HideObjectMethods

Returns: bool

Suppress Object entries in intellisense menus in instances of this provided type

Returns: bool

this.IsErased

Full Usage: this.IsErased

Returns: bool

Get a flag indicating if the ProvidedTypeDefinition is erased

Returns: bool

this.NonNullable

Full Usage: this.NonNullable

Returns: bool

Disallows the use of the null literal.

Returns: bool

this.SetAttributes

Full Usage: this.SetAttributes

Parameters:

Set the attributes on the provided type. This fully replaces the default TypeAttributes.

arg0 : TypeAttributes

this.SetBaseType

Full Usage: this.SetBaseType

Parameters:

Set the base type

arg0 : Type

this.SetBaseTypeDelayed

Full Usage: this.SetBaseTypeDelayed

Parameters:
    baseTypeFunction : unit -> Type

Set the base type to a lazily evaluated value. Use this to delay realization of the base type as late as possible.

baseTypeFunction : unit -> Type

this.SetEnumUnderlyingType

Full Usage: this.SetEnumUnderlyingType

Parameters:

Set underlying type for generated enums

arg0 : Type

this.SuppressRelocation

Full Usage: this.SuppressRelocation

Get or set a flag indicating if the ProvidedTypeDefinition has type-relocation suppressed

Static members

Static member Description

ProvidedTypeDefinition.EraseType(typ)

Full Usage: ProvidedTypeDefinition.EraseType(typ)

Parameters:
Returns: Type

Emulate the F# type provider type erasure mechanism to get the actual (erased) type. We erase ProvidedTypes to their base type and we erase array of provided type to array of base type. In the case of generics all the generic type arguments are also recursively replaced with the erased-to types

typ : Type
Returns: Type

ProvidedTypeDefinition.Logger

Full Usage: ProvidedTypeDefinition.Logger

Returns: (string -> unit) option ref

Get or set a utility function to log the creation of root Provided Type. Used to debug caching/invalidation.

Returns: (string -> unit) option ref