-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
uid: Guides.QuickReference.Startup.Pipe | ||
title: Pipe 客户端 | ||
--- | ||
|
||
# Pipe 客户端 | ||
|
||
预声明变量 | ||
|
||
```csharp | ||
readonly KookPipeClient _pipeClient; | ||
``` | ||
|
||
```csharp | ||
string accessToken; // 管道访问令牌 | ||
Uri pipeUrl; // 管道回调地址 | ||
// 使用访问令牌及默认配置创建 Pipe 客户端 | ||
_pipeClient = new KookPipeClient(accessToken); | ||
// 使用回调地址及默认配置创建 Pipe 客户端 | ||
_pipeClient = new KookPipeClient(pipeUrl); | ||
// 使用访问令牌及自定义配置创建 Pipe 客户端 | ||
_pipeClient = new KookPipeClient(accessToken, new KookRestConfig | ||
{ | ||
// KookRestConfig 的全部配置项参见 Rest 客户端页面 | ||
}); | ||
// 使用回调地址及自定义配置创建 Pipe 客户端 | ||
_pipeClient = new KookPipeClient(pipeUrl, new KookRestConfig | ||
{ | ||
// KookRestConfig 的全部配置项参见 Rest 客户端页面 | ||
}); | ||
|
||
// Pipe 客户端不实现 IKookClient 接口,创建即登录 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters