Files
csharp/gen/KubernetesWatchGenerator/Kubernetes.Watch.cs.template
Boshi Lian 8e7bf0b6f2 Stylecop (#428)
* add auto generate header

* run gen

* introduce first style analyizer

* fix tab
2020-04-22 13:41:45 -07:00

42 lines
1.6 KiB
Plaintext

// <auto-generated>
// Code generated by gen/KubernetesWatchGenerator
// 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}} {{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: @continue, fieldSelector: fieldSelector, labelSelector: labelSelector, limit: limit, pretty: pretty, timeoutSeconds: timeoutSeconds, resourceVersion: resourceVersion, customHeaders: customHeaders, onEvent: onEvent, onError: onError, onClosed: onClosed, cancellationToken: cancellationToken);
}
{{/.}}
}
}