createSimbotApplication
suspend fun <Config : ApplicationConfiguration, Builder : ApplicationBuilder<A>, A : Application> createSimbotApplication(factory: ApplicationFactory<Config, Builder, A>, configurator: Config.() -> Unit = {}, builder: suspend Builder.(Config) -> Unit = {}): A(source)
构建并启用一个 Application.
e.g.
不进行配置:
val app = createSimbotApplication(Tar)
app.join() // suspend join
Content copied to clipboard
配置builder:
val app = createSimbotApplication(Foo) {
// build...
}
app.join() // suspend join
Content copied to clipboard
配置config和builder:
val app = createSimbotApplication(Bar, {
// config...
}) {
// build..
}
app.join() // suspend join
Content copied to clipboard