THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

docs: update sample and readme

pull/111/head
catcherwong 1 month ago
parent
commit
eae5fe8f18
  1. 4
      README.md
  2. 4
      README.zh-cn.md
  3. 8
      samples/MsConfigApp/Program.cs
  4. 2
      samples/MsConfigApp/appsettings.json

4
README.md

@ -1,4 +1,4 @@
# nacos-sdk-csharp             [中文](./README.zh-cn.md)
# nacos-sdk-csharp             [中文](./README.zh-cn.md)
csharp(dotnet core) implementation of [nacos](https://nacos.io/) OpenAPI.
@ -71,7 +71,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
"Group": "DEFAULT_GROUP"
}
],
"Tenant": "csharp-demo",
"Namespace": "csharp-demo",
"ServerAddresses": [ "http://localhost:8848/" ],
"UserName": "test2",
"Password": "123456",

4
README.zh-cn.md

@ -1,4 +1,4 @@
# nacos-sdk-csharp             [English](./README.md)
# nacos-sdk-csharp             [English](./README.md)
基于C#(dotnet core)实现 [nacos](https://nacos.io/) OpenAPI 的官方版本
@ -72,7 +72,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
"Group": "DEFAULT_GROUP"
}
],
"Tenant": "csharp-demo",
"Namespace": "csharp-demo",
"ServerAddresses": [ "http://localhost:8848/" ],
"UserName": "test2",
"Password": "123456",

8
samples/MsConfigApp/Program.cs

@ -1,4 +1,4 @@
namespace MsConfigApp
namespace MsConfigApp
{
using System.Collections.Generic;
using Microsoft.AspNetCore.Hosting;
@ -53,7 +53,7 @@ namespace MsConfigApp
var dataId = c.GetValue<string>("NacosConfig:DataId");
var group = c.GetValue<string>("NacosConfig:Group");
var tenant = c.GetValue<string>("NacosConfig:Tenant");
var @namespace = c.GetValue<string>("NacosConfig:Namespace");
var optional = c.GetValue<bool>("NacosConfig:Optional");
var serverAddresses = c.GetSection("NacosConfig:ServerAddresses").Get<List<string>>();
@ -71,7 +71,7 @@ namespace MsConfigApp
{
x.DataId = dataId;
x.Group = group;
x.Tenant = tenant;
x.Namespace = @namespace;
x.Optional = optional;
x.ServerAddresses = serverAddresses;
});*/
@ -82,4 +82,4 @@ namespace MsConfigApp
})
.UseSerilog();
}
}
}

2
samples/MsConfigApp/appsettings.json

@ -15,7 +15,7 @@
"Optional": false,
"DataId": "demo",
"Group": "DEFAULT_GROUP",
"Tenant": "cs",
"Namespace": "cs",
"ServerAddresses": [ "http://localhost:8848/" ],
"UserName": "",
"Password": "",

Loading…
Cancel
Save