Bloom.Edit.Configurator.GetLibraryData C# (CSharp) Method

GetLibraryData() public method

public GetLibraryData ( ) : string
return string
        public string GetLibraryData()
        {
            if (!RobustFile.Exists(PathToLibraryJson))
                return "{}";//return "{\"dummy\": \"x\"}";//TODO

            var s= RobustFile.ReadAllText(PathToLibraryJson);
            if(string.IsNullOrEmpty(s))
                return string.Empty;

            return "{\"library\": " + s + "}";
        }

Usage Example

		public void ShowConfigureDialog()
		{
			var c = new Configurator(_libraryFolder.Path, new NavigationIsolator());

			var stringRep = DynamicJson.Serialize(new
			{
				library = new { calendar = new { year = "2088" } }
			});
			c.CollectJsonData(stringRep);

			c.ShowConfigurationDialog(Get_NotYetConfigured_CalendardBookStorage().FolderPath);
			Assert.IsTrue(c.GetLibraryData().Contains("year"));
		}
All Usage Examples Of Bloom.Edit.Configurator::GetLibraryData