Created
April 19, 2012 01:51
-
-
Save ronnieoverby/2417818 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyDocStoreCreator : ICreateDocumentStore | |
{ | |
public IDocumentStore CreateDocumentStore(ConnectionInfo connectionInfo) | |
{ | |
var ds = new DocumentStore | |
{ | |
Url = connectionInfo.Url | |
}; | |
try | |
{ | |
ds.Initialize(); | |
IndexCreation.CreateIndexes(GetType().Assembly, ds); | |
return ds; | |
} | |
catch (System.Exception) | |
{ | |
ds.Dispose(); | |
throw; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment