expose watch to classic (#1166)

This commit is contained in:
Boshi Lian
2023-01-05 09:13:59 -08:00
committed by GitHub
parent 6b104a5a78
commit 524aef7069
3 changed files with 6 additions and 4 deletions

View File

@@ -2,3 +2,4 @@ global using System;
global using System.Collections.Generic; global using System.Collections.Generic;
global using System.Linq; global using System.Linq;
global using System.Text.Json; global using System.Text.Json;
global using System.Text.Json.Serialization;

View File

@@ -9,6 +9,7 @@
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" /> <PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.1" /> <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.1" />
<PackageReference Include="IdentityModel.OidcClient" Version="5.2.1" /> <PackageReference Include="IdentityModel.OidcClient" Version="5.2.1" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -42,6 +43,10 @@
<Compile Include="..\KubernetesClient\IKubernetes.Exec.cs" /> <Compile Include="..\KubernetesClient\IKubernetes.Exec.cs" />
<Compile Include="..\KubernetesClient\Kubernetes.Exec.cs" /> <Compile Include="..\KubernetesClient\Kubernetes.Exec.cs" />
<Compile Include="..\KubernetesClient\Watcher.cs" />
<Compile Include="..\KubernetesClient\WatcherExt.cs" />
<Compile Include="..\KubernetesClient\LineSeparatedHttpContent.cs" />
<Compile Include="..\KubernetesClient\Exceptions\KubeConfigException.cs" /> <Compile Include="..\KubernetesClient\Exceptions\KubeConfigException.cs" />
<Compile Include="..\KubernetesClient\Exceptions\KubernetesClientException.cs" /> <Compile Include="..\KubernetesClient\Exceptions\KubernetesClientException.cs" />

View File

@@ -76,11 +76,7 @@ namespace k8s
if (watch == true) if (watch == true)
{ {
#if NETSTANDARD2_0 || NET48
throw new KubernetesException("watch not supported");
#else
httpResponse.Content = new LineSeparatedHttpContent(httpResponse.Content, cancellationToken); httpResponse.Content = new LineSeparatedHttpContent(httpResponse.Content, cancellationToken);
#endif
} }
try try