Click or drag to resize

DatabaseFactoryCreate Method (String, DatabaseOptions)

Creates an IDatabase instance with the given name and options. Internally it may be operating on the same underlying data as another instance.

Namespace:  Couchbase.Lite
Assembly:  Couchbase.Lite (in Couchbase.Lite.dll) Version: 2.0.0-b0033
Syntax
C#
public static IDatabase Create(
	string name,
	DatabaseOptions options
)

Parameters

name
Type: SystemString
The name of the database
options
Type: Couchbase.LiteDatabaseOptions
The options for creating / opening the underlying data

Return Value

Type: IDatabase
The instantiated IDatabase object
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if name is null
IOExceptionDirectory is a file -or-The network name is not known.
UnauthorizedAccessExceptionThe caller does not have the required permission to create Directory.
ArgumentExceptionDirectory is a zero-length string, contains only white space, or contains one or more invalid characters. You can query for invalid characters by using the System.IO.Path.GetInvalidPathChars method.-or- Directory is prefixed with, or contains, only a colon character (:).
PathTooLongExceptionDirectory + name exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters and file names must be less than 260 characters.
DirectoryNotFoundExceptionDirectory is invalid (for example, it is on an unmapped drive).
NotSupportedExceptionDirectory contains a colon character (:) that is not part of a drive label ("C:\")
ArgumentExceptionname contains invalid characters
InvalidDataExceptionEncryptionKey contains an invalid object for creating a SymmetricKey
LiteCoreExceptionAn error occurred during LiteCore interop
See Also