diff --git a/Microsoft.Azure.Devices.Edge.sln b/Microsoft.Azure.Devices.Edge.sln index d3c68623288..da25938cda8 100644 --- a/Microsoft.Azure.Devices.Edge.sln +++ b/Microsoft.Azure.Devices.Edge.sln @@ -546,8 +546,8 @@ Global {013D53C7-3AB5-41A4-9A8D-0F2C47238773}.Debug|Any CPU.Build.0 = Debug|Any CPU {013D53C7-3AB5-41A4-9A8D-0F2C47238773}.Release|Any CPU.ActiveCfg = Release|Any CPU {013D53C7-3AB5-41A4-9A8D-0F2C47238773}.Release|Any CPU.Build.0 = Release|Any CPU - {A58633ED-5302-41DF-A0F6-FDC48E5C6B04}.CheckInBuild|Any CPU.ActiveCfg = Debug|Any CPU - {A58633ED-5302-41DF-A0F6-FDC48E5C6B04}.CheckInBuild|Any CPU.Build.0 = Debug|Any CPU + {A58633ED-5302-41DF-A0F6-FDC48E5C6B04}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU + {A58633ED-5302-41DF-A0F6-FDC48E5C6B04}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU {A58633ED-5302-41DF-A0F6-FDC48E5C6B04}.CodeCoverage|Any CPU.ActiveCfg = Debug|Any CPU {A58633ED-5302-41DF-A0F6-FDC48E5C6B04}.CodeCoverage|Any CPU.Build.0 = Debug|Any CPU {A58633ED-5302-41DF-A0F6-FDC48E5C6B04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -562,24 +562,24 @@ Global {A68ABCD4-5926-4005-9525-559DD74991C9}.Debug|Any CPU.Build.0 = Debug|Any CPU {A68ABCD4-5926-4005-9525-559DD74991C9}.Release|Any CPU.ActiveCfg = Release|Any CPU {A68ABCD4-5926-4005-9525-559DD74991C9}.Release|Any CPU.Build.0 = Release|Any CPU - {950DACB0-B011-41AF-B0FB-245F749B01AB}.CheckInBuild|Any CPU.ActiveCfg = Debug|Any CPU - {950DACB0-B011-41AF-B0FB-245F749B01AB}.CheckInBuild|Any CPU.Build.0 = Debug|Any CPU + {950DACB0-B011-41AF-B0FB-245F749B01AB}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU + {950DACB0-B011-41AF-B0FB-245F749B01AB}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU {950DACB0-B011-41AF-B0FB-245F749B01AB}.CodeCoverage|Any CPU.ActiveCfg = Debug|Any CPU {950DACB0-B011-41AF-B0FB-245F749B01AB}.CodeCoverage|Any CPU.Build.0 = Debug|Any CPU {950DACB0-B011-41AF-B0FB-245F749B01AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {950DACB0-B011-41AF-B0FB-245F749B01AB}.Debug|Any CPU.Build.0 = Debug|Any CPU {950DACB0-B011-41AF-B0FB-245F749B01AB}.Release|Any CPU.ActiveCfg = Release|Any CPU {950DACB0-B011-41AF-B0FB-245F749B01AB}.Release|Any CPU.Build.0 = Release|Any CPU - {B63C506E-5CB5-4DE8-8275-F7BA8354799E}.CheckInBuild|Any CPU.ActiveCfg = Debug|Any CPU - {B63C506E-5CB5-4DE8-8275-F7BA8354799E}.CheckInBuild|Any CPU.Build.0 = Debug|Any CPU + {B63C506E-5CB5-4DE8-8275-F7BA8354799E}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU + {B63C506E-5CB5-4DE8-8275-F7BA8354799E}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU {B63C506E-5CB5-4DE8-8275-F7BA8354799E}.CodeCoverage|Any CPU.ActiveCfg = Debug|Any CPU {B63C506E-5CB5-4DE8-8275-F7BA8354799E}.CodeCoverage|Any CPU.Build.0 = Debug|Any CPU {B63C506E-5CB5-4DE8-8275-F7BA8354799E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B63C506E-5CB5-4DE8-8275-F7BA8354799E}.Debug|Any CPU.Build.0 = Debug|Any CPU {B63C506E-5CB5-4DE8-8275-F7BA8354799E}.Release|Any CPU.ActiveCfg = Release|Any CPU {B63C506E-5CB5-4DE8-8275-F7BA8354799E}.Release|Any CPU.Build.0 = Release|Any CPU - {A5DFFB52-D8EA-4E1A-BF4F-8B9665C7DAFE}.CheckInBuild|Any CPU.ActiveCfg = Debug|Any CPU - {A5DFFB52-D8EA-4E1A-BF4F-8B9665C7DAFE}.CheckInBuild|Any CPU.Build.0 = Debug|Any CPU + {A5DFFB52-D8EA-4E1A-BF4F-8B9665C7DAFE}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU + {A5DFFB52-D8EA-4E1A-BF4F-8B9665C7DAFE}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU {A5DFFB52-D8EA-4E1A-BF4F-8B9665C7DAFE}.CodeCoverage|Any CPU.ActiveCfg = Debug|Any CPU {A5DFFB52-D8EA-4E1A-BF4F-8B9665C7DAFE}.CodeCoverage|Any CPU.Build.0 = Debug|Any CPU {A5DFFB52-D8EA-4E1A-BF4F-8B9665C7DAFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU diff --git a/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planners/HealthRestartPlanner.cs b/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planners/HealthRestartPlanner.cs index 707b8da9f03..a549283ee46 100644 --- a/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planners/HealthRestartPlanner.cs +++ b/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/planners/HealthRestartPlanner.cs @@ -14,22 +14,22 @@ namespace Microsoft.Azure.Devices.Edge.Agent.Core.Planners using Nito.AsyncEx; using DiffState = System.ValueTuple< // added modules - System.Collections.Generic.IList, + System.Collections.Generic.IList, // updated modules because of deployment - System.Collections.Generic.IList, + System.Collections.Generic.IList, // modules whose desired status changed because of deployment - System.Collections.Generic.IList, + System.Collections.Generic.IList, // update modules because runtime state changed - System.Collections.Generic.IList, + System.Collections.Generic.IList, // removed modules - System.Collections.Generic.IList, + System.Collections.Generic.IList, // modules that are running great - System.Collections.Generic.IList + System.Collections.Generic.IList >; public class HealthRestartPlanner : IPlanner diff --git a/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/ModuleClientProvider.cs b/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/ModuleClientProvider.cs index 334a7db6f5e..0fc0288157a 100644 --- a/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/ModuleClientProvider.cs +++ b/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.IoTHub/ModuleClientProvider.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Devices.Edge.Agent.IoTHub using Microsoft.Azure.Devices.Edge.Util; using Microsoft.Azure.Devices.Edge.Util.TransientFaultHandling; using Microsoft.Extensions.Logging; - using ExponentialBackoff = Util.TransientFaultHandling.ExponentialBackoff; + using ExponentialBackoff = Microsoft.Azure.Devices.Edge.Util.TransientFaultHandling.ExponentialBackoff; public class ModuleClientProvider : IModuleClientProvider { diff --git a/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Kubernetes/Microsoft.Azure.Devices.Edge.Agent.Kubernetes.csproj b/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Kubernetes/Microsoft.Azure.Devices.Edge.Agent.Kubernetes.csproj index b6b7e04c5cd..d21f47b8a95 100644 --- a/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Kubernetes/Microsoft.Azure.Devices.Edge.Agent.Kubernetes.csproj +++ b/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Kubernetes/Microsoft.Azure.Devices.Edge.Agent.Kubernetes.csproj @@ -14,11 +14,6 @@ true - - - - - diff --git a/edge-agent/test/Microsoft.Azure.Devices.Edge.Agent.Core.Test/commands/LoggingCommandFactoryTest.cs b/edge-agent/test/Microsoft.Azure.Devices.Edge.Agent.Core.Test/commands/LoggingCommandFactoryTest.cs index c2e3d593aff..8b1dc3eea51 100644 --- a/edge-agent/test/Microsoft.Azure.Devices.Edge.Agent.Core.Test/commands/LoggingCommandFactoryTest.cs +++ b/edge-agent/test/Microsoft.Azure.Devices.Edge.Agent.Core.Test/commands/LoggingCommandFactoryTest.cs @@ -11,8 +11,8 @@ namespace Microsoft.Azure.Devices.Edge.Agent.Core.Test.Commands using Microsoft.Extensions.Logging; using Moq; using Xunit; - using CommandMethodExpr = System.Linq.Expressions.Expression>>; - using TestExecutionExpr = System.Func>; + using CommandMethodExpr = System.Linq.Expressions.Expression>>; + using TestExecutionExpr = System.Func>; class FailureCommand : ICommand { diff --git a/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/CloudEndpoint.cs b/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/CloudEndpoint.cs index 088ed3adee7..6c14c2e2e3d 100644 --- a/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/CloudEndpoint.cs +++ b/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/CloudEndpoint.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Devices.Edge.Hub.Core.Routing using Constants = Microsoft.Azure.Devices.Edge.Hub.Core.Constants; using IMessage = Microsoft.Azure.Devices.Edge.Hub.Core.IMessage; using IRoutingMessage = Microsoft.Azure.Devices.Routing.Core.IMessage; - using ISinkResult = Microsoft.Azure.Devices.Routing.Core.ISinkResult; + using ISinkResult = Microsoft.Azure.Devices.Routing.Core.ISinkResult; using SystemProperties = Microsoft.Azure.Devices.Edge.Hub.Core.SystemProperties; public class CloudEndpoint : Endpoint diff --git a/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs b/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs index d888c8aea57..fdaa3bea7a4 100644 --- a/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs +++ b/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/routing/ModuleEndpoint.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Devices.Edge.Hub.Core.Routing using static System.FormattableString; using IMessage = Microsoft.Azure.Devices.Edge.Hub.Core.IMessage; using IRoutingMessage = Microsoft.Azure.Devices.Routing.Core.IMessage; - using ISinkResult = Microsoft.Azure.Devices.Routing.Core.ISinkResult; + using ISinkResult = Microsoft.Azure.Devices.Routing.Core.ISinkResult; using Option = Microsoft.Azure.Devices.Edge.Util.Option; public class ModuleEndpoint : Endpoint diff --git a/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/checkpointers/NullCheckpointStore.cs b/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/checkpointers/NullCheckpointStore.cs index e49d492d3ae..0c8a04bf565 100644 --- a/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/checkpointers/NullCheckpointStore.cs +++ b/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/checkpointers/NullCheckpointStore.cs @@ -25,11 +25,10 @@ public NullCheckpointStore(long offset) var data = new CheckpointData(offset); this.initialCheckpointData = Task.FromResult(data); this.initialCheckpointDataMap = Task.FromResult( - new Dictionary() - { - { "NullCheckpoint", data } - } - as IDictionary); + (IDictionary)new Dictionary() + { + { "NullCheckpoint", data } + }); } public static NullCheckpointStore Instance { get; } = new NullCheckpointStore(); diff --git a/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/endpoints/StoringAsyncEndpointExecutor.cs b/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/endpoints/StoringAsyncEndpointExecutor.cs index 322631b779a..7e56cf17740 100644 --- a/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/endpoints/StoringAsyncEndpointExecutor.cs +++ b/edge-hub/src/Microsoft.Azure.Devices.Routing.Core/endpoints/StoringAsyncEndpointExecutor.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Devices.Routing.Core.Endpoints using Microsoft.Extensions.Logging; using Nito.AsyncEx; using static System.FormattableString; - using AsyncLock = Edge.Util.Concurrency.AsyncLock; + using AsyncLock = Microsoft.Azure.Devices.Edge.Util.Concurrency.AsyncLock; public class StoringAsyncEndpointExecutor : IEndpointExecutor { diff --git a/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/MessageTest.cs b/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/MessageTest.cs index b841c2e6577..7efa0f704fa 100644 --- a/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/MessageTest.cs +++ b/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/MessageTest.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Devices.Edge.Hub.Core.Test using System.Collections.Generic; using Microsoft.Azure.Devices.Edge.Util.Test.Common; using Xunit; - using Message = EdgeMessage; + using Message = Microsoft.Azure.Devices.Edge.Hub.Core.EdgeMessage; public class MessageTest { diff --git a/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/routing/RoutingEdgeHubTest.cs b/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/routing/RoutingEdgeHubTest.cs index e619bcd443e..79ee45a07e1 100644 --- a/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/routing/RoutingEdgeHubTest.cs +++ b/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/routing/RoutingEdgeHubTest.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Devices.Edge.Hub.Core.Test.Routing using Xunit; using Constants = Microsoft.Azure.Devices.Edge.Hub.Core.Constants; using IMessage = Microsoft.Azure.Devices.Edge.Hub.Core.IMessage; - using Message = EdgeMessage; + using Message = Microsoft.Azure.Devices.Edge.Hub.Core.EdgeMessage; using SystemProperties = Microsoft.Azure.Devices.Edge.Hub.Core.SystemProperties; [Unit] diff --git a/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/routing/RoutingTest.cs b/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/routing/RoutingTest.cs index 5aa51f03976..b0074c01517 100644 --- a/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/routing/RoutingTest.cs +++ b/edge-hub/test/Microsoft.Azure.Devices.Edge.Hub.Core.Test/routing/RoutingTest.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Devices.Edge.Hub.Core.Test.Routing using Xunit; using Constants = Microsoft.Azure.Devices.Edge.Hub.Core.Constants; using IMessage = Microsoft.Azure.Devices.Edge.Hub.Core.IMessage; - using Message = EdgeMessage; + using Message = Microsoft.Azure.Devices.Edge.Hub.Core.EdgeMessage; using SystemProperties = Microsoft.Azure.Devices.Edge.Hub.Core.SystemProperties; [Integration] diff --git a/edge-modules/ModuleLib/Microsoft.Azure.Devices.Edge.ModuleUtil.csproj b/edge-modules/ModuleLib/Microsoft.Azure.Devices.Edge.ModuleUtil.csproj index e6957d22803..97ad6ac95d3 100644 --- a/edge-modules/ModuleLib/Microsoft.Azure.Devices.Edge.ModuleUtil.csproj +++ b/edge-modules/ModuleLib/Microsoft.Azure.Devices.Edge.ModuleUtil.csproj @@ -2,6 +2,7 @@ netcoreapp2.1 + Debug;Release;CheckInBuild diff --git a/edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/transientFaultHandling/RetryPolicy.cs b/edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/transientFaultHandling/RetryPolicy.cs index b79e4d487e4..d5ff93aea6d 100644 --- a/edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/transientFaultHandling/RetryPolicy.cs +++ b/edge-modules/functions/binding/src/Microsoft.Azure.WebJobs.Extensions.EdgeHub/transientFaultHandling/RetryPolicy.cs @@ -11,7 +11,7 @@ namespace Microsoft.Azure.WebJobs.Extensions.EdgeHub class RetryPolicy { /// - /// Initializes a new instance of the class with the specified number of retry attempts and parameters defining the progressive delay between retries. + /// Initializes a new instance of the class with the specified number of retry attempts and parameters defining the progressive delay between retries. /// /// The that is responsible for detecting transient conditions. /// The strategy to use for this retry policy. @@ -29,7 +29,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, Retr } /// - /// Initializes a new instance of the class with the specified number of retry attempts and default fixed time interval between retries. + /// Initializes a new instance of the class with the specified number of retry attempts and default fixed time interval between retries. /// /// The that is responsible for detecting transient conditions. /// The number of retry attempts. @@ -39,7 +39,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int } /// - /// Initializes a new instance of the class with the specified number of retry attempts and fixed time interval between retries. + /// Initializes a new instance of the class with the specified number of retry attempts and fixed time interval between retries. /// /// The that is responsible for detecting transient conditions. /// The number of retry attempts. @@ -50,7 +50,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int } /// - /// Initializes a new instance of the class with the specified number of retry attempts and backoff parameters for calculating the exponential delay between retries. + /// Initializes a new instance of the class with the specified number of retry attempts and backoff parameters for calculating the exponential delay between retries. /// /// The that is responsible for detecting transient conditions. /// The number of retry attempts. @@ -63,7 +63,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int } /// - /// Initializes a new instance of the class with the specified number of retry attempts and parameters defining the progressive delay between retries. + /// Initializes a new instance of the class with the specified number of retry attempts and parameters defining the progressive delay between retries. /// /// The that is responsible for detecting transient conditions. /// The number of retry attempts. @@ -80,24 +80,24 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int public event EventHandler Retrying; /// - /// Returns a default policy that performs no retries, but invokes the action only once. + /// Gets a default policy that performs no retries, but invokes the action only once. /// public static RetryPolicy NoRetry { get; } = new RetryPolicy(new TransientErrorIgnoreStrategy(), RetryStrategy.NoRetry); /// - /// Returns a default policy that implements a fixed retry interval configured with the default retry strategy. + /// Gets a default policy that implements a fixed retry interval configured with the default retry strategy. /// The default retry policy treats all caught exceptions as transient errors. /// public static RetryPolicy DefaultFixed { get; } = new RetryPolicy(new TransientErrorCatchAllStrategy(), RetryStrategy.DefaultFixed); /// - /// Returns a default policy that implements a progressive retry interval configured with the default retry strategy. + /// Gets a default policy that implements a progressive retry interval configured with the default retry strategy. /// The default retry policy treats all caught exceptions as transient errors. /// public static RetryPolicy DefaultProgressive { get; } = new RetryPolicy(new TransientErrorCatchAllStrategy(), RetryStrategy.DefaultProgressive); /// - /// Returns a default policy that implements a random exponential retry interval configured with the default retry strategy. + /// Gets a default policy that implements a random exponential retry interval configured with the default retry strategy. /// The default retry policy treats all caught exceptions as transient errors. /// public static RetryPolicy DefaultExponential { get; } = new RetryPolicy(new TransientErrorCatchAllStrategy(), RetryStrategy.DefaultExponential); @@ -120,7 +120,7 @@ public virtual void ExecuteAction(Action action) { Guard.ArgumentNotNull(action, "action"); this.ExecuteAction( - delegate + () => { action(); return null; @@ -221,6 +221,7 @@ public Task ExecuteAsync(Func taskAction, CancellationToken cancellationTo /// /// Repeatedly executes the specified asynchronous task while it satisfies the current retry policy. /// + /// Result type. /// A function that returns a started task (also known as "hot" task). /// /// Returns a task that will run to completion if the original task completes successfully (either the @@ -235,6 +236,7 @@ public Task ExecuteAsync(Func> taskFunc) /// /// Repeatedly executes the specified asynchronous task while it satisfies the current retry policy. /// + /// Result type. /// A function that returns a started task (also known as "hot" task). /// The token used to cancel the retry operation. This token does not cancel the execution of the asynchronous task. /// diff --git a/edge-util/src/Microsoft.Azure.Devices.Edge.Util/transientFaultHandling/RetryPolicy.cs b/edge-util/src/Microsoft.Azure.Devices.Edge.Util/transientFaultHandling/RetryPolicy.cs index 505817dc912..397887f7a12 100644 --- a/edge-util/src/Microsoft.Azure.Devices.Edge.Util/transientFaultHandling/RetryPolicy.cs +++ b/edge-util/src/Microsoft.Azure.Devices.Edge.Util/transientFaultHandling/RetryPolicy.cs @@ -11,7 +11,7 @@ namespace Microsoft.Azure.Devices.Edge.Util.TransientFaultHandling public class RetryPolicy { /// - /// Initializes a new instance of the class with the specified number of retry attempts and parameters defining the progressive delay between retries. + /// Initializes a new instance of the class with the specified number of retry attempts and parameters defining the progressive delay between retries. /// /// The that is responsible for detecting transient conditions. /// The strategy to use for this retry policy. @@ -29,7 +29,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, Retr } /// - /// Initializes a new instance of the class with the specified number of retry attempts and default fixed time interval between retries. + /// Initializes a new instance of the class with the specified number of retry attempts and default fixed time interval between retries. /// /// The that is responsible for detecting transient conditions. /// The number of retry attempts. @@ -39,7 +39,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int } /// - /// Initializes a new instance of the class with the specified number of retry attempts and fixed time interval between retries. + /// Initializes a new instance of the class with the specified number of retry attempts and fixed time interval between retries. /// /// The that is responsible for detecting transient conditions. /// The number of retry attempts. @@ -50,7 +50,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int } /// - /// Initializes a new instance of the class with the specified number of retry attempts and backoff parameters for calculating the exponential delay between retries. + /// Initializes a new instance of the class with the specified number of retry attempts and backoff parameters for calculating the exponential delay between retries. /// /// The that is responsible for detecting transient conditions. /// The number of retry attempts. @@ -63,7 +63,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int } /// - /// Initializes a new instance of the class with the specified number of retry attempts and parameters defining the progressive delay between retries. + /// Initializes a new instance of the class with the specified number of retry attempts and parameters defining the progressive delay between retries. /// /// The that is responsible for detecting transient conditions. /// The number of retry attempts. @@ -80,24 +80,24 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int public event EventHandler Retrying; /// - /// Returns a default policy that performs no retries, but invokes the action only once. + /// Gets a default policy that performs no retries, but invokes the action only once. /// public static RetryPolicy NoRetry { get; } = new RetryPolicy(new TransientErrorIgnoreStrategy(), RetryStrategy.NoRetry); /// - /// Returns a default policy that implements a fixed retry interval configured with the default retry strategy. + /// Gets a default policy that implements a fixed retry interval configured with the default retry strategy. /// The default retry policy treats all caught exceptions as transient errors. /// public static RetryPolicy DefaultFixed { get; } = new RetryPolicy(new TransientErrorCatchAllStrategy(), RetryStrategy.DefaultFixed); /// - /// Returns a default policy that implements a progressive retry interval configured with the default retry strategy. + /// Gets a default policy that implements a progressive retry interval configured with the default retry strategy. /// The default retry policy treats all caught exceptions as transient errors. /// public static RetryPolicy DefaultProgressive { get; } = new RetryPolicy(new TransientErrorCatchAllStrategy(), RetryStrategy.DefaultProgressive); /// - /// Returns a default policy that implements a random exponential retry interval configured with the default retry strategy. + /// Gets a default policy that implements a random exponential retry interval configured with the default retry strategy. /// The default retry policy treats all caught exceptions as transient errors. /// public static RetryPolicy DefaultExponential { get; } = new RetryPolicy(new TransientErrorCatchAllStrategy(), RetryStrategy.DefaultExponential); @@ -120,7 +120,7 @@ public virtual void ExecuteAction(Action action) { Guard.ArgumentNotNull(action, "action"); this.ExecuteAction( - delegate + () => { action(); return null; @@ -221,6 +221,7 @@ public Task ExecuteAsync(Func taskAction, CancellationToken cancellationTo /// /// Repeatedly executes the specified asynchronous task while it satisfies the current retry policy. /// + /// result type. /// A function that returns a started task (also known as "hot" task). /// /// Returns a task that will run to completion if the original task completes successfully (either the @@ -235,6 +236,7 @@ public Task ExecuteAsync(Func> taskFunc) /// /// Repeatedly executes the specified asynchronous task while it satisfies the current retry policy. /// + /// result type. /// A function that returns a started task (also known as "hot" task). /// The token used to cancel the retry operation. This token does not cancel the execution of the asynchronous task. /// diff --git a/stylecop.props b/stylecop.props index 71c2a8cd1d7..18097e6cf06 100644 --- a/stylecop.props +++ b/stylecop.props @@ -1,6 +1,6 @@ - - + + all runtime; build; native; contentfiles; analyzers diff --git a/test/Microsoft.Azure.Devices.Edge.Test.Common/IotHub.cs b/test/Microsoft.Azure.Devices.Edge.Test.Common/IotHub.cs index c142000483b..2d4242a96e3 100644 --- a/test/Microsoft.Azure.Devices.Edge.Test.Common/IotHub.cs +++ b/test/Microsoft.Azure.Devices.Edge.Test.Common/IotHub.cs @@ -10,7 +10,7 @@ namespace Microsoft.Azure.Devices.Edge.Test.Common using Microsoft.Azure.Devices.Shared; using Microsoft.Azure.EventHubs; using Newtonsoft.Json; - using DeviceTransportType = TransportType; + using DeviceTransportType = Microsoft.Azure.Devices.TransportType; using EventHubTransportType = Microsoft.Azure.EventHubs.TransportType; public class IotHub diff --git a/test/Microsoft.Azure.Devices.Edge.Test.Common/Microsoft.Azure.Devices.Edge.Test.Common.csproj b/test/Microsoft.Azure.Devices.Edge.Test.Common/Microsoft.Azure.Devices.Edge.Test.Common.csproj index 2e1c04f4617..d1347201295 100644 --- a/test/Microsoft.Azure.Devices.Edge.Test.Common/Microsoft.Azure.Devices.Edge.Test.Common.csproj +++ b/test/Microsoft.Azure.Devices.Edge.Test.Common/Microsoft.Azure.Devices.Edge.Test.Common.csproj @@ -2,6 +2,7 @@ netcoreapp2.1 + Debug;Release;CheckInBuild diff --git a/test/Microsoft.Azure.Devices.Edge.Test.Common/Profiler.cs b/test/Microsoft.Azure.Devices.Edge.Test.Common/Profiler.cs index 455a02e2ad0..3b8ba16f361 100644 --- a/test/Microsoft.Azure.Devices.Edge.Test.Common/Profiler.cs +++ b/test/Microsoft.Azure.Devices.Edge.Test.Common/Profiler.cs @@ -26,7 +26,7 @@ public static async Task Run(Func> func, string message, params ob T t = await func(); stopwatch.Stop(); - var args = new object[] { $"{((double)stopwatch.ElapsedMilliseconds) / 1000, 9:+0.000s}" }; + var args = new object[] { $"{((double)stopwatch.ElapsedMilliseconds) / 1000,9:+0.000s}" }; Log.Information($"[{{Elapsed}}] {message}", args.Concat(properties).ToArray()); return t; } diff --git a/test/Microsoft.Azure.Devices.Edge.Test/EndToEnd.cs b/test/Microsoft.Azure.Devices.Edge.Test/EndToEnd.cs index 6d72c65a6f4..f5671e377b5 100644 --- a/test/Microsoft.Azure.Devices.Edge.Test/EndToEnd.cs +++ b/test/Microsoft.Azure.Devices.Edge.Test/EndToEnd.cs @@ -79,6 +79,7 @@ await Profiler.Run( { builder.AddRegistryCredentials(address, username, password); } + builder.AddEdgeAgent(agentImage).WithProxy(proxy); builder.AddEdgeHub(hubImage, optimizeForPerformance).WithProxy(proxy); builder.AddModule("tempSensor", sensorImage); @@ -166,6 +167,7 @@ await Profiler.Run( { builder.AddRegistryCredentials(address, username, password); } + builder.AddEdgeAgent(agentImage).WithProxy(proxy); builder.AddEdgeHub(hubImage, optimizeForPerformance).WithProxy(proxy); builder.AddModule(methodSender, senderImage)