C# Class Couchbase.AspNet.ProviderHelper

Datei anzeigen Open project: couchbaselabs/couchbase-aspnet Class Usage Examples

Public Methods

Method Description
CheckForUnknownAttributes ( NameValueCollection config ) : void

Helper to make sure there are no unknown attributes left over in the config section

GetAndRemove ( NameValueCollection config, string name, bool required ) : string

Gets and removes an value from the configuration section

GetBucket ( string name, NameValueCollection config, ICluster cluster ) : IBucket

Gets a Couchbase bucket using the couchbase factory configured in the Web.config file. If the factory is not defined in the Web.config file section, then the default factory is used.

GetCluster ( string name, NameValueCollection config ) : ICluster

Private Methods

Method Description
GetFactoryInstance ( string typeName ) : ICouchbaseBucketFactory

Internal function to get the couchbase factory

Method Details

CheckForUnknownAttributes() public static method

Helper to make sure there are no unknown attributes left over in the config section
public static CheckForUnknownAttributes ( NameValueCollection config ) : void
config System.Collections.Specialized.NameValueCollection Name value collection to examine
return void

GetAndRemove() public static method

Gets and removes an value from the configuration section
public static GetAndRemove ( NameValueCollection config, string name, bool required ) : string
config System.Collections.Specialized.NameValueCollection Name value collection to examine
name string Name of the value to retrieve
required bool True if the value is required, false if optional
return string

GetBucket() public static method

Gets a Couchbase bucket using the couchbase factory configured in the Web.config file. If the factory is not defined in the Web.config file section, then the default factory is used.
public static GetBucket ( string name, NameValueCollection config, ICluster cluster ) : IBucket
name string Name of the bucket
config System.Collections.Specialized.NameValueCollection Name value collection from config file
cluster ICluster The instance.
return IBucket

GetCluster() public static method

public static GetCluster ( string name, NameValueCollection config ) : ICluster
name string
config System.Collections.Specialized.NameValueCollection
return ICluster