csharp Program.cs中

Posted

tags:

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

using System;
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["api_key"] = "special-key";

            //Pass the config through the api ctor
            var storeApi = new StoreApi(clientConfig);
            //Call the Api
            var inventory = storeApi.GetInventory();
            foreach (var type in inventory)
            {
                Console.WriteLine(type.Key + ": "+ type.Value);
            }           

            Console.ReadKey();
        }
    }
}

以上是关于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