Class HiNcHost
Host class for HiNC functionality that provides project management, path resolution, and MongoDB integration.
public class HiNcHost : IDisposable
- Inheritance
-
HiNcHost
- Implements
- Inherited Members
- Extension Methods
Constructors
HiNcHost(string, int, string)
public HiNcHost(string adminDirectory, int mongodbPort, string displayEngineFontFile)
Parameters
adminDirectory
stringmongodbPort
intdisplayEngineFontFile
stringThe default value will be alternative if the value is null.
Fields
HiNcUserDbMetaName
Gets the name of the HiNC user database metadata.
public const string HiNcUserDbMetaName = "UserDbMeta"
Field Value
HiNcUserDbName
Gets the name of the HiNC user database.
public const string HiNcUserDbName = "HiNcUserDb"
Field Value
Properties
AdminDir
Admin absolute directory.
public string AdminDir { get; }
Property Value
AdminExtendedNamedPath
Gets the admin extended named path.
public ExtendedNamedPath AdminExtendedNamedPath { get; }
Property Value
AdminNamedPath
Gets the admin named path.
public NamedPath AdminNamedPath { get; }
Property Value
CacheDbId
Gets the cache database ID.
public static string CacheDbId { get; set; }
Property Value
DirectoryRoute
The BaseDirectory is admin directory. The SubDirectory is current applied project directory.
public BaseAndSubDirectory DirectoryRoute { get; }
Property Value
MachiningProject
Gets the current MachiningProject instance.
public MachiningProject MachiningProject { get; }
Property Value
MongoServer
Gets the main MongoDB runner.
public IMongoRunner MongoServer { get; }
Property Value
ProjectDir
Project Absolute Directory.
public string ProjectDir { get; }
Property Value
ProjectExtendedNamedPath
Gets the project extended named path.
public ExtendedNamedPath ProjectExtendedNamedPath { get; }
Property Value
ProjectNamedPath
Gets the project named path.
public NamedPath ProjectNamedPath { get; }
Property Value
ProjectPathRoute
Gets the project path route.
public PathRoute ProjectPathRoute { get; }
Property Value
ProjectRelativeDirectory
Gets the relative project directory path.
public string ProjectRelativeDirectory { get; }
Property Value
ResourceDir
Resource absolute directory.
public string ResourceDir { get; }
Property Value
ResourceExtendedNamedPath
Gets the resource extended named path.
public ExtendedNamedPath ResourceExtendedNamedPath { get; }
Property Value
ResourceNamedPath
Gets the resource named path.
public NamedPath ResourceNamedPath { get; }
Property Value
ResourceRelDir
Relative directory from AdminDir for resource.
public string ResourceRelDir { get; set; }
Property Value
Methods
CloseProject()
Closes the current project.
public Task CloseProject()
Returns
- Task
A task representing the asynchronous operation
CopyResourceIfNotExisted()
Copies resources if they don't already exist in the target location.
public void CopyResourceIfNotExisted()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
GetExtendedNamedPathByNamePath(string)
Gets an extended named path by its name path.
public ExtendedNamedPath GetExtendedNamedPathByNamePath(string namePath)
Parameters
namePath
stringThe name path to look up.
Returns
- ExtendedNamedPath
The extended named path for the specified name path, or null if not found.
GetExtendedNamedPathByPath(string)
Gets an extended named path by its path.
public ExtendedNamedPath GetExtendedNamedPathByPath(string path)
Parameters
path
stringThe path to look up.
Returns
- ExtendedNamedPath
The extended named path with the specified path, or null if not found.
GetExtendedNamedPathByUriPara(string)
GetExtendedNamedPath By blazor page parameter.
public ExtendedNamedPath GetExtendedNamedPathByUriPara(string uriPara)
Parameters
uriPara
string
Returns
GetExtendedNamedPathList(params BasePathEnum[])
Gets a list of extended named paths for the specified base path types.
public List<ExtendedNamedPath> GetExtendedNamedPathList(params BasePathEnum[] basePathEnums)
Parameters
basePathEnums
BasePathEnum[]The base path types to include.
Returns
- List<ExtendedNamedPath>
A list of extended named paths.
GetNamedPathByName(string)
Gets a named path by its name.
public NamedPath GetNamedPathByName(string name)
Parameters
name
stringThe name of the path to retrieve
Returns
- NamedPath
The named path with the specified name, or null if not found
GetNamedPathByPath(string)
Gets a named path by its path.
public NamedPath GetNamedPathByPath(string path)
Parameters
path
stringThe path to look up.
Returns
- NamedPath
The named path with the specified path, or null if not found.
GetNamedPathList(params BasePathEnum[])
Gets a list of named paths for the specified base path types.
public List<NamedPath> GetNamedPathList(params BasePathEnum[] basePathEnums)
Parameters
basePathEnums
BasePathEnum[]The base path types to include.
Returns
LoadProjectByRelativePath(string)
Loads a project from the specified relative file path.
public Task LoadProjectByRelativePath(string relativeFilePathFromAdminRoot)
Parameters
relativeFilePathFromAdminRoot
stringThe relative file path from the admin directory root
Returns
- Task
A task representing the asynchronous operation
NewProjectByRelFile(string)
Creates a new project from a relative file path.
public void NewProjectByRelFile(string relFilePath)
Parameters
relFilePath
stringThe relative file path from the admin directory
ReloadProject()
Reloads the current project.
public Task ReloadProject()
Returns
- Task
A task representing the asynchronous operation
SaveAsProject(string)
Saves the current project to a specified relative file path.
public void SaveAsProject(string relativeFilePathFromAdminRoot)
Parameters
relativeFilePathFromAdminRoot
stringThe relative file path from the admin directory root
SaveProject()
Save project by ProjectPathRoute.
public void SaveProject()
ShowMessageBoard(string, string, BootstrapTheme)
Shows a message board with specified title, message and theme.
public void ShowMessageBoard(string title, string message, BootstrapTheme bootstrapThemeColor)
Parameters
title
stringThe title of the message board
message
stringThe message to display
bootstrapThemeColor
BootstrapThemeThe bootstrap theme color for the message board
Events
OnMachiningProjectDisposing
Event raised when the MachiningProject is about to be disposed.
public event Func<MachiningProject, Task> OnMachiningProjectDisposing
Event Type
OnShownMessageBoard
Event raised when a message board is shown.
public event ShowMessageBoardDelegate OnShownMessageBoard