Click or drag to resize
ConnectionStringConfiguratorNamed Method
Use the connection string with the given name from the app.config file.

Namespace: SphinxConnector.FluentApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 3.12.6
Syntax
public void Named(
	string connectionStringName
)

Parameters

connectionStringName
Type: SystemString
The name of the connection string in the app.config file.
Exceptions
ExceptionCondition
ArgumentNullExceptionOccurs when the provided string is null.
ArgumentExceptionOccurs when the provided string is empty.
InvalidOperationExceptionOccurs in case the connection string has already been set.
Examples
Suppose your app.config looks like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <connectionStrings>
    <add name="SphinxConnectionString" connectionString="datasource=192.168.105;port=9306"/>
    </connectionStrings>  
</configuration>

You can then configure the FulltextStore class to use that connection string like this:
IFulltextStore fulltextStore = new FulltextStore().Initialize();
fulltextStore.ConnectionString.Named("SphinxConnectionString");
See Also