Skip to content

Commit 524aef7

Browse files
authoredJan 5, 2023
expose watch to classic (#1166)
1 parent 6b104a5 commit 524aef7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed
 

‎src/KubernetesClient.Classic/Global.cs

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
global using System.Collections.Generic;
33
global using System.Linq;
44
global using System.Text.Json;
5+
global using System.Text.Json.Serialization;

‎src/KubernetesClient.Classic/KubernetesClient.Classic.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
1010
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.1" />
1111
<PackageReference Include="IdentityModel.OidcClient" Version="5.2.1" />
12+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
1213
</ItemGroup>
1314

1415
<ItemGroup>
@@ -42,6 +43,10 @@
4243
<Compile Include="..\KubernetesClient\IKubernetes.Exec.cs" />
4344
<Compile Include="..\KubernetesClient\Kubernetes.Exec.cs" />
4445

46+
<Compile Include="..\KubernetesClient\Watcher.cs" />
47+
<Compile Include="..\KubernetesClient\WatcherExt.cs" />
48+
<Compile Include="..\KubernetesClient\LineSeparatedHttpContent.cs" />
49+
4550
<Compile Include="..\KubernetesClient\Exceptions\KubeConfigException.cs" />
4651
<Compile Include="..\KubernetesClient\Exceptions\KubernetesClientException.cs" />
4752

‎src/KubernetesClient/Kubernetes.cs

-4
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ protected override async Task<HttpOperationResponse<T>> CreateResultAsync<T>(Htt
7676

7777
if (watch == true)
7878
{
79-
#if NETSTANDARD2_0 || NET48
80-
throw new KubernetesException("watch not supported");
81-
#else
8279
httpResponse.Content = new LineSeparatedHttpContent(httpResponse.Content, cancellationToken);
83-
#endif
8480
}
8581

8682
try

0 commit comments

Comments
 (0)
Please sign in to comment.