元編程參考文件

Ol'ista 網站構建器

16 個節點

本頁內容 16

建立目錄瀏覽功能

函數

此節點沒有文件說明。

簽名
建立目錄瀏覽功能 -> Directory Browser Capability
    根資料夾: 文字
    請求路徑: 文字
    提供檔案: 真否
    提供預設檔案: 真否
    提供未知型別的檔案: 真否
DirectoryBrowserCapability CreateDirectoryBrowserCapability(
    string rootFolder,
    string requestPath = "",
    bool serveFiles = true,
    bool serveDefaultFiles = false,
    bool serveUnknownFileTypes = false)

參數

名稱型別預設值說明
根資料夾文字—
請求路徑文字—
提供檔案真否True
提供預設檔案真否False
提供未知型別的檔案真否False

返回

結果Directory Browser Capability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

建立目錄服務功能

函數

此節點沒有文件說明。

簽名
建立目錄服務功能 -> DirectoryServiceCapability
    根資料夾: 文字
    請求路徑: 文字
    需要登入: 真否
    使用者名稱: 文字
    密碼: 文字
    提供檔案: 真否
DirectoryServiceCapability CreateDirectoryServiceCapability(
    string rootFolder,
    string requestPath = "/directory",
    bool requireLogin = false,
    string username,
    string password,
    bool serveFiles = true)

參數

名稱型別預設值說明
根資料夾文字—
請求路徑文字/directory
需要登入真否False
使用者名稱文字—
密碼文字—
提供檔案真否True

返回

結果DirectoryServiceCapability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

建立 FTP 伺服器功能

函數

此節點沒有文件說明。

簽名
建立 FTP 伺服器功能 -> FTPServerCapability
    根資料夾: 文字
    地址: 文字
    埠: 整數
FTPServerCapability CreateFTPServerCapability(
    string rootFolder,
    string address = "127.0.0.1",
    int port = 21)

參數

名稱型別預設值說明
根資料夾文字—
地址文字127.0.0.1
埠整數21

返回

結果FTPServerCapability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

建立即時聊天功能

函數

此節點沒有文件說明。

簽名
建立即時聊天功能 -> RealtimeChatCapability
    需要身份驗證: 真否
    WebSocket 路徑: 文字
    API 路徑: 文字
RealtimeChatCapability CreateRealtimeChatCapability(
    bool requireAuthentication = false,
    string webSocketPath = "/chat/ws",
    string apiPath = "/chat/api")

參數

名稱型別預設值說明
需要身份驗證真否False
WebSocket 路徑文字/chat/ws
API 路徑文字/chat/api

返回

結果RealtimeChatCapability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

建立安全靜態頁面功能

函數

此節點沒有文件說明。

簽名
建立安全靜態頁面功能 -> SecureStaticPagesCapability
    根資料夾: 文字
    請求路徑: 文字
    登入頁路徑: 文字
SecureStaticPagesCapability CreateSecureStaticPagesCapability(
    string rootFolder,
    string requestPath = "/app",
    string loginPagePath = "/login")

參數

名稱型別預設值說明
根資料夾文字—
請求路徑文字/app
登入頁路徑文字/login

返回

結果SecureStaticPagesCapability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

建立伺服器

函數

此節點沒有文件說明。

過載 1/2

簽名
建立伺服器(功能: WebServerCapability 陣列) -> Service Configuration
OilstaWebsiteBuilder.ServiceConfiguration CreateServer(WebServerCapability[] capabilities)

參數

名稱型別預設值說明
功能WebServerCapability 陣列—

返回

結果Service Configuration

過載 2/2

簽名
建立伺服器 -> Service Configuration
    功能: WebServerCapability 陣列
    地址: 文字
    埠: 可選整數
OilstaWebsiteBuilder.ServiceConfiguration CreateServer(
    WebServerCapability[] capabilities,
    string address = "0.0.0.0",
    int? port = 5055)

參數

名稱型別預設值說明
功能WebServerCapability 陣列—
地址文字0.0.0.0
埠可選整數5055

返回

結果Service Configuration
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

建立靜態檔案功能

函數

此節點沒有文件說明。

簽名
建立靜態檔案功能 -> Static File Capability
    根資料夾: 文字
    提供預設檔案: 真否
    啟用目錄瀏覽: 真否
StaticFileCapability CreateStaticFileCapability(
    string rootFolder,
    bool serveDefaultFiles = true,
    bool enableDirectoryBrowser = false)

參數

名稱型別預設值說明
根資料夾文字—
提供預設檔案真否True
啟用目錄瀏覽真否False

返回

結果Static File Capability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

建立使用者登入功能

函數

此節點沒有文件說明。

簽名
建立使用者登入功能 -> UserLoginCapability
    儲存提供者: IAuthUserAccountStorageProvider
    登入方式: UserLoginScheme
    頁面樣式: UserLoginPageStyle
    允許註冊: 真否
    登入頁路徑: 文字
    註冊頁路徑: 文字
    成功後跳轉頁路徑: 文字
UserLoginCapability CreateUserLoginCapability(
    IAuthUserAccountStorageProvider storageProvider,
    UserLoginScheme loginScheme = UserLoginScheme.EmailUsernamePassword,
    UserLoginPageStyle pageStyle = UserLoginPageStyle.PageWise,
    bool allowRegister = true,
    string loginPagePath = "/login",
    string registerPagePath = "/register",
    string successRedirectPagePath = "/app")

參數

名稱型別預設值說明
儲存提供者IAuthUserAccountStorageProvider—
登入方式UserLoginScheme郵箱、使用者名稱與密碼
頁面樣式UserLoginPageStyle多頁面
允許註冊真否True
登入頁路徑文字/login
註冊頁路徑文字/register
成功後跳轉頁路徑文字/app

返回

結果UserLoginCapability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

建立 Web API 功能

函數

此節點沒有文件說明。

簽名
建立 Web API 功能 -> Minimal Web API Capability
    方法: EndpointMethod
    端點: 文字
    處理函數: Endpoint Handler
MinimalWebAPICapability CreateWebAPICapability(
    EndpointMethod method,
    string endpoint,
    EndpointHandler handler)

參數

名稱型別預設值說明
方法EndpointMethod—
端點文字—
處理函數Endpoint Handler—

返回

結果Minimal Web API Capability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

對映端點

函數

過載 1/2

簽名
對映端點 -> Minimal Web API Capability
    方法: EndpointMethod
    端點: 文字
    處理函數: Delegate
MinimalWebAPICapability MapEndpoint(
    EndpointMethod method,
    string endpoint,
    Delegate handler)

An endpoint answered by any function - one of the document's own graphs, Routine or Function - whose inputs are filled from the request by name, the way an ASP.NET Core minimal API fills a lambda's parameters.

參數

名稱型別預設值說明
方法EndpointMethod—GET, POST, PUT or DELETE.
端點文字—The route, with any values in braces: /todos/{id}.
處理函數Delegate—The function that answers - graph:Name for one of this document's graphs.

返回

功能Minimal Web API Capability

過載 2/2

簽名
對映端點 -> Minimal Web API Capability
    功能: Minimal Web API Capability
    方法: EndpointMethod
    端點: 文字
    處理函數: Delegate
MinimalWebAPICapability MapEndpoint(
    MinimalWebAPICapability capability,
    EndpointMethod method,
    string endpoint,
    Delegate handler)

The same capability with one more endpoint answered by any function, its inputs bound from the request by name - see the other Map Endpoint.

參數

名稱型別預設值說明
功能Minimal Web API Capability—
方法EndpointMethod—
端點文字—
處理函數Delegate—

返回

功能Minimal Web API Capability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

提供服務

函數

過載 1/2

簽名
提供服務(伺服器: Service Configuration)
void Serve(OilstaWebsiteBuilder.ServiceConfiguration server)

This blocks the executing thread until the server is shut down - when the program ends, or when the run it belongs to is stopped.

參數

名稱型別預設值說明
伺服器Service Configuration—

過載 2/2

簽名
提供服務(功能: WebServerCapability 陣列, 地址: 文字, 埠: 整數)
void Serve(
    WebServerCapability[] capabilities,
    string address = "0.0.0.0",
    int port = 5055)

This blocks the executing thread.

參數

名稱型別預設值說明
功能WebServerCapability 陣列—Server capabilities.
地址文字0.0.0.0
埠整數5055Port for HTTP services.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

啟動

函數

Starts a server and returns while it runs, so the rest of the program can use it - call it, test it, show its address - and then stop it.

簽名
啟動 -> Running Server
    伺服器: Service Configuration
    最長秒數: 數字
RunningServer Start(
    OilstaWebsiteBuilder.ServiceConfiguration server,
    double maxSeconds = 60)

參數

名稱型別預設值說明
伺服器Service Configuration—The capabilities, and where to answer.
最長秒數數字60The longest the server may run before it stops on its own, in seconds.

返回

伺服器Running Server
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

停止

函數

Stops a server OilstaWebsiteBuilder.Start started, and releases its port. Stopping one that has already stopped does nothing.

簽名
停止(伺服器: Running Server)
void Stop(RunningServer server)

參數

名稱型別預設值說明
伺服器Running Server—The running server.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

設定地址

函數

此節點沒有文件說明。

簽名
設定地址 -> FTPServerCapability
    功能: FTPServerCapability
    地址: 文字
FTPServerCapability WithAddress(
    FTPServerCapability capability,
    string address = "127.0.0.1")

參數

名稱型別預設值說明
功能FTPServerCapability—
地址文字127.0.0.1

返回

結果FTPServerCapability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

設定端點

函數

此節點沒有文件說明。

簽名
設定端點 -> Minimal Web API Capability
    功能: Minimal Web API Capability
    方法: EndpointMethod
    端點: 文字
    處理函數: Endpoint Handler
MinimalWebAPICapability WithEndpoint(
    MinimalWebAPICapability capability,
    EndpointMethod method,
    string endpoint,
    EndpointHandler handler)

參數

名稱型別預設值說明
功能Minimal Web API Capability—
方法EndpointMethod—
端點文字—
處理函數Endpoint Handler—

返回

結果Minimal Web API Capability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用

設定根資料夾

函數

此節點沒有文件說明。

簽名
設定根資料夾 -> Static File Capability
    功能: Static File Capability
    根資料夾: 文字
StaticFileCapability WithRootFolder(
    StaticFileCapability capability,
    string rootFolder)

參數

名稱型別預設值說明
功能Static File Capability—
根資料夾文字—

返回

結果Static File Capability
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
Ol'ista 網站構建器
所屬包
網路應用