CKFinder 3 – ASP.NET Connector Documentation
ConnectorBuilder Class Reference

Builds an instance of IConnector using fluent interface. More...

Public Member Functions

 ConnectorBuilder ()
 Constructs a new instance of ConnectorBuilder. More...
 
ConnectorBuilder SetLicense (string licenseName, string licenseKey)
 Adds license information to the connector. More...
 
ConnectorBuilder SetRequestConfiguration (Action< ICommandRequest, ConnectorConfiguration > configurationAction)
 Sets connector's configuration for each request. More...
 
ConnectorBuilder AddCommand (string name, Type commandType)
 Adds custom command to the connector. More...
 
ConnectorBuilder AddCommand< T > (string name)
 Adds custom command to the connector. More...
 
ConnectorBuilder SetAuthenticator (IAuthenticator authenticator)
 Defines an IAuthenticator for the connector. More...
 
ConnectorBuilder SetCsrfProtection (bool enable)
 Defines whether enable CSRF protection. The default CSRF protection mechanism is based on double submit cookies. More...
 
ConnectorBuilder SetVerboseLogging (bool enable)
 Defines whether enable verbose logging of exceptions. More...
 
ConnectorBuilder SetPluginsPath (string pluginsPath)
 Defines path to folder with plugins. More...
 
ConnectorBuilder AddPlugin (string pluginName, IReadOnlyDictionary< string, IReadOnlyCollection< string >> options)
 Adds a plugin. More...
 
ConnectorBuilder AddPlugin (string pluginName, IReadOnlyDictionary< string, IReadOnlyCollection< string >> options, Lazy< IPlugin > plugin)
 Adds a plugin. More...
 
ConnectorBuilder AddPlugin (string pluginName, Lazy< IPlugin > plugin)
 Adds a plugin. More...
 
ConnectorBuilder AddPlugin (string pluginName)
 Adds a plugin. More...
 
Build< T > (IConnectorFactory< T > connectorFactory)
 Builds instance of the IConnector. More...
 

Public Attributes

LicenseProvider licenseProvider
 

Detailed Description

Builds an instance of IConnector using fluent interface.

Constructor & Destructor Documentation

◆ ConnectorBuilder()

ConnectorBuilder ( )
inline

Constructs a new instance of ConnectorBuilder.

Member Function Documentation

◆ AddCommand()

ConnectorBuilder AddCommand ( string  name,
Type  commandType 
)
inline

Adds custom command to the connector.

Parameters
nameA name of the command to add.
commandTypeA type of the command to add. All commands must that implement ICommand interface.
Returns
Current instance of ConnectorBuilder.

◆ AddCommand< T >()

ConnectorBuilder AddCommand< T > ( string  name)
inline

Adds custom command to the connector.

Parameters
nameA name of the command to add.
Template Parameters
TA type of the command to add. All commands must that implement ICommand interface.
Returns
Current instance of ConnectorBuilder.
Type Constraints
T :ICommand 

◆ AddPlugin() [1/4]

ConnectorBuilder AddPlugin ( string  pluginName)
inline

Adds a plugin.

Parameters
pluginNameThe name of the plugin.
Returns
Current instance of ConnectorBuilder.

◆ AddPlugin() [2/4]

ConnectorBuilder AddPlugin ( string  pluginName,
IReadOnlyDictionary< string, IReadOnlyCollection< string >>  options 
)
inline

Adds a plugin.

Parameters
pluginNameThe name of the plugin.
optionsThe options for the plugin.
Returns
Current instance of ConnectorBuilder.

◆ AddPlugin() [3/4]

ConnectorBuilder AddPlugin ( string  pluginName,
IReadOnlyDictionary< string, IReadOnlyCollection< string >>  options,
Lazy< IPlugin >  plugin 
)
inline

Adds a plugin.

Parameters
pluginNameThe name of the plugin.
optionsThe options for the plugin.
pluginCKFinder connector plugin instance.
Returns
Current instance of ConnectorBuilder.

◆ AddPlugin() [4/4]

ConnectorBuilder AddPlugin ( string  pluginName,
Lazy< IPlugin >  plugin 
)
inline

Adds a plugin.

Parameters
pluginNameThe name of the plugin.
optionsThe options for the plugin.
pluginCKFinder connector plugin instance.
Returns
Current instance of ConnectorBuilder.

◆ Build< T >()

T Build< T > ( IConnectorFactory< T >  connectorFactory)
inline

Builds instance of the IConnector.

Returns
Instance of IConnector.
Type Constraints
T :IConnector 

◆ SetAuthenticator()

ConnectorBuilder SetAuthenticator ( IAuthenticator  authenticator)
inline

Defines an IAuthenticator for the connector.

Parameters
authenticatorAn instance of IAuthenticator.
Returns
Current instance of ConnectorBuilder.

◆ SetCsrfProtection()

ConnectorBuilder SetCsrfProtection ( bool  enable)
inline

Defines whether enable CSRF protection. The default CSRF protection mechanism is based on double submit cookies.

Parameters
enableA boolean whether to enable this option.
Returns
Current instance of ConnectorBuilder.

◆ SetLicense()

ConnectorBuilder SetLicense ( string  licenseName,
string  licenseKey 
)
inline

Adds license information to the connector.

Parameters
licenseNameA license name.
licenseKeyA license key.
Returns
Current instance of ConnectorBuilder.

◆ SetPluginsPath()

ConnectorBuilder SetPluginsPath ( string  pluginsPath)
inline

Defines path to folder with plugins.

Parameters
pluginsPathA path to folder with plugins.
Returns
Current instance of ConnectorBuilder.

◆ SetRequestConfiguration()

ConnectorBuilder SetRequestConfiguration ( Action< ICommandRequest, ConnectorConfiguration configurationAction)
inline

Sets connector's configuration for each request.

Parameters
configurationActionA configuration action.
Returns
Current instance of ConnectorBuilder.

◆ SetVerboseLogging()

ConnectorBuilder SetVerboseLogging ( bool  enable)
inline

Defines whether enable verbose logging of exceptions.

Parameters
enableA boolean whether to enable this option.
Returns
Current instance of ConnectorBuilder.

The documentation for this class was generated from the following file: