FSharp.Data.Toolbox


TypeProviderForNamespaces Type

A base type providing default implementations of type provider functionality.

Constructors

Constructor Description

TypeProviderForNamespaces(config, ?sourceAssemblies, ?assemblyReplacementMap, ?addDefaultProbingLocation)

Full Usage: TypeProviderForNamespaces(config, ?sourceAssemblies, ?assemblyReplacementMap, ?addDefaultProbingLocation)

Parameters:
    config : TypeProviderConfig - Type provider config.
    ?sourceAssemblies : Assembly list - Optionally specify the design-time assemblies available to use as a basis for authoring provided types. The transitive dependencies of these assemblies are also included. By default Assembly.GetCallingAssembly() and its transitive dependencies are used.
    ?assemblyReplacementMap : (string * string) list - Optionally specify a map of assembly names from source model to referenced assemblies.
    ?addDefaultProbingLocation : bool - Optionally specify that the location of the type provider design-time component should be used to resolve failing assembly resolutions. This flag or an equivalent call to RegisterProbingFolder is generally needed for any type provider design-time components loaded into .NET Core tooling.

Returns: TypeProviderForNamespaces

Initializes a type provider.

config : TypeProviderConfig

Type provider config.

?sourceAssemblies : Assembly list

Optionally specify the design-time assemblies available to use as a basis for authoring provided types. The transitive dependencies of these assemblies are also included. By default Assembly.GetCallingAssembly() and its transitive dependencies are used.

?assemblyReplacementMap : (string * string) list

Optionally specify a map of assembly names from source model to referenced assemblies.

?addDefaultProbingLocation : bool

Optionally specify that the location of the type provider design-time component should be used to resolve failing assembly resolutions. This flag or an equivalent call to RegisterProbingFolder is generally needed for any type provider design-time components loaded into .NET Core tooling.

Returns: TypeProviderForNamespaces

TypeProviderForNamespaces(config, namespaceName, types, ?sourceAssemblies, ?assemblyReplacementMap, ?addDefaultProbingLocation)

Full Usage: TypeProviderForNamespaces(config, namespaceName, types, ?sourceAssemblies, ?assemblyReplacementMap, ?addDefaultProbingLocation)

Parameters:
    config : TypeProviderConfig - Type provider config.
    namespaceName : string - Name of namespace.
    types : ProvidedTypeDefinition list - Provided type definitions.
    ?sourceAssemblies : Assembly list - Optionally specify the design-time assemblies available to use as a basis for authoring provided types. The transitive dependencies of these assemblies are also included. By default Assembly.GetCallingAssembly() and its transitive dependencies are used.
    ?assemblyReplacementMap : (string * string) list - Optionally specify a map of assembly names from source model to referenced assemblies.
    ?addDefaultProbingLocation : bool - Optionally specify that the location of the type provider design-time component should be used to resolve failing assembly resolutions. This flag or an equivalent call to RegisterProbingFolder is generally needed for any type provider design-time components loaded into .NET Core tooling.

Returns: TypeProviderForNamespaces

Initializes a type provider to provide the types in the given namespace.

config : TypeProviderConfig

Type provider config.

namespaceName : string

Name of namespace.

types : ProvidedTypeDefinition list

Provided type definitions.

?sourceAssemblies : Assembly list

Optionally specify the design-time assemblies available to use as a basis for authoring provided types. The transitive dependencies of these assemblies are also included. By default Assembly.GetCallingAssembly() and its transitive dependencies are used.

?assemblyReplacementMap : (string * string) list

Optionally specify a map of assembly names from source model to referenced assemblies.

?addDefaultProbingLocation : bool

Optionally specify that the location of the type provider design-time component should be used to resolve failing assembly resolutions. This flag or an equivalent call to RegisterProbingFolder is generally needed for any type provider design-time components loaded into .NET Core tooling.

Returns: TypeProviderForNamespaces

Instance members

Instance member Description

this.AddNamespace(namespaceName, types)

Full Usage: this.AddNamespace(namespaceName, types)

Parameters:

Invoked by the type provider to add a namespace of provided types in the specification of the type provider.

namespaceName : string
types : ProvidedTypeDefinition list

this.ApplyStaticArgumentsForMethod(arg1, arg2, arg3)

Full Usage: this.ApplyStaticArgumentsForMethod(arg1, arg2, arg3)

Parameters:
Returns: MethodBase

Invoked by the host of the type provider to apply the static argumetns for a method.

arg0 : MethodBase
arg1 : string
arg2 : obj[]
Returns: MethodBase

this.Disposing

Full Usage: this.Disposing

Returns: IEvent<EventHandler, EventArgs>

Returns: IEvent<EventHandler, EventArgs>

this.GetStaticParametersForMethod(arg1)

Full Usage: this.GetStaticParametersForMethod(arg1)

Parameters:
Returns: ParameterInfo[]

Invoked by the host of the type provider to get the static parameters for a method.

arg0 : MethodBase
Returns: ParameterInfo[]

this.Invalidate()

Full Usage: this.Invalidate()

Invoked by the type provider to invalidate the information provided by the provider

this.Namespaces

Full Usage: this.Namespaces

Returns: IProvidedNamespace[]

Invoked by the type provider to get all provided namespaces with their provided types.

Returns: IProvidedNamespace[]

this.RegisterGeneratedTargetAssembly(fileName)

Full Usage: this.RegisterGeneratedTargetAssembly(fileName)

Parameters:
    fileName : string

Returns: Assembly

Register that a given file is a provided generated target assembly, e.g. an assembly produced by an external code generation tool. This assembly should be a target assembly, i.e. use the same asssembly references as given by TargetContext.ReferencedAssemblyPaths

fileName : string
Returns: Assembly

this.RegisterProbingFolder(folder)

Full Usage: this.RegisterProbingFolder(folder)

Parameters:
    folder : string

Registers custom probing path that can be used for probing assemblies

folder : string

this.RegisterRuntimeAssemblyLocationAsProbingFolder(config)

Full Usage: this.RegisterRuntimeAssemblyLocationAsProbingFolder(config)

Parameters:

Registers location of RuntimeAssembly (from TypeProviderConfig) as probing folder

config : TypeProviderConfig

this.ResolveAssembly(arg1)

Full Usage: this.ResolveAssembly(arg1)

Parameters:
Returns: Assembly
Modifiers: abstract

AssemblyResolve handler. Default implementation searches .dll file in registered folders

arg0 : ResolveEventArgs
Returns: Assembly

this.TargetContext

Full Usage: this.TargetContext

Returns: ProvidedTypesContext

The context for which code is eventually to be generated. You should not normally need to use this property directly, as translation from the compiler-hosted context to the design-time context will normally be performed automatically.

Returns: ProvidedTypesContext