Skip to content

Commit

Permalink
Update Code Style (Azure#1629)
Browse files Browse the repository at this point in the history
* Enable SA1210 - using directives within a C# code file are sorted alphabetically by namespace

* Enable SA1008 - An opening parenthesis within a C# statement is not spaced correctly.

* Enable SA1129 - DoNotUseDefaultValueTypeConstructor.

* Enable SA1131 - A comparison was made between a variable and a literal or constant value, and the variable appeared on the right-hand side of the expression.

* Enable SA1308 - A field name in C# is prefixed with m_ or s_.

* Enable AS1309 - A field name in C# begins with an underscore.

* Fix SA1210 due to case sensitive issue
  • Loading branch information
philipktlin authored Aug 29, 2019
1 parent 89f5ca5 commit 36af98b
Show file tree
Hide file tree
Showing 38 changed files with 173 additions and 187 deletions.
3 changes: 2 additions & 1 deletion Azure.IoT.Edge.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestUseVarKeywordEvident/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMember_002ELocal/@EntryIndexedValue">SUGGESTION</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedParameter_002ELocal/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Azure_002EIoT_002EEdge/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="Azure.IoT.Edge"&gt;&lt;AspOptimizeRegisterDirectives&gt;True&lt;/AspOptimizeRegisterDirectives&gt;&lt;HtmlReformatCode&gt;True&lt;/HtmlReformatCode&gt;&lt;CSArrangeThisQualifier&gt;True&lt;/CSArrangeThisQualifier&gt;&lt;CSRemoveCodeRedundancies&gt;True&lt;/CSRemoveCodeRedundancies&gt;&lt;CSMakeFieldReadonly&gt;True&lt;/CSMakeFieldReadonly&gt;&lt;CSUpdateFileHeader&gt;True&lt;/CSUpdateFileHeader&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;True&lt;/OptimizeUsings&gt;&lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;&lt;RegionName&gt;&lt;/RegionName&gt;&lt;/CSOptimizeUsings&gt;&lt;CSShortenReferences&gt;True&lt;/CSShortenReferences&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;VBOptimizeImports&gt;True&lt;/VBOptimizeImports&gt;&lt;VBShortenReferences&gt;True&lt;/VBShortenReferences&gt;&lt;VBReformatCode&gt;True&lt;/VBReformatCode&gt;&lt;JsInsertSemicolon&gt;True&lt;/JsInsertSemicolon&gt;&lt;JsReformatCode&gt;True&lt;/JsReformatCode&gt;&lt;CssAlphabetizeProperties&gt;True&lt;/CssAlphabetizeProperties&gt;&lt;CssReformatCode&gt;True&lt;/CssReformatCode&gt;&lt;CSUseVar&gt;&lt;BehavourStyle&gt;CAN_CHANGE_TO_EXPLICIT&lt;/BehavourStyle&gt;&lt;LocalVariableStyle&gt;IMPLICIT_EXCEPT_SIMPLE_TYPES&lt;/LocalVariableStyle&gt;&lt;ForeachVariableStyle&gt;IMPLICIT_EXCEPT_SIMPLE_TYPES&lt;/ForeachVariableStyle&gt;&lt;/CSUseVar&gt;&lt;XMLReformatCode&gt;True&lt;/XMLReformatCode&gt;&lt;StyleCop.Documentation&gt;&lt;SA1600ElementsMustBeDocumented&gt;False&lt;/SA1600ElementsMustBeDocumented&gt;&lt;SA1604ElementDocumentationMustHaveSummary&gt;False&lt;/SA1604ElementDocumentationMustHaveSummary&gt;&lt;SA1609PropertyDocumentationMustHaveValueDocumented&gt;False&lt;/SA1609PropertyDocumentationMustHaveValueDocumented&gt;&lt;SA1611ElementParametersMustBeDocumented&gt;False&lt;/SA1611ElementParametersMustBeDocumented&gt;&lt;SA1615ElementReturnValueMustBeDocumented&gt;True&lt;/SA1615ElementReturnValueMustBeDocumented&gt;&lt;SA1617VoidReturnValueMustNotBeDocumented&gt;True&lt;/SA1617VoidReturnValueMustNotBeDocumented&gt;&lt;SA1618GenericTypeParametersMustBeDocumented&gt;False&lt;/SA1618GenericTypeParametersMustBeDocumented&gt;&lt;SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;True&lt;/SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;&lt;SA1628DocumentationTextMustBeginWithACapitalLetter&gt;True&lt;/SA1628DocumentationTextMustBeginWithACapitalLetter&gt;&lt;SA1629DocumentationTextMustEndWithAPeriod&gt;True&lt;/SA1629DocumentationTextMustEndWithAPeriod&gt;&lt;SA1633SA1641UpdateFileHeader&gt;Ignore&lt;/SA1633SA1641UpdateFileHeader&gt;&lt;SA1639FileHeaderMustHaveSummary&gt;False&lt;/SA1639FileHeaderMustHaveSummary&gt;&lt;SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;True&lt;/SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;True&lt;/SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1644DocumentationHeadersMustNotContainBlankLines&gt;True&lt;/SA1644DocumentationHeadersMustNotContainBlankLines&gt;&lt;/StyleCop.Documentation&gt;&lt;CSReorderTypeMembers&gt;True&lt;/CSReorderTypeMembers&gt;&lt;CSArrangeQualifiers&gt;True&lt;/CSArrangeQualifiers&gt;&lt;FormatAttributeQuoteDescriptor&gt;True&lt;/FormatAttributeQuoteDescriptor&gt;&lt;PublicModifierStyleTs&gt;True&lt;/PublicModifierStyleTs&gt;&lt;ExplicitAnyTs&gt;True&lt;/ExplicitAnyTs&gt;&lt;TypeAnnotationStyleTs&gt;True&lt;/TypeAnnotationStyleTs&gt;&lt;RelativePathStyleTs&gt;True&lt;/RelativePathStyleTs&gt;&lt;OptimizeReferenceCommentsTs&gt;True&lt;/OptimizeReferenceCommentsTs&gt;&lt;OptimizeImportsTs&gt;True&lt;/OptimizeImportsTs&gt;&lt;RemoveRedundantQualifiersTs&gt;True&lt;/RemoveRedundantQualifiersTs&gt;&lt;CSFixBuiltinTypeReferences&gt;True&lt;/CSFixBuiltinTypeReferences&gt;&lt;CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="False" AddMissingParentheses="True" ArrangeAttributes="True" /&gt;&lt;/Profile&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Azure_002EIoT_002EEdge/@EntryIndexedValue">&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;Profile name="Azure.IoT.Edge"&gt;&lt;AspOptimizeRegisterDirectives&gt;True&lt;/AspOptimizeRegisterDirectives&gt;&lt;HtmlReformatCode&gt;True&lt;/HtmlReformatCode&gt;&lt;CSArrangeThisQualifier&gt;True&lt;/CSArrangeThisQualifier&gt;&lt;CSRemoveCodeRedundancies&gt;True&lt;/CSRemoveCodeRedundancies&gt;&lt;CSMakeFieldReadonly&gt;True&lt;/CSMakeFieldReadonly&gt;&lt;CSUpdateFileHeader&gt;True&lt;/CSUpdateFileHeader&gt;&lt;CSOptimizeUsings&gt;&lt;OptimizeUsings&gt;True&lt;/OptimizeUsings&gt;&lt;EmbraceInRegion&gt;False&lt;/EmbraceInRegion&gt;&lt;RegionName&gt;&lt;/RegionName&gt;&lt;/CSOptimizeUsings&gt;&lt;CSReformatCode&gt;True&lt;/CSReformatCode&gt;&lt;VBOptimizeImports&gt;True&lt;/VBOptimizeImports&gt;&lt;VBShortenReferences&gt;True&lt;/VBShortenReferences&gt;&lt;VBReformatCode&gt;True&lt;/VBReformatCode&gt;&lt;JsInsertSemicolon&gt;True&lt;/JsInsertSemicolon&gt;&lt;JsReformatCode&gt;True&lt;/JsReformatCode&gt;&lt;CssAlphabetizeProperties&gt;True&lt;/CssAlphabetizeProperties&gt;&lt;CssReformatCode&gt;True&lt;/CssReformatCode&gt;&lt;CSUseVar&gt;&lt;BehavourStyle&gt;CAN_CHANGE_TO_EXPLICIT&lt;/BehavourStyle&gt;&lt;LocalVariableStyle&gt;IMPLICIT_EXCEPT_SIMPLE_TYPES&lt;/LocalVariableStyle&gt;&lt;ForeachVariableStyle&gt;IMPLICIT_EXCEPT_SIMPLE_TYPES&lt;/ForeachVariableStyle&gt;&lt;/CSUseVar&gt;&lt;XMLReformatCode&gt;True&lt;/XMLReformatCode&gt;&lt;StyleCop.Documentation&gt;&lt;SA1600ElementsMustBeDocumented&gt;False&lt;/SA1600ElementsMustBeDocumented&gt;&lt;SA1604ElementDocumentationMustHaveSummary&gt;False&lt;/SA1604ElementDocumentationMustHaveSummary&gt;&lt;SA1609PropertyDocumentationMustHaveValueDocumented&gt;False&lt;/SA1609PropertyDocumentationMustHaveValueDocumented&gt;&lt;SA1611ElementParametersMustBeDocumented&gt;False&lt;/SA1611ElementParametersMustBeDocumented&gt;&lt;SA1615ElementReturnValueMustBeDocumented&gt;True&lt;/SA1615ElementReturnValueMustBeDocumented&gt;&lt;SA1617VoidReturnValueMustNotBeDocumented&gt;True&lt;/SA1617VoidReturnValueMustNotBeDocumented&gt;&lt;SA1618GenericTypeParametersMustBeDocumented&gt;False&lt;/SA1618GenericTypeParametersMustBeDocumented&gt;&lt;SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;True&lt;/SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes&gt;&lt;SA1628DocumentationTextMustBeginWithACapitalLetter&gt;True&lt;/SA1628DocumentationTextMustBeginWithACapitalLetter&gt;&lt;SA1629DocumentationTextMustEndWithAPeriod&gt;True&lt;/SA1629DocumentationTextMustEndWithAPeriod&gt;&lt;SA1633SA1641UpdateFileHeader&gt;Ignore&lt;/SA1633SA1641UpdateFileHeader&gt;&lt;SA1639FileHeaderMustHaveSummary&gt;False&lt;/SA1639FileHeaderMustHaveSummary&gt;&lt;SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;True&lt;/SA1642ConstructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;True&lt;/SA1643DestructorSummaryDocumentationMustBeginWithStandardText&gt;&lt;SA1644DocumentationHeadersMustNotContainBlankLines&gt;True&lt;/SA1644DocumentationHeadersMustNotContainBlankLines&gt;&lt;/StyleCop.Documentation&gt;&lt;CSReorderTypeMembers&gt;True&lt;/CSReorderTypeMembers&gt;&lt;CSArrangeQualifiers&gt;True&lt;/CSArrangeQualifiers&gt;&lt;FormatAttributeQuoteDescriptor&gt;True&lt;/FormatAttributeQuoteDescriptor&gt;&lt;PublicModifierStyleTs&gt;True&lt;/PublicModifierStyleTs&gt;&lt;ExplicitAnyTs&gt;True&lt;/ExplicitAnyTs&gt;&lt;TypeAnnotationStyleTs&gt;True&lt;/TypeAnnotationStyleTs&gt;&lt;RelativePathStyleTs&gt;True&lt;/RelativePathStyleTs&gt;&lt;OptimizeReferenceCommentsTs&gt;True&lt;/OptimizeReferenceCommentsTs&gt;&lt;OptimizeImportsTs&gt;True&lt;/OptimizeImportsTs&gt;&lt;RemoveRedundantQualifiersTs&gt;True&lt;/RemoveRedundantQualifiersTs&gt;&lt;CSFixBuiltinTypeReferences&gt;True&lt;/CSFixBuiltinTypeReferences&gt;&lt;CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="False" AddMissingParentheses="True" ArrangeAttributes="True" /&gt;&lt;/Profile&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Default/@EntryIndexedValue"></s:String>

<s:Boolean x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Default/@EntryIndexRemoved">True</s:Boolean>
Expand All @@ -121,6 +121,7 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_LINQ_QUERY/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_ARGUMENT/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_ARRAY_AND_OBJECT_INITIALIZER/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_AFTER_START_COMMENT/@EntryValue">0</s:Int64>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_AROUND_NAMESPACE/@EntryValue">1</s:Int64>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ namespace Microsoft.Azure.Devices.Edge.Agent.Core.Logs
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using akka::Akka;
using akka::Akka.Actor;
using akka::Akka.IO;
using Akka.Streams;
using Akka.Streams.Dsl;
using Microsoft.Azure.Devices.Edge.Storage;
using Microsoft.Azure.Devices.Edge.Util;
using AkkaActor = akka::Akka.Actor;
using AkkaIO = akka::Akka.IO;
using AkkaNet = akka::Akka;

// Processes incoming logs stream and converts to the required format
//
Expand All @@ -29,20 +29,20 @@ namespace Microsoft.Azure.Devices.Edge.Agent.Core.Logs
// unused
public class LogsProcessor : ILogsProcessor, IDisposable
{
static readonly Flow<ByteString, ByteString, NotUsed> FramingFlow
= Framing.LengthField(4, int.MaxValue, 4, ByteOrder.BigEndian);
static readonly Flow<AkkaIO.ByteString, AkkaIO.ByteString, AkkaNet.NotUsed> FramingFlow
= Framing.LengthField(4, int.MaxValue, 4, AkkaIO.ByteOrder.BigEndian);

static readonly Flow<ByteString, ByteString, NotUsed> SimpleLengthFraming
static readonly Flow<AkkaIO.ByteString, AkkaIO.ByteString, AkkaNet.NotUsed> SimpleLengthFraming
= Framing.SimpleFramingProtocolEncoder(int.MaxValue);

readonly ActorSystem system;
readonly AkkaActor.ActorSystem system;
readonly ActorMaterializer materializer;
readonly ILogMessageParser logMessageParser;

public LogsProcessor(ILogMessageParser logMessageParser)
{
this.logMessageParser = Preconditions.CheckNotNull(logMessageParser, nameof(logMessageParser));
this.system = ActorSystem.Create("LogsProcessor");
this.system = AkkaActor.ActorSystem.Create("LogsProcessor");
this.materializer = this.system.Materializer();
}

Expand Down Expand Up @@ -106,7 +106,7 @@ ArraySegment<byte> BasicMapper(ModuleLogMessageData l)
? new ArraySegment<byte>(l.FullText.ToBytes())
: new ArraySegment<byte>(l.ToBytes());

var sourceMappers = new List<Func<Source<ArraySegment<byte>, NotUsed>, Source<ArraySegment<byte>, NotUsed>>>();
var sourceMappers = new List<Func<Source<ArraySegment<byte>, AkkaNet.NotUsed>, Source<ArraySegment<byte>, AkkaNet.NotUsed>>>();

if (logOptions.ContentEncoding == LogsContentEncoding.Gzip)
{
Expand Down Expand Up @@ -134,15 +134,15 @@ public void Dispose()
this.materializer?.Dispose();
}

static Source<ArraySegment<byte>, NotUsed> SimpleLengthFramingMapper(Source<ArraySegment<byte>, NotUsed> s) =>
s.Select(ByteString.FromBytes)
static Source<ArraySegment<byte>, AkkaNet.NotUsed> SimpleLengthFramingMapper(Source<ArraySegment<byte>, AkkaNet.NotUsed> s) =>
s.Select(AkkaIO.ByteString.FromBytes)
.Via(SimpleLengthFraming)
.Select(b => new ArraySegment<byte>(b.ToArray()));

static Source<ArraySegment<byte>, NotUsed> NonGroupingGzipMapper(Source<ArraySegment<byte>, NotUsed> s) =>
static Source<ArraySegment<byte>, AkkaNet.NotUsed> NonGroupingGzipMapper(Source<ArraySegment<byte>, AkkaNet.NotUsed> s) =>
s.Select(m => new ArraySegment<byte>(Compression.CompressToGzip(m.Array)));

static Source<ArraySegment<byte>, NotUsed> GroupingGzipMapper(Source<ArraySegment<byte>, NotUsed> s, LogsOutputGroupingConfig outputGroupingConfig) =>
static Source<ArraySegment<byte>, AkkaNet.NotUsed> GroupingGzipMapper(Source<ArraySegment<byte>, AkkaNet.NotUsed> s, LogsOutputGroupingConfig outputGroupingConfig) =>
s.GroupedWithin(outputGroupingConfig.MaxFrames, outputGroupingConfig.MaxDuration)
.Select(
b =>
Expand All @@ -154,20 +154,20 @@ static Source<ArraySegment<byte>, NotUsed> GroupingGzipMapper(Source<ArraySegmen

class GraphBuilder
{
Source<ModuleLogMessageData, NotUsed> parsingGraphSource;
Source<ModuleLogMessageData, AkkaNet.NotUsed> parsingGraphSource;

GraphBuilder(Source<ModuleLogMessageData, NotUsed> parsingGraphSource)
GraphBuilder(Source<ModuleLogMessageData, AkkaNet.NotUsed> parsingGraphSource)
{
this.parsingGraphSource = parsingGraphSource;
}

public static GraphBuilder CreateParsingGraphBuilder(Stream stream, Func<ByteString, ModuleLogMessageData> parserFunc)
public static GraphBuilder CreateParsingGraphBuilder(Stream stream, Func<AkkaIO.ByteString, ModuleLogMessageData> parserFunc)
{
var source = StreamConverters.FromInputStream(() => stream);
var graph = source
.Via(FramingFlow)
.Select(parserFunc)
.MapMaterializedValue(_ => NotUsed.Instance);
.MapMaterializedValue(_ => AkkaNet.NotUsed.Instance);
return new GraphBuilder(graph);
}

Expand Down Expand Up @@ -199,14 +199,14 @@ public IRunnableGraph<Task<IImmutableList<T>>> GetMaterializingGraph<T>(Func<Mod
public IRunnableGraph<Task> GetStreamingGraph<TU, TV>(
Func<TV, Task<TU>> callback,
Func<ModuleLogMessageData, TV> basicMapper,
List<Func<Source<TV, NotUsed>, Source<TV, NotUsed>>> mappers)
List<Func<Source<TV, AkkaNet.NotUsed>, Source<TV, AkkaNet.NotUsed>>> mappers)
{
Source<TV, NotUsed> streamingGraphSource = this.parsingGraphSource
Source<TV, AkkaNet.NotUsed> streamingGraphSource = this.parsingGraphSource
.Select(basicMapper);

if (mappers?.Count > 0)
{
foreach (Func<Source<TV, NotUsed>, Source<TV, NotUsed>> mapper in mappers)
foreach (Func<Source<TV, AkkaNet.NotUsed>, Source<TV, AkkaNet.NotUsed>> mapper in mappers)
{
streamingGraphSource = mapper(streamingGraphSource);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.Azure.Devices.Edge.Agent.Core.Requests
{
extern alias akka;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All rights reserved.
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Microsoft.Azure.Devices.Edge.Agent.Docker.Test")]
[assembly: InternalsVisibleTo("Microsoft.Azure.Devices.Edge.Agent.Docker.Test")]
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ public virtual bool Equals(IModule<DockerConfig> other)
}

return string.Equals(this.Name, other.Name) &&
string.Equals(this.Version, other.Version) &&
string.Equals(this.Type, other.Type) &&
this.DesiredStatus == other.DesiredStatus &&
this.Config.Equals(other.Config) &&
this.RestartPolicy == other.RestartPolicy &&
this.ImagePullPolicy == other.ImagePullPolicy &&
EnvDictionaryComparer.Equals(this.Env, other.Env);
string.Equals(this.Version, other.Version) &&
string.Equals(this.Type, other.Type) &&
this.DesiredStatus == other.DesiredStatus &&
this.Config.Equals(other.Config) &&
this.RestartPolicy == other.RestartPolicy &&
this.ImagePullPolicy == other.ImagePullPolicy &&
EnvDictionaryComparer.Equals(this.Env, other.Env);
}

public virtual bool IsOnlyModuleStatusChanged(IModule other)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ namespace Microsoft.Azure.Devices.Edge.Agent.Docker
using System;
using System.Collections.Generic;
using Microsoft.Azure.Devices.Edge.Agent.Core;
using Microsoft.Azure.Devices.Edge.Util;
using Newtonsoft.Json;

public class EdgeAgentDockerRuntimeModule : DockerRuntimeModule, IEdgeAgentModule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ namespace Microsoft.Azure.Devices.Edge.Agent.Docker.Commands

public class CreateCommand : ICommand
{
readonly CreateContainerParameters createContainerParameters;
readonly IDockerClient client;

static readonly Dictionary<string, PortBinding> EdgeHubPortBinding = new Dictionary<string, PortBinding>
{
{ "8883/tcp", new PortBinding { HostPort = "8883" } },
{ "443/tcp", new PortBinding { HostPort = "443" } }
};

readonly CreateContainerParameters createContainerParameters;
readonly IDockerClient client;

readonly Lazy<string> id;

public CreateCommand(IDockerClient client, CreateContainerParameters createContainerParameters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class RemoveCommand : ICommand
static readonly ILogger Logger = Util.Logger.Factory.CreateLogger<RemoveCommand>();
readonly IDockerClient client;
readonly DockerModule module;

public RemoveCommand(IDockerClient client, DockerModule module)
{
this.client = Preconditions.CheckNotNull(client, nameof(client));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2018_06_28
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Devices.Edge.Agent.Core;
using Microsoft.Azure.Devices.Edge.Agent.Edgelet.Versioning;
using Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2018_06_28.GeneratedCode;
using Microsoft.Azure.Devices.Edge.Agent.Edgelet.Versioning;
using Microsoft.Azure.Devices.Edge.Util;
using Microsoft.Azure.Devices.Edge.Util.Edged;
using Microsoft.Azure.Devices.Edge.Util.TransientFaultHandling;
Expand Down
Loading

0 comments on commit 36af98b

Please sign in to comment.