C# Класс Controller.HtmlBuilder

Class used to generate the web front-end homepage. Uses a combination of files hosted externally from the Netduino, some templating fragments, and snippets for each active plugin
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddPlugin ( string _scriptName, PluginType _type ) : void

Add required js and html for a specific plugin to the index generator

Dispose ( ) : void
GenerateIndex ( ) : void

Write out the index.html file to be served

HtmlBuilder ( ) : System
HtmlBuilder ( bool _local ) : System

Constructor, initializes temp files and necessary paths.

When the HtmlBuilder is initialized, check for any temp files and remove them. This ensures that the index.htm file that is built doesn't have any errors from the previous runs

Приватные методы

Метод Описание
WritePlugins ( FileStream &_index, PluginType _type ) : bool

Write out the html for all of the plugins from their respective fragments

Описание методов

AddPlugin() публичный Метод

Add required js and html for a specific plugin to the index generator
public AddPlugin ( string _scriptName, PluginType _type ) : void
_scriptName string string containing the name of the plugins javascript files
_type PluginType class of plugin. Different classes require different placement in the homepage
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

GenerateIndex() публичный Метод

Write out the index.html file to be served
public GenerateIndex ( ) : void
Результат void

HtmlBuilder() публичный Метод

public HtmlBuilder ( ) : System
Результат System

HtmlBuilder() публичный Метод

Constructor, initializes temp files and necessary paths.
When the HtmlBuilder is initialized, check for any temp files and remove them. This ensures that the index.htm file that is built doesn't have any errors from the previous runs
public HtmlBuilder ( bool _local ) : System
_local bool Use local resources or web sourced?
Результат System