Interface IClosableLibraryState
Defines an interface for closable library states. A library state is closable if it requires specific closing actions.
Namespace: Juhta.Net.LibraryManagement
Assembly: Juhta.Net.LibraryManagement.dll
Syntax
public interface IClosableLibraryState
Methods
| Improve this Doc View SourceClose(Boolean)
Closes the library state, that is, performs required closing actions to release the library state resources gracefully.
Declaration
bool Close(bool final)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | final | Specifies whether this call is the final call on this method. If true, the current library state instance is the last instance, and the application is shutting down. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the library state was closed without errors, or false if at least one error occurred in the closing process. |
Remarks
This method should not throw exceptions. It is recommended that, in case of an error, the error is logged and the closing process is continued for the rest of the closing actions. In other words, the method should close the library state as completely as possible.
This method will be called even if the initialization process of the library state has failed. This means that the method should prepare for such situation where the library state is not initialized at all or initialized only partially.