Represents a provided type definition.
Constructor | Description |
Full Usage:
ProvidedTypeDefinition(assembly, namespaceName, className, baseType, ?hideObjectMethods, ?nonNullable, ?isErased, ?isSealed, ?isInterface, ?isAbstract)
Parameters:
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
|
Full Usage:
ProvidedTypeDefinition(className, baseType, ?hideObjectMethods, ?nonNullable, ?isErased, ?isSealed, ?isInterface, ?isAbstract)
Parameters:
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
|
Instance member | Description |
Full Usage:
this.AddAssemblyTypesAsNestedTypesDelayed(assemblyFunction)
Parameters:
unit -> Assembly
|
Add the types of the generated assembly as generative types, where types in namespaces get hierarchically positioned as nested types.
|
|
Add a custom attribute to the provided type definition.
|
Full Usage:
this.AddDefinitionLocation(line, column, filePath)
Parameters:
int
column : int
filePath : string
|
Add definition location information to the provided type definition.
|
|
Add the given type as an implemented interface.
|
Full Usage:
this.AddInterfaceImplementationsDelayed(interfacesFunction)
Parameters:
unit -> Type list
|
Add the given function as a set of on-demand computed interfaces.
|
|
Add a method, property, nested type or other member to a ProvidedTypeDefinition
|
Full Usage:
this.AddMemberDelayed(memberFunction)
Parameters:
unit -> 'a
|
Add a member to a ProvidedTypeDefinition, delaying computation of the members until required by the compilation context.
|
Full Usage:
this.AddMembers(memberInfos)
Parameters:
'a list
|
Add a set of members to a ProvidedTypeDefinition
|
Full Usage:
this.AddMembersDelayed(membersFunction)
Parameters:
unit -> 'a list
|
Add a set of members to a ProvidedTypeDefinition, delaying computation of the members until required by the compilation context.
|
Full Usage:
this.AddObsoleteAttribute(message, ?isError)
Parameters:
string
?isError : bool
|
Add a 'Obsolete' attribute to this provided type definition
|
Full Usage:
this.AddXmlDoc(xmlDoc)
Parameters:
string
|
Add XML documentation information to this provided constructor
|
Full Usage:
this.AddXmlDocComputed(xmlDocFunction)
Parameters:
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.
|
Full Usage:
this.AddXmlDocDelayed(xmlDocFunction)
Parameters:
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.
|
Full Usage:
this.ApplyStaticArguments(name, args)
Parameters:
string
args : obj[]
Returns: ProvidedTypeDefinition
|
|
Full Usage:
this.DefineMethodOverride(methodInfoBody, methodInfoDeclaration)
Parameters:
ProvidedMethod
methodInfoDeclaration : MethodInfo
|
Specifies that the given method body implements the given method declaration.
|
Full Usage:
this.DefineMethodOverridesDelayed(arg1)
Parameters:
unit -> (ProvidedMethod * MethodInfo) list
|
Specifies that the given method bodies implement the given method declarations
|
Full Usage:
this.DefineStaticParameters(parameters, instantiationFunction)
Parameters:
ProvidedStaticParameter list
instantiationFunction : string -> obj[] -> ProvidedTypeDefinition
|
Define the static parameters available on a statically parameterized type
|
Full Usage:
this.HideObjectMethods
Returns: bool
|
Suppress Object entries in intellisense menus in instances of this provided type
|
Full Usage:
this.IsErased
Returns: bool
|
Get a flag indicating if the ProvidedTypeDefinition is erased
|
Full Usage:
this.NonNullable
Returns: bool
|
Disallows the use of the null literal.
|
|
Set the attributes on the provided type. This fully replaces the default TypeAttributes.
|
|
Set the base type
|
|
Set the base type to a lazily evaluated value. Use this to delay realization of the base type as late as possible.
|
|
Set underlying type for generated enums
|
Full Usage:
this.SuppressRelocation
|
Get or set a flag indicating if the ProvidedTypeDefinition has type-relocation suppressed |
Static member | Description |
|
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
|
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.
|