From 5fe3a1903bebd30d0ec56da049b8595e8c495a50 Mon Sep 17 00:00:00 2001 From: Jan Trejbal Date: Wed, 18 Oct 2023 22:23:38 +0200 Subject: [PATCH] Fix CodeStyle --- src/DockerComposeBuilder/Builders/Base/BaseBuilder.cs | 2 +- src/DockerComposeBuilder/Builders/Base/BuilderBase.cs | 2 +- src/DockerComposeBuilder/Builders/ComposeBuilder.cs | 2 +- src/DockerComposeBuilder/Builders/DeployBuilder.cs | 2 +- src/DockerComposeBuilder/Builders/MapBuilder.cs | 2 +- src/DockerComposeBuilder/Builders/NetworkBuilder.cs | 2 +- src/DockerComposeBuilder/Builders/SecretBuilder.cs | 2 +- src/DockerComposeBuilder/Builders/ServiceBuilder.cs | 2 +- src/DockerComposeBuilder/Builders/SwarmServiceBuilder.cs | 2 +- src/DockerComposeBuilder/Builders/VolumeBuilder.cs | 2 +- src/DockerComposeBuilder/Emitters/FlowStringEnumConverter.cs | 2 +- .../Emitters/FlowStyleStringSequences.cs | 2 +- .../Emitters/ForceQuotedStringValuesEventEmitter.cs | 2 +- .../Emitters/QuoteSurroundingEventEmitter.cs | 2 +- .../Emitters/YamlIEnumerableSkipEmptyObjectGraphVisitor.cs | 2 +- src/DockerComposeBuilder/Enums/EReplicationMode.cs | 2 +- src/DockerComposeBuilder/Enums/ERestartMode.cs | 2 +- src/DockerComposeBuilder/Extensions/ComposeExtensions.cs | 2 +- src/DockerComposeBuilder/Interfaces/IObject.cs | 2 +- src/DockerComposeBuilder/Model/Base/ObjectBase.cs | 5 ++--- src/DockerComposeBuilder/Model/Compose.cs | 2 +- src/DockerComposeBuilder/Model/HealthCheck.cs | 2 +- src/DockerComposeBuilder/Model/Map.cs | 2 +- src/DockerComposeBuilder/Model/Network.cs | 2 +- src/DockerComposeBuilder/Model/PlacementPreferences.cs | 2 +- src/DockerComposeBuilder/Model/Secret.cs | 3 +-- src/DockerComposeBuilder/Model/Service.cs | 2 +- src/DockerComposeBuilder/Model/Services/Deploy.cs | 2 +- src/DockerComposeBuilder/Model/Services/Port.cs | 2 +- src/DockerComposeBuilder/Model/Volume.cs | 2 +- 30 files changed, 31 insertions(+), 33 deletions(-) diff --git a/src/DockerComposeBuilder/Builders/Base/BaseBuilder.cs b/src/DockerComposeBuilder/Builders/Base/BaseBuilder.cs index 2d2aa9b..10bfef6 100644 --- a/src/DockerComposeBuilder/Builders/Base/BaseBuilder.cs +++ b/src/DockerComposeBuilder/Builders/Base/BaseBuilder.cs @@ -22,4 +22,4 @@ public virtual TObjectType Build() { return WorkingObject; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Builders/Base/BuilderBase.cs b/src/DockerComposeBuilder/Builders/Base/BuilderBase.cs index a946b0b..032c5ac 100644 --- a/src/DockerComposeBuilder/Builders/Base/BuilderBase.cs +++ b/src/DockerComposeBuilder/Builders/Base/BuilderBase.cs @@ -41,4 +41,4 @@ public TObjectType Build() { return WorkingObject; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Builders/ComposeBuilder.cs b/src/DockerComposeBuilder/Builders/ComposeBuilder.cs index 07634ab..176f497 100644 --- a/src/DockerComposeBuilder/Builders/ComposeBuilder.cs +++ b/src/DockerComposeBuilder/Builders/ComposeBuilder.cs @@ -112,4 +112,4 @@ public ComposeBuilder WithSecrets(params Secret[] secrets) return this; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Builders/DeployBuilder.cs b/src/DockerComposeBuilder/Builders/DeployBuilder.cs index be1e42c..b3a726c 100644 --- a/src/DockerComposeBuilder/Builders/DeployBuilder.cs +++ b/src/DockerComposeBuilder/Builders/DeployBuilder.cs @@ -71,4 +71,4 @@ public DeployBuilder WithResources(Action resources) WorkingObject.Resources = mb.Build(); return this; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Builders/MapBuilder.cs b/src/DockerComposeBuilder/Builders/MapBuilder.cs index 2c36022..31fb863 100644 --- a/src/DockerComposeBuilder/Builders/MapBuilder.cs +++ b/src/DockerComposeBuilder/Builders/MapBuilder.cs @@ -8,4 +8,4 @@ public class MapBuilder : BuilderBase internal MapBuilder() { } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Builders/NetworkBuilder.cs b/src/DockerComposeBuilder/Builders/NetworkBuilder.cs index 97d52d6..a26df44 100644 --- a/src/DockerComposeBuilder/Builders/NetworkBuilder.cs +++ b/src/DockerComposeBuilder/Builders/NetworkBuilder.cs @@ -13,4 +13,4 @@ public NetworkBuilder SetExternal(bool isExternal) { return WithProperty("external", isExternal); } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Builders/SecretBuilder.cs b/src/DockerComposeBuilder/Builders/SecretBuilder.cs index 445c95f..264c1ee 100644 --- a/src/DockerComposeBuilder/Builders/SecretBuilder.cs +++ b/src/DockerComposeBuilder/Builders/SecretBuilder.cs @@ -18,4 +18,4 @@ public SecretBuilder SetExternal(bool isExternal) { return WithProperty("external", isExternal); } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Builders/ServiceBuilder.cs b/src/DockerComposeBuilder/Builders/ServiceBuilder.cs index c317c82..7647dfc 100644 --- a/src/DockerComposeBuilder/Builders/ServiceBuilder.cs +++ b/src/DockerComposeBuilder/Builders/ServiceBuilder.cs @@ -237,4 +237,4 @@ public override Service Build() return base.Build(); } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Builders/SwarmServiceBuilder.cs b/src/DockerComposeBuilder/Builders/SwarmServiceBuilder.cs index 19d0df8..6b69768 100644 --- a/src/DockerComposeBuilder/Builders/SwarmServiceBuilder.cs +++ b/src/DockerComposeBuilder/Builders/SwarmServiceBuilder.cs @@ -18,4 +18,4 @@ protected SwarmServiceBuilder WithDeploy(Deploy deploy) WorkingObject.Deploy = deploy; return this; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Builders/VolumeBuilder.cs b/src/DockerComposeBuilder/Builders/VolumeBuilder.cs index 0d6aae4..fde2a48 100644 --- a/src/DockerComposeBuilder/Builders/VolumeBuilder.cs +++ b/src/DockerComposeBuilder/Builders/VolumeBuilder.cs @@ -13,4 +13,4 @@ public VolumeBuilder SetExternal(bool isExternal) { return WithProperty("external", isExternal); } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Emitters/FlowStringEnumConverter.cs b/src/DockerComposeBuilder/Emitters/FlowStringEnumConverter.cs index 1bd2168..ae38801 100644 --- a/src/DockerComposeBuilder/Emitters/FlowStringEnumConverter.cs +++ b/src/DockerComposeBuilder/Emitters/FlowStringEnumConverter.cs @@ -32,4 +32,4 @@ public override void Emit(ScalarEventInfo eventInfo, IEmitter emitter) nextEmitter.Emit(eventInfo, emitter); } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Emitters/FlowStyleStringSequences.cs b/src/DockerComposeBuilder/Emitters/FlowStyleStringSequences.cs index 54e307d..e785d8f 100644 --- a/src/DockerComposeBuilder/Emitters/FlowStyleStringSequences.cs +++ b/src/DockerComposeBuilder/Emitters/FlowStyleStringSequences.cs @@ -25,4 +25,4 @@ public override void Emit(SequenceStartEventInfo eventInfo, IEmitter emitter) nextEmitter.Emit(eventInfo, emitter); } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Emitters/ForceQuotedStringValuesEventEmitter.cs b/src/DockerComposeBuilder/Emitters/ForceQuotedStringValuesEventEmitter.cs index 3dd28da..33ea19e 100644 --- a/src/DockerComposeBuilder/Emitters/ForceQuotedStringValuesEventEmitter.cs +++ b/src/DockerComposeBuilder/Emitters/ForceQuotedStringValuesEventEmitter.cs @@ -98,4 +98,4 @@ public enum EventType : byte Sequence, } } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Emitters/QuoteSurroundingEventEmitter.cs b/src/DockerComposeBuilder/Emitters/QuoteSurroundingEventEmitter.cs index df08629..bc478c3 100644 --- a/src/DockerComposeBuilder/Emitters/QuoteSurroundingEventEmitter.cs +++ b/src/DockerComposeBuilder/Emitters/QuoteSurroundingEventEmitter.cs @@ -30,4 +30,4 @@ public override void Emit(MappingEndEventInfo eventInfo, IEmitter emitter) { nextEmitter.Emit(eventInfo, emitter); } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Emitters/YamlIEnumerableSkipEmptyObjectGraphVisitor.cs b/src/DockerComposeBuilder/Emitters/YamlIEnumerableSkipEmptyObjectGraphVisitor.cs index 82d5afa..8efa260 100644 --- a/src/DockerComposeBuilder/Emitters/YamlIEnumerableSkipEmptyObjectGraphVisitor.cs +++ b/src/DockerComposeBuilder/Emitters/YamlIEnumerableSkipEmptyObjectGraphVisitor.cs @@ -40,4 +40,4 @@ public override bool EnterMapping(IPropertyDescriptor key, IObjectDescriptor val return retVal; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Enums/EReplicationMode.cs b/src/DockerComposeBuilder/Enums/EReplicationMode.cs index 8c2e2ce..0e3b6fb 100644 --- a/src/DockerComposeBuilder/Enums/EReplicationMode.cs +++ b/src/DockerComposeBuilder/Enums/EReplicationMode.cs @@ -9,4 +9,4 @@ public enum EReplicationMode [EnumMember(Value = "global")] Global, -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Enums/ERestartMode.cs b/src/DockerComposeBuilder/Enums/ERestartMode.cs index 69809ae..34f5974 100644 --- a/src/DockerComposeBuilder/Enums/ERestartMode.cs +++ b/src/DockerComposeBuilder/Enums/ERestartMode.cs @@ -15,4 +15,4 @@ public enum ERestartMode [EnumMember(Value = "unless-stopped")] UnlessStopped -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Extensions/ComposeExtensions.cs b/src/DockerComposeBuilder/Extensions/ComposeExtensions.cs index 617ef93..f07c92e 100644 --- a/src/DockerComposeBuilder/Extensions/ComposeExtensions.cs +++ b/src/DockerComposeBuilder/Extensions/ComposeExtensions.cs @@ -21,4 +21,4 @@ public static string Serialize(this Compose serializable, string lineEndings = " return serializer.Serialize(serializable); } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Interfaces/IObject.cs b/src/DockerComposeBuilder/Interfaces/IObject.cs index 948c7fe..225f02d 100644 --- a/src/DockerComposeBuilder/Interfaces/IObject.cs +++ b/src/DockerComposeBuilder/Interfaces/IObject.cs @@ -3,4 +3,4 @@ namespace DockerComposeBuilder.Interfaces; public interface IObject { string Name { get; set; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/Base/ObjectBase.cs b/src/DockerComposeBuilder/Model/Base/ObjectBase.cs index a21abfc..6161c70 100644 --- a/src/DockerComposeBuilder/Model/Base/ObjectBase.cs +++ b/src/DockerComposeBuilder/Model/Base/ObjectBase.cs @@ -26,8 +26,7 @@ public T SetProperty(string property, T value) public bool TryGetProperty( string property, - [NotNullWhen(true)] - out T? result + [NotNullWhen(true)] out T? result ) where T : class { if (ContainsKey(property)) @@ -73,4 +72,4 @@ out T? result return null; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/Compose.cs b/src/DockerComposeBuilder/Model/Compose.cs index ac2dd68..391d1d0 100644 --- a/src/DockerComposeBuilder/Model/Compose.cs +++ b/src/DockerComposeBuilder/Model/Compose.cs @@ -21,4 +21,4 @@ public class Compose [YamlMember(Alias = "volumes")] public Dictionary? Volumes { get; set; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/HealthCheck.cs b/src/DockerComposeBuilder/Model/HealthCheck.cs index 2bbb06b..99e4ef2 100644 --- a/src/DockerComposeBuilder/Model/HealthCheck.cs +++ b/src/DockerComposeBuilder/Model/HealthCheck.cs @@ -21,4 +21,4 @@ public class HealthCheck [YamlMember(Alias = "start_period")] public string? StartPeriod { get; set; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/Map.cs b/src/DockerComposeBuilder/Model/Map.cs index 045475d..31b31f0 100644 --- a/src/DockerComposeBuilder/Model/Map.cs +++ b/src/DockerComposeBuilder/Model/Map.cs @@ -6,4 +6,4 @@ namespace DockerComposeBuilder.Model; [Serializable] public class Map : ObjectBase { -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/Network.cs b/src/DockerComposeBuilder/Model/Network.cs index 887ac69..767cb29 100644 --- a/src/DockerComposeBuilder/Model/Network.cs +++ b/src/DockerComposeBuilder/Model/Network.cs @@ -6,4 +6,4 @@ namespace DockerComposeBuilder.Model; [Serializable] public class Network : ObjectBase { -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/PlacementPreferences.cs b/src/DockerComposeBuilder/Model/PlacementPreferences.cs index caad3cb..1f02901 100644 --- a/src/DockerComposeBuilder/Model/PlacementPreferences.cs +++ b/src/DockerComposeBuilder/Model/PlacementPreferences.cs @@ -11,4 +11,4 @@ public string Spread get => GetProperty("spread")!; set => SetProperty("spread", value); } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/Secret.cs b/src/DockerComposeBuilder/Model/Secret.cs index 559e0f7..197bfec 100644 --- a/src/DockerComposeBuilder/Model/Secret.cs +++ b/src/DockerComposeBuilder/Model/Secret.cs @@ -6,5 +6,4 @@ namespace DockerComposeBuilder.Model; [Serializable] public class Secret : ObjectBase { - -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/Service.cs b/src/DockerComposeBuilder/Model/Service.cs index 9d8083a..978f1d0 100644 --- a/src/DockerComposeBuilder/Model/Service.cs +++ b/src/DockerComposeBuilder/Model/Service.cs @@ -65,4 +65,4 @@ public class Service [YamlMember(Alias = "deploy")] public Deploy? Deploy { get; set; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/Services/Deploy.cs b/src/DockerComposeBuilder/Model/Services/Deploy.cs index 22d5803..b1510dd 100644 --- a/src/DockerComposeBuilder/Model/Services/Deploy.cs +++ b/src/DockerComposeBuilder/Model/Services/Deploy.cs @@ -28,4 +28,4 @@ public class Deploy [YamlMember(Alias = "resources")] public Map? Resources { get; set; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/Services/Port.cs b/src/DockerComposeBuilder/Model/Services/Port.cs index 149943a..742efc6 100644 --- a/src/DockerComposeBuilder/Model/Services/Port.cs +++ b/src/DockerComposeBuilder/Model/Services/Port.cs @@ -17,4 +17,4 @@ public class Port [YamlMember(Alias = "mode")] public string? Mode { get; set; } -} \ No newline at end of file +} diff --git a/src/DockerComposeBuilder/Model/Volume.cs b/src/DockerComposeBuilder/Model/Volume.cs index aeab0e6..0d423d1 100644 --- a/src/DockerComposeBuilder/Model/Volume.cs +++ b/src/DockerComposeBuilder/Model/Volume.cs @@ -6,4 +6,4 @@ namespace DockerComposeBuilder.Model; [Serializable] public class Volume : ObjectBase { -} \ No newline at end of file +}