Skip to content
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.

TencentCloud/tcb-sdk-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudBase .NET SDK

Warning

DEPRECATED!

.NET SDK 已经停止维护,不推荐继续使用。您可以在 CloudBase 官网 查看当前支持的 SDK 文档。

介绍

CloudBase 提供开发应用所需服务和基础设施。CloudBase .NET SDK 让你可以在客户端访问 CloudBase 的服务。

安装

  • 打包 SDK
dotnet pack
  • 在你的项目里引入 SDK
cd your_project

dotnet nuget add source LocalPath // LocalPath是你保存 CloudBase Sdk 的路径

dotnet add package CloudBase

快速上手

using System.Threading.Tasks;
using System.Collections.Generic;
using CloudBase;

// 初始化
CloudBaseApp app = CloudBaseApp.Init("your-env-id", 3000);

// 匿名登录
AuthState state = await app.Auth.GetAuthStateAsync();
if (state == null) {
  await app.Auth.SignInAnonymouslyAsync();
}

// 调用云函数
var param = new Dictionary<string, dynamic>() { {"a", 1}, {"b", 2} };
FunctionResponse res = await app.Function.CallFunctionAsync("sum", param);

详细文档

Releases

No releases published

Packages

No packages published

Languages