Raven.Client.Document.DocumentStore.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
		public void Dispose()
		{
            Stored = null;
#if !CLIENT
			if (DocumentDatabase != null)
				DocumentDatabase.Dispose();
#endif
		}

Usage Example

Esempio n. 1
0
 static void Main(string[] args)
 {
     var input = "";
     do
     {
         var database = "";
         IDocumentStore ds;
         while (!Uri.IsWellFormedUriString(database, UriKind.Absolute))
         {
             Console.WriteLine("Please enter a valid absolute url for the database");
             database = Console.ReadLine();
         }
         Console.WriteLine("Enter the DB to test");
         var defaultdb = Console.ReadLine();
         RunDBTest(database, defaultdb);
         Console.WriteLine("Again? Y/N or B to Begin Stuffing the Bird");
         input = Console.ReadLine().ToLower();
         // pressing B will throw in 100,000 documents or run until an error is generated by Raven
         if (input == "b")
         {
             ds = new DocumentStore { Url = database, DefaultDatabase = defaultdb };
             ds.Initialize();
             for (int i = 0; i < 5000; i++)
                 BeginFill(database, defaultdb, i, ds);
             ds.Dispose();
         }
     } while (input == "y");
 }
All Usage Examples Of Raven.Client.Document.DocumentStore::Dispose