Files
csharp/gen/KubernetesGenerator/templates/Kubernetes.Watch.cs.template
Boshi Lian fb553c5c0d refactor generator code (#727)
* refactor generator code

* remove unused files

* dotnet fmt
2021-10-14 06:55:19 -07:00

42 lines
1.6 KiB
Plaintext

// <auto-generated>
// Code generated by https://github.com/kubernetes-client/csharp/tree/master/gen/KubernetesGenerator
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
using k8s.Models;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace k8s
{
public partial class Kubernetes
{
{{#.}}
/// <inheritdoc/>
public Task<Watcher<{{GetClassName operation}}>> {{GetMethodName operation}}(
{{#operation.actualParameters}}
{{#isRequired}}
{{GetDotNetType type name isRequired format}} {{GetDotNetName name}},
{{/isRequired}}
{{/operation.actualParameters}}
{{#operation.actualParameters}}
{{^isRequired}}
{{GetDotNetType .}} {{GetDotNetName .}} = null,
{{/isRequired}}
{{/operation.actualParameters}}
Dictionary<string, List<string>> customHeaders = null,
Action<WatchEventType, {{GetClassName operation}}> onEvent = null,
Action<Exception> onError = null,
Action onClosed = null,
CancellationToken cancellationToken = default(CancellationToken))
{
string path = $"{{GetPathExpression .}}";
return WatchObjectAsync<{{GetClassName operation}}>(path: path, @continue: continueParameter, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
{{/.}}
}
}