FSharp.Data.Toolbox


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(assemblyFunction)

Full Usage: this.AddAssemblyTypesAsNestedTypesDelayed(assemblyFunction)

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(arg1)

Full Usage: this.AddCustomAttribute(arg1)

Parameters:

Add a custom attribute to the provided type definition.

arg0 : CustomAttributeData

this.AddDefinitionLocation(line, column, filePath)

Full Usage: this.AddDefinitionLocation(line, column, filePath)

Parameters:
    line : int
    column : int
    filePath : string

Add definition location information to the provided type definition.

line : int
column : int
filePath : string

this.AddInterfaceImplementation(interfaceType)

Full Usage: this.AddInterfaceImplementation(interfaceType)

Parameters:
    interfaceType : Type

Add the given type as an implemented interface.

interfaceType : Type

this.AddInterfaceImplementationsDelayed(interfacesFunction)

Full Usage: this.AddInterfaceImplementationsDelayed(interfacesFunction)

Parameters:
    interfacesFunction : unit -> Type list

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

interfacesFunction : unit -> Type list

this.AddMember(memberInfo)

Full Usage: this.AddMember(memberInfo)

Parameters:

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

memberInfo : MemberInfo

this.AddMemberDelayed(memberFunction)

Full Usage: this.AddMemberDelayed(memberFunction)

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(memberInfos)

Full Usage: this.AddMembers(memberInfos)

Parameters:
    memberInfos : 'a list

Add a set of members to a ProvidedTypeDefinition

memberInfos : 'a list

this.AddMembersDelayed(membersFunction)

Full Usage: this.AddMembersDelayed(membersFunction)

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(message, ?isError)

Full Usage: this.AddObsoleteAttribute(message, ?isError)

Parameters:
    message : string
    ?isError : bool

Add a 'Obsolete' attribute to this provided type definition

message : string
?isError : bool

this.AddXmlDoc(xmlDoc)

Full Usage: this.AddXmlDoc(xmlDoc)

Parameters:
    xmlDoc : string

Add XML documentation information to this provided constructor

xmlDoc : string

this.AddXmlDocComputed(xmlDocFunction)

Full Usage: this.AddXmlDocComputed(xmlDocFunction)

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(xmlDocFunction)

Full Usage: this.AddXmlDocDelayed(xmlDocFunction)

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(name, args)

Full Usage: this.ApplyStaticArguments(name, args)

Parameters:
    name : string
    args : obj[]

Returns: ProvidedTypeDefinition

name : string
args : obj[]
Returns: ProvidedTypeDefinition

this.DefineMethodOverride(methodInfoBody, methodInfoDeclaration)

Full Usage: this.DefineMethodOverride(methodInfoBody, methodInfoDeclaration)

Parameters:

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

methodInfoBody : ProvidedMethod
methodInfoDeclaration : MethodInfo

this.DefineMethodOverridesDelayed(arg1)

Full Usage: this.DefineMethodOverridesDelayed(arg1)

Parameters:

Specifies that the given method bodies implement the given method declarations

arg0 : unit -> (ProvidedMethod * MethodInfo) list

this.DefineStaticParameters(parameters, instantiationFunction)

Full Usage: this.DefineStaticParameters(parameters, instantiationFunction)

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(arg1)

Full Usage: this.SetAttributes(arg1)

Parameters:

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

arg0 : TypeAttributes

this.SetBaseType(arg1)

Full Usage: this.SetBaseType(arg1)

Parameters:

Set the base type

arg0 : Type

this.SetBaseTypeDelayed(baseTypeFunction)

Full Usage: this.SetBaseTypeDelayed(baseTypeFunction)

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(arg1)

Full Usage: this.SetEnumUnderlyingType(arg1)

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