Files
csharp/examples/yaml/Program.cs
Manuel Menegazzo f615b5b459 Fix some compilation warnings (#1010)
* Fixe some summary warning

* Fixed more warning

* Uniformed example projects code

* Uniformed test projects code

* Fix OperatingSystems enum and GenericType summaries
2022-09-15 16:21:21 -07:00

27 lines
673 B
C#

using k8s;
using k8s.Models;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace yaml
{
internal class Program
{
private static async Task Main(string[] args)
{
var typeMap = new Dictionary<String, Type>();
typeMap.Add("v1/Pod", typeof(V1Pod));
typeMap.Add("v1/Service", typeof(V1Service));
typeMap.Add("apps/v1/Deployment", typeof(V1Deployment));
var objects = await KubernetesYaml.LoadAllFromFileAsync(args[0], typeMap);
foreach (var obj in objects)
{
Console.WriteLine(obj);
}
}
}
}