ConnectionParameterExtensionsGetConnectionParameters(ValueTupleString, String) Method

Gets connection parameters from a specified assembly and type using default values.

Definition

Namespace: Gemstone.Timeseries.Adapters
Assembly: Gemstone.Timeseries (in Gemstone.Timeseries.dll) Version: 1.0.136 -- Release Build+045677775a56d15698be6ced5ce5213063e47102
public static IEnumerable<ConnectionParameter> GetConnectionParameters(
	this (string assemblyName, string typeName) src
)

Parameters

src  ValueTupleString, String
Tuple containing assembly name and type name.

Return Value

IEnumerableConnectionParameter
Collection of connection parameters for the specified adapter.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ValueTupleString, String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The src tuple should contain the assembly name and type name of the desired adapter. The assembly will be loaded, if needed, and the type will be used to get connection string parameters. Note that the 'assemblyName' and 'typeName' parameters correspond to the 'AssemblyName' and 'TypeName' fields in the database model used to load a specifically configured adapter instance.

Only public, instance properties are considered for returned parameter list. The DefaultValue will be populated with the configured default value of the property while the Value remains unassigned. Use ApplyConnectionString(IEnumerableConnectionParameter, String) or ApplySettings(IEnumerableConnectionParameter, DictionaryString, String) to assign values from a connection string or settings dictionary, respectively.

Call method like this:

C#
var assemblyName = "FileAdapters.dll";
var typeName = "FileAdapters.ProcessLauncher";
var params = (assemblyName, typeName).GetConnectionParameters();

Note that the AdapterCache automatically loads and caches adapter types along with their connection parameters, so this method is not typically directly used.

See Also