Skip to content

Commit ddea816

Browse files
committed
style: format code
1 parent c445dc1 commit ddea816

File tree

14 files changed

+869
-869
lines changed

14 files changed

+869
-869
lines changed
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
using KubeOps.Abstractions.Finalizer;
2-
3-
using Operator.Entities;
4-
5-
namespace Operator.Finalizer;
6-
7-
public class FinalizerOne : IEntityFinalizer<V1TestEntity>
8-
{
9-
public Task FinalizeAsync(V1TestEntity entity)
10-
{
11-
return Task.CompletedTask;
12-
}
13-
}
1+
using KubeOps.Abstractions.Finalizer;
2+
3+
using Operator.Entities;
4+
5+
namespace Operator.Finalizer;
6+
7+
public class FinalizerOne : IEntityFinalizer<V1TestEntity>
8+
{
9+
public Task FinalizeAsync(V1TestEntity entity)
10+
{
11+
return Task.CompletedTask;
12+
}
13+
}
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
using KubeOps.Abstractions.Finalizer;
2-
3-
using Operator.Entities;
4-
5-
namespace Operator.Finalizer;
6-
7-
public class FinalizerTwo : IEntityFinalizer<V1TestEntity>
8-
{
9-
public Task FinalizeAsync(V1TestEntity entity)
10-
{
11-
return Task.CompletedTask;
12-
}
13-
}
1+
using KubeOps.Abstractions.Finalizer;
2+
3+
using Operator.Entities;
4+
5+
namespace Operator.Finalizer;
6+
7+
public class FinalizerTwo : IEntityFinalizer<V1TestEntity>
8+
{
9+
public Task FinalizeAsync(V1TestEntity entity)
10+
{
11+
return Task.CompletedTask;
12+
}
13+
}
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
using k8s;
2-
using k8s.Models;
3-
4-
namespace KubeOps.Abstractions.Finalizer;
5-
6-
/// <summary>
7-
/// <para>
8-
/// Injectable delegate for finalizers. This delegate is used to attach a finalizer
9-
/// with its identifier to an entity. When injected, simply call the delegate with
10-
/// the entity to attach the finalizer.
11-
/// </para>
12-
/// <para>
13-
/// As with other (possibly) mutating calls, use the returned entity for further
14-
/// modification and Kubernetes client interactions, since the resource version
15-
/// is updated each time the entity is modified.
16-
/// </para>
17-
/// </summary>
18-
/// <typeparam name="TImplementation">The type of the entity finalizer.</typeparam>
19-
/// <typeparam name="TEntity">The type of the Kubernetes entity.</typeparam>
20-
/// <param name="entity">The instance of the entity, that the finalizer is attached if needed.</param>
21-
/// <returns>A <see cref="Task"/> that resolves when the finalizer was attached.</returns>
22-
/// <example>
23-
/// <code>
24-
/// [EntityRbac(typeof(V1TestEntity), Verbs = RbacVerb.All)]
25-
/// public class V1TestEntityController : IEntityController&lt;V1TestEntity&gt;
26-
/// {
27-
/// private readonly EntityFinalizerAttacher&lt;FinalizerOne, V1TestEntity&gt; _finalizer1;
28-
///
29-
/// public V1TestEntityController(
30-
/// EntityFinalizerAttacher&lt;FinalizerOne, V1TestEntity&gt; finalizer1) => _finalizer1 = finalizer1;
31-
///
32-
/// public async Task ReconcileAsync(V1TestEntity entity)
33-
/// {
34-
/// entity = await _finalizer1(entity);
35-
/// }
36-
/// }
37-
/// </code>
38-
/// </example>
39-
public delegate Task<TEntity> EntityFinalizerAttacher<TImplementation, TEntity>(TEntity entity)
40-
where TImplementation : IEntityFinalizer<TEntity>
41-
where TEntity : IKubernetesObject<V1ObjectMeta>;
1+
using k8s;
2+
using k8s.Models;
3+
4+
namespace KubeOps.Abstractions.Finalizer;
5+
6+
/// <summary>
7+
/// <para>
8+
/// Injectable delegate for finalizers. This delegate is used to attach a finalizer
9+
/// with its identifier to an entity. When injected, simply call the delegate with
10+
/// the entity to attach the finalizer.
11+
/// </para>
12+
/// <para>
13+
/// As with other (possibly) mutating calls, use the returned entity for further
14+
/// modification and Kubernetes client interactions, since the resource version
15+
/// is updated each time the entity is modified.
16+
/// </para>
17+
/// </summary>
18+
/// <typeparam name="TImplementation">The type of the entity finalizer.</typeparam>
19+
/// <typeparam name="TEntity">The type of the Kubernetes entity.</typeparam>
20+
/// <param name="entity">The instance of the entity, that the finalizer is attached if needed.</param>
21+
/// <returns>A <see cref="Task"/> that resolves when the finalizer was attached.</returns>
22+
/// <example>
23+
/// <code>
24+
/// [EntityRbac(typeof(V1TestEntity), Verbs = RbacVerb.All)]
25+
/// public class V1TestEntityController : IEntityController&lt;V1TestEntity&gt;
26+
/// {
27+
/// private readonly EntityFinalizerAttacher&lt;FinalizerOne, V1TestEntity&gt; _finalizer1;
28+
///
29+
/// public V1TestEntityController(
30+
/// EntityFinalizerAttacher&lt;FinalizerOne, V1TestEntity&gt; finalizer1) => _finalizer1 = finalizer1;
31+
///
32+
/// public async Task ReconcileAsync(V1TestEntity entity)
33+
/// {
34+
/// entity = await _finalizer1(entity);
35+
/// }
36+
/// }
37+
/// </code>
38+
/// </example>
39+
public delegate Task<TEntity> EntityFinalizerAttacher<TImplementation, TEntity>(TEntity entity)
40+
where TImplementation : IEntityFinalizer<TEntity>
41+
where TEntity : IKubernetesObject<V1ObjectMeta>;
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
using k8s;
2-
using k8s.Models;
3-
4-
namespace KubeOps.Abstractions.Finalizer;
5-
6-
/// <summary>
7-
/// Finalizer for an entity.
8-
/// </summary>
9-
/// <typeparam name="TEntity">The type of the entity.</typeparam>
10-
public interface IEntityFinalizer<in TEntity>
11-
where TEntity : IKubernetesObject<V1ObjectMeta>
12-
{
13-
/// <summary>
14-
/// Finalize an entity that is pending for deletion.
15-
/// </summary>
16-
/// <param name="entity">The kubernetes entity that needs to be finalized.</param>
17-
/// <returns>A task that resolves when the operation is done.</returns>
18-
Task FinalizeAsync(TEntity entity);
19-
}
1+
using k8s;
2+
using k8s.Models;
3+
4+
namespace KubeOps.Abstractions.Finalizer;
5+
6+
/// <summary>
7+
/// Finalizer for an entity.
8+
/// </summary>
9+
/// <typeparam name="TEntity">The type of the entity.</typeparam>
10+
public interface IEntityFinalizer<in TEntity>
11+
where TEntity : IKubernetesObject<V1ObjectMeta>
12+
{
13+
/// <summary>
14+
/// Finalize an entity that is pending for deletion.
15+
/// </summary>
16+
/// <param name="entity">The kubernetes entity that needs to be finalized.</param>
17+
/// <returns>A task that resolves when the operation is done.</returns>
18+
Task FinalizeAsync(TEntity entity);
19+
}

0 commit comments

Comments
 (0)