Skip to content

Commit

Permalink
Adding XML documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ayende committed Oct 28, 2010
1 parent dfa78b4 commit 3e57333
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 42 deletions.
25 changes: 24 additions & 1 deletion Raven.Client.Embedded/EmbeddablDocumentStore.cs
Expand Up @@ -5,16 +5,27 @@

namespace Raven.Client.Client
{
/// <summary>
/// Manages access to RavenDB and open sessions to work with RavenDB.
/// Also supports hosting RavenDB in an embedded mode
/// </summary>
public class EmbeddablDocumentStore : DocumentStore
{
private RavenConfiguration configuration;

/// <summary>
/// Gets or sets the identifier for this store.
/// </summary>
/// <value>The identifier.</value>
public override string Identifier
{
get { return base.Identifier ?? (RunInMemory ? "memory" : DataDirectory); }
set { base.Identifier = value; }
}

///<summary>
/// Get or set the configuration instance for embedded RavenDB
///</summary>
public RavenConfiguration Configuration
{
get
Expand Down Expand Up @@ -51,8 +62,14 @@ public string DataDirectory
set { Configuration.DataDirectory = value; }
}

public DocumentDatabase DocumentDatabase { get; set; }
///<summary>
/// Access the embedded instnace of RavenDB
///</summary>
public DocumentDatabase DocumentDatabase { get; private set; }

/// <summary>
/// Parse the connection string option
/// </summary>
protected override void ProcessConnectionStringOption(NetworkCredential neworkCredentials, string key,
string value)
{
Expand All @@ -74,13 +91,19 @@ public string DataDirectory
}
}

/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public override void Dispose()
{
base.Dispose();
if (DocumentDatabase != null)
DocumentDatabase.Dispose();
}

/// <summary>
/// Initialize the document store access method to RavenDB
/// </summary>
protected override void InitializeInternal()
{
if (configuration != null)
Expand Down

0 comments on commit 3e57333

Please sign in to comment.