C# (CSharp) Bloom Namespace

Nested Namespaces

Bloom.Api
Bloom.Book
Bloom.CLI
Bloom.Collection
Bloom.CollectionChoosing
Bloom.CollectionCreating
Bloom.CollectionTab
Bloom.Edit
Bloom.ImageProcessing
Bloom.Library
Bloom.MiscUI
Bloom.Properties
Bloom.Publish
Bloom.Registration
Bloom.SendReceive
Bloom.ToPalaso
Bloom.WebLibraryIntegration
Bloom.Wizard
Bloom.Workspace
Bloom.web

Classes

Name Description
AboutMemory This is a debugging tool for developers to allow access to Mozilla memory management (garbage collection) information. Despite the name, this class could be used to display almost any url. If we can figure out how to add the "about:ccdump" extension to our mozilla setup, that would be a reasonable additional possibility for displaying.
ApplicationContainer This is sortof a wrapper around the DI container. I'm not thrilled with the name I've used (jh).
ApplicationUpdateSupport This class contains code to work with the Squirrel package to handle automatic updating of Bloom to new versions. The key methods are called from WorkspaceView when Bloom is first idle or when the user requests an update.
BloomFileLocator
BloomZipFile This just provides a convenient wrapper over a zipping library. It's not really specific to Bloom. To Use, create a BloomZipFile, add files and directories, then call Save().
BookThumbNailer This class is a place to gather the methods that have to do with making thumbnails of pages of books. Three of the methods were previously methods of Book itself, but the fourth (MakeThumbnailOfCover) needed to do too much UI stuff to belong in a model class, so it seemed worth pulling all this out to a new class. In live code there is typically only one instance of this created by the ApplicationServer. In test code they may be created as needed; nothing requires this to be a singleton. Indeed, it could be a static class except that it requires the HtmlThumbNailer.
Browser
Command
CopyCommand
CutCommand
DeletePageCommand
DuplicatePageCommand
ElementProxy Takes a Gecko element or an XmlElement, and then provides a few simple operations on the element so that the client doesn't have to know which it has. This is useful because it would be hard to introduce gecko elements in many simple unit tests.
Extensions
HelpLauncher
HtmlThumbNailer
HtmlThumbNailer.ThumbnailOptions
InstallerSupport Code to work with the Squirrel installer package. This package basically just installs and manages updating the appropriate files; thus, tasks like updating the registry must be done in the application, which is invoked with certain command-line arguments to request this. (However, Bloom sets up all the registry entries every time it is run, to support multi-channel installation with the most recently run version taking responsibility for opening files and handling downloads.)
IsolatedBrowser This class is the real implementation of IIsolatedBrowser. Keep this code as simple as possible since it can't adequately be tested.
NavigationIsolator This class is used to ensure that only one instance of GeckoWebBrowser is allowed to navigate at a time. We don't know for sure that this constraint is (or always will be) necessary, but at least as long as we're doing Application.DoEvents() in various places it's probably a good idea. See BL-77. It is designed for dependency-injection as an application-wide singleton. To achieve the purpose, all users of GeckoWebBrowser.Navigate must make use of the Navigate() or NavigateIfIdle() methods of this class to perform navigation. This class will serialize the navigations. Each navigation should occur eventually, except that if navigation is already in progress, NavigateIfIdle will just return false. This is intended for Idle loop tasks which should simply be attempted again later if the system is not really idle (since a navigation is in progress). Doing all this is challenging because the various possible events that might signal that navigation is complete are not reliable. Moreover it seems that the IsBusy flag (ReadyState, in later versions of Gecko) is also not reliable, and sometimes indicates that a browser is busy long after it has finished doing anything we recognize. We therefore use a timer to make sure we notice pretty soon if IsBusy becomes false without any of the events being raised. We will also notice at once that IsBusy has become false (or the target browser has been disposed) if a new request is received. As a last resort, rather than freeze the program or even the thumbnailing forever, if two seconds goes by and the browser is still busy doing one navigation we give up and forget that one and allow others to proceed.
NavigationTask
NonFatalProblem Provides a way to note a problem in the log and, depending on channel, notify the user.
Palette
PasteCommand
Program
ResolveShortcut
ResolveShortcut.WIN32_FIND_DATAW
RobustIO Provides a more robust version of various IO methods. The original intent of this class is to attempt to mitigate issues where we attempt IO but the file is locked by another application. Our theory is that some anti-virus software locks files while it scans them. There is a similar class in SIL.IO, but that handles more generic calls which would not require additional dependencies.
Shell
SourceCollectionsList
SplashScreen Make these 3 calls: CreateAndShow(), StayAboveThisWindow(), FadeAndClose()
TemplateInsertionCommand
ThumbnailOrder
UndoCommand
UpdateVersionTable This could maybe eventually go to https://github.com/hatton/NetSparkle. My hesitation is that it's kind of specific to our way of using TeamCity and our build scripts There are two levels of indirection here to give us maximum forward compatibility and control over what upgrades happen in what channels. First, we go use a url based on our channel ("http://bloomlibrary.org/channels/UpgradeTable{channel}.txt) to download a file. Then, in that file, we search for a row that matches our version number to decide which upgrades folder to use.
UpdateVersionTable.UpdateTableLookupResult
UrlPathString A wrapper around string designed to reduced bugs introduced by losing track of the encoded/unencoded state of a string. It does this by requiring users to specify what they are putting in/getting out, and it keeps track.
XmlHtmlConverter