/// <summary> /// Simple example that uses the basic client to connect to a BrightStar server, list the stores present and then create a new store. /// Assumes the BrightStar server is running on its default port. /// </summary> public static void UsingBasicClientToListStoresAndCreateStore() { // a new brightstar basic client var bc = new BasicClient(); // list stores returns the URLs of each store. // todo: why isnt the hyperserver url in the BasicClient constructor? var stores = bc.ListStores(new Uri("http://localhost:8090/brightstar")); // iterate the store URLs foreach (var store in stores) { Console.WriteLine("store is " + store); } // create a new store with guarenteed unique name var newStoreUri = bc.CreateStore(new Uri("http://localhost:8090/brightstar"), "mystore" + Guid.NewGuid()); // get the data from the new store using the store uri. Note this will be empty. var storeData = bc.GetStoreData(newStoreUri); }