Skip to content

Commit

Permalink
Merge pull request #175 from WildGums/GitHubSync/20200715-093209
Browse files Browse the repository at this point in the history
GitHubSync update
  • Loading branch information
GeertvanHorrik committed Jul 15, 2020
2 parents 13a6efb + 63b2edb commit 2a6fe5e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
31 changes: 27 additions & 4 deletions src/Directory.Build.analyzers.props
Expand Up @@ -4,11 +4,34 @@
-->

<ItemGroup>
<PackageReference Include="Catel.Analyzers" Version="1.1.0-alpha0146" PrivateAssets="All" />
<PackageReference Include="CatenaLogic.Analyzers" Version="1.0.0-alpha0019" PrivateAssets="All" />
<!-- <PackageReference Include="ClrHeapAllocationAnalyzer" Version="3.0.0" PrivateAssets="All" /> -->
<PackageReference Include="Catel.Analyzers" Version="1.1.0-alpha0146" PrivateAssets="all">
<IncludeAssets>build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="CatenaLogic.Analyzers" Version="1.0.0-alpha0019" PrivateAssets="all">
<IncludeAssets>build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<!-- <PackageReference Include="ClrHeapAllocationAnalyzer" Version="3.0.0" PrivateAssets="all" /> -->
<PackageReference Include="WpfAnalyzers" Version="3.1.0" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<IncludeAssets>build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<!--<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0" PrivateAssets="all">
<IncludeAssets>build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>-->
</ItemGroup>

<!--
FxCop tweaks:
- CA1030: Consider making method an event
- CA1031: Catch a more specific exception, or rethrow
- CA1054: Uri parameters should not be strings
- CA1062: Validate parameter 'x' is non-null before using it
- CA1724: Namespace conflicts
- CA1810: Use static initializers instead of static constructor
- CA2007: Consider calling ConfigureAwait on the awaited task
- CA2237: Mark types implementing ISerializable with [Serializable] attribute
-->
<PropertyGroup>
<NoWarn>$(NoWarn);CA1030;CA1031;CA1054;CA1062;CA1724;CA1810;CA2007;CA2237</NoWarn>
<NoError>$(NoError);CA1030;CA1031;CA1054;CA1062;CA1724;CA810;CA2007;CA2237</NoError>
</PropertyGroup>
</Project>
3 changes: 2 additions & 1 deletion src/MethodTimeLogger.cs
@@ -1,6 +1,7 @@
using System.Reflection;
using Catel.Logging;
using System;
using System.Globalization;

/// <summary>
/// Note: do not rename this class or put it inside a namespace.
Expand All @@ -26,7 +27,7 @@ public static void Log(Type type, string methodName, long milliseconds, string m
return;
}

var finalMessage = $"[METHODTIMER] {type.Name}.{methodName} took '{milliseconds.ToString()}' ms";
var finalMessage = $"[METHODTIMER] {type.Name}.{methodName} took '{milliseconds.ToString(CultureInfo.InvariantCulture)}' ms";

if (!string.IsNullOrWhiteSpace(message))
{
Expand Down

0 comments on commit 2a6fe5e

Please sign in to comment.