csharp Program.cs中

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp Program.cs中相关的知识,希望对你有一定的参考价值。

using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace SwaggerClientTest
{
    class Program
    {
        static void Main(string[] args)
        {
            //Create a new instance
            var clientConfig = new Configuration();
            //Add the key to the Authorization header
            clientConfig.ApiKey["Authorization"] = "{Some token value}";
            //Add the key prefix (if one is to be used)
            clientConfig.ApiKeyPrefix["Authorization"] = "Bearer";

            //Pass the config through the api ctor
            var petApi = new PetApi(clientConfig);
            //Call the Api
            Pet pet = petApi.GetPetById(1);
        }
    }
}

以上是关于csharp Program.cs中的主要内容,如果未能解决你的问题,请参考以下文章

csharp Program.cs中

csharp Program.cs中

csharp Program.cs中

csharp Async C#program.cs

csharp JiraClientTest.Program.cs

csharp 在Program.cs中设置appsettings