Skip to content

Commit a235731

Browse files
New methods and types for FEB 2021 release. Code cleanup and fomatting.
1 parent 02366c9 commit a235731

File tree

114 files changed

+3419
-1325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+3419
-1325
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Method,Job,AnalyzeLaunchVariance,EvaluateOverhead,MaxAbsoluteError,MaxRelativeError,MinInvokeCount,MinIterationTime,OutlierMode,Affinity,EnvironmentVariables,Jit,Platform,PowerPlanMode,Runtime,AllowVeryLargeObjects,Concurrent,CpuGroups,Force,HeapAffinitizeMask,HeapCount,NoAffinitize,RetainVm,Server,Arguments,BuildConfiguration,Clock,EngineFactory,NuGetReferences,Toolchain,IsMutator,InvocationCount,IterationCount,IterationTime,LaunchCount,MaxIterationCount,MaxWarmupIterationCount,MinIterationCount,MinWarmupIterationCount,RunStrategy,UnrollFactor,WarmupCount,Categories,Mean,Error,StdDev,Gen 0,Gen 1,Gen 2,Allocated
2-
LoadFiles,Job-TZRVGS,False,True,Default,Default,Default,Default,Default,1111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET Core 3.1,False,True,False,True,Default,Default,False,False,True,Default,Default,Default,Default,Default,.NET Core 3.1,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,DirectoryHelper,"228,264.0 μs","1,553.20 μs","1,452.86 μs",0.0000,0.0000,0.0000,4160376 B
3-
LoadFilesAsync,Job-TZRVGS,False,True,Default,Default,Default,Default,Default,1111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET Core 3.1,False,True,False,True,Default,Default,False,False,True,Default,Default,Default,Default,Default,.NET Core 3.1,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,DirectoryHelper,"114,063.0 μs",443.55 μs,414.89 μs,200.0000,0.0000,0.0000,3642381 B
4-
SafeDirectorySearch,Job-TZRVGS,False,True,Default,Default,Default,Default,Default,1111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET Core 3.1,False,True,False,True,Default,Default,False,False,True,Default,Default,Default,Default,Default,.NET Core 3.1,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,DirectoryHelper,893.3 μs,3.63 μs,3.39 μs,0.0000,0.0000,0.0000,774 B
5-
SafeFileSearch,Job-TZRVGS,False,True,Default,Default,Default,Default,Default,1111,Empty,RyuJit,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET Core 3.1,False,True,False,True,Default,Default,False,False,True,Default,Default,Default,Default,Default,.NET Core 3.1,Default,1,Default,Default,Default,Default,Default,Default,Default,Default,16,Default,DirectoryHelper,"43,775.0 μs",145.98 μs,129.41 μs,83.3333,0.0000,0.0000,1569855 B
1+
Method,Categories,Mean,Error,StdDev,Gen 0,Gen 1,Gen 2,Allocated
2+
LoadFiles,DirectoryHelper,"228,264.0 us","1,553.20 us","1,452.86 us",0,0,0,4160376 B
3+
LoadFilesAsync,DirectoryHelper,"114,063.0 us",443.55 us,414.89 us,200,0,0,3642381 B
4+
SafeDirectorySearch,DirectoryHelper,893.3 us,3.63 us,3.39 us,0,0,0,774 B
5+
SafeFileSearch,DirectoryHelper,"43,775.0 us",145.98 us,129.41 us,83.3333,0,0,1569855 B

src/Core/dotNetTips.Utility.Core.Windows/Win32/RegistryHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Created : 10-09-2019
55
//
66
// Last Modified By : David McCarter
7-
// Last Modified On : 09-21-2020
7+
// Last Modified On : 11-04-2020
88
// ***********************************************************************
99
// <copyright file="RegistryHelper.cs" company="David McCarter - dotNetTips.com">
1010
// McCarter Consulting (David McCarter)

src/Core/dotNetTips.Utility.Core.Windows/dotNetTips.Utility.Core.Windows.csproj

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<LangVersion>8.0</LangVersion>
66
<Nullable>enable</Nullable>
7-
<AssemblyVersion>2020.11.9.34759</AssemblyVersion>
8-
<FileVersion>2020.11.9.34759</FileVersion>
7+
<AssemblyVersion>2021.1.9.34787</AssemblyVersion>
8+
<FileVersion>2021.1.9.34787</FileVersion>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
10-
<Version>2020.11.02.01</Version>
10+
<Version>2021.1.4.00</Version>
1111
<Authors>David McCarter</Authors>
1212
<Company>David McCarter - dotNetTips.com</Company>
1313
<Description>Common .NET Core Code for Windows</Description>
@@ -18,21 +18,19 @@
1818
<PackageTags>David McCarter, dotNetDave, dotNetTips.com</PackageTags>
1919
<PackageReleaseNotes>
2020
-- OCT 2019: Initial Release
21-
2221
-- DEC 2019 (QUARTERLY RELEASE): Code cleanup.
23-
2422
-- FEB 2020: Code cleanup.
25-
2623
-- MAR 2020 (QUARTERLY RELEASE): Code cleanup.
27-
2824
-- AUG 2020: Code cleanup.
29-
3025
-- NOV 2020 (QUARTERLY RELEASE): Added TempFileManager.
26+
-- NOV 19, 2020: Minor update.
3127
</PackageReleaseNotes>
3228
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
3329
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
3430
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
3531
<PackageIcon>2020 - dotNetTips - Real World - [email protected]</PackageIcon>
32+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
33+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
3634
</PropertyGroup>
3735

3836
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -59,7 +57,7 @@
5957
<PrivateAssets>all</PrivateAssets>
6058
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
6159
</PackageReference>
62-
<PackageReference Include="Microsoft.Windows.Compatibility" Version="3.1.1" />
60+
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.0" />
6361
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
6462
<PrivateAssets>all</PrivateAssets>
6563
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

src/Standard/dotNetTips.Utility.Standard.Common/ArgumentInvalidException.cs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ public sealed class ArgumentInvalidException : ArgumentException
2626
/// <summary>
2727
/// Initializes a new instance of the <see cref="ArgumentInvalidException" /> class.
2828
/// </summary>
29-
public ArgumentInvalidException() : base(Resources.GoToDotNetTipsComForHelp)
29+
public ArgumentInvalidException()
30+
: base(Resources.GoToDotNetTipsComForHelp)
3031
{
3132
}
3233

3334
/// <summary>
3435
/// Initializes a new instance of the <see cref="ArgumentInvalidException" /> class.
3536
/// </summary>
3637
/// <param name="message">The message that describes the error.</param>
37-
public ArgumentInvalidException(string message) : base(message)
38+
public ArgumentInvalidException(string message)
39+
: base(message)
3840
{
3941
}
4042

@@ -43,7 +45,8 @@ public ArgumentInvalidException(string message) : base(message)
4345
/// </summary>
4446
/// <param name="message">The error message that explains the reason for the exception.</param>
4547
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference if no inner exception is specified.</param>
46-
public ArgumentInvalidException(string message, Exception innerException) : base(message, innerException)
48+
public ArgumentInvalidException(string message, Exception innerException)
49+
: base(message, innerException)
4750
{
4851
}
4952

@@ -52,7 +55,8 @@ public ArgumentInvalidException(string message, Exception innerException) : base
5255
/// </summary>
5356
/// <param name="message">The error message that explains the reason for the exception.</param>
5457
/// <param name="paramName">The name of the parameter that caused the current exception.</param>
55-
public ArgumentInvalidException(string message, string paramName) : base(message, paramName)
58+
public ArgumentInvalidException(string message, string paramName)
59+
: base(message, paramName)
5660
{
5761
}
5862

@@ -62,14 +66,19 @@ public ArgumentInvalidException(string message, string paramName) : base(message
6266
/// <param name="message">The error message that explains the reason for the exception.</param>
6367
/// <param name="paramName">The name of the parameter that caused the current exception.</param>
6468
/// <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException" /> parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.</param>
65-
public ArgumentInvalidException(string message, string paramName, Exception innerException) : base(message, paramName, innerException)
69+
public ArgumentInvalidException(string message, string paramName, Exception innerException)
70+
: base(message, paramName, innerException)
6671
{
6772
}
6873

69-
/// <summary>Initializes a new instance of the <see cref="ArgumentInvalidException"></see> class with serialized data.</summary>
74+
/// <summary>
75+
/// Initializes a new instance of the <see cref="ArgumentInvalidException"></see>
76+
/// class with serialized data.
77+
/// </summary>
7078
/// <param name="info">The object that holds the serialized object data.</param>
7179
/// <param name="context">The contextual information about the source or destination.</param>
72-
private ArgumentInvalidException(SerializationInfo info, StreamingContext context) : base(info, context)
80+
private ArgumentInvalidException(SerializationInfo info, StreamingContext context)
81+
: base(info, context)
7382
{
7483
}
7584
}

src/Standard/dotNetTips.Utility.Standard.Common/ArgumentReadOnlyException.cs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Created : 06-26-2017
55
//
66
// Last Modified By : David McCarter
7-
// Last Modified On : 08-05-2020
7+
// Last Modified On : 11-19-2020
88
// ***********************************************************************
99
// <copyright file="ArgumentReadOnlyException.cs" company="David McCarter - dotNetTips.com">
1010
// McCarter Consulting (David McCarter)
@@ -17,64 +17,63 @@
1717
namespace dotNetTips.Utility.Standard.Common
1818
{
1919
/// <summary>
20-
/// Class ArgumentIsReadOnlyException. Implements the <see cref="System.ArgumentException"/>
20+
/// Class ArgumentIsReadOnlyException. Implements the <see cref="System.ArgumentException" />
2121
/// </summary>
22-
/// <seealso cref="System.ArgumentException"/>
23-
/// <seealso cref="ArgumentException"/>
24-
/// <seealso cref="Exception"/>
22+
/// <seealso cref="System.ArgumentException" />
23+
/// <seealso cref="ArgumentException" />
24+
/// <seealso cref="Exception" />
2525
[Serializable]
2626
public sealed class ArgumentReadOnlyException : ArgumentException
2727
{
2828

2929
/// <summary>
30-
/// Initializes a new instance of the <see cref="ArgumentReadOnlyException"/> class.
30+
/// Initializes a new instance of the <see cref="ArgumentReadOnlyException" /> class.
3131
/// </summary>
32-
public ArgumentReadOnlyException() : base(Resources.ExMessageReadOnlyCollection)
32+
public ArgumentReadOnlyException()
33+
: base(Resources.ExMessageReadOnlyCollection)
3334
{
3435
}
3536

3637
/// <summary>
37-
/// Initializes a new instance of the <see cref="ArgumentReadOnlyException"/> class.
38+
/// Initializes a new instance of the <see cref="ArgumentReadOnlyException" /> class.
3839
/// </summary>
3940
/// <param name="paramName">Name of the parameter.</param>
40-
public ArgumentReadOnlyException(string paramName) : base(Resources.ExMessageReadOnlyCollection, paramName)
41+
public ArgumentReadOnlyException(string paramName)
42+
: base(Resources.ExMessageReadOnlyCollection, paramName)
4143
{
4244
}
4345

4446
/// <summary>
45-
/// Initializes a new instance of the <see cref="ArgumentReadOnlyException"/> class.
47+
/// Initializes a new instance of the <see cref="ArgumentReadOnlyException" /> class.
4648
/// </summary>
4749
/// <param name="message">The message.</param>
4850
/// <param name="paramName">Name of the parameter.</param>
49-
public ArgumentReadOnlyException(string message, string paramName) : base(paramName, message)
51+
public ArgumentReadOnlyException(string message, string paramName)
52+
: base(paramName, message)
5053
{
5154
}
5255

5356
/// <summary>
54-
/// Initializes a new instance of the <see cref="ArgumentReadOnlyException"/> class.
57+
/// Initializes a new instance of the <see cref="ArgumentReadOnlyException" /> class.
5558
/// </summary>
5659
/// <param name="message">The error message that explains the reason for the exception.</param>
57-
/// <param name="innerException">
58-
/// The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if
59-
/// no inner exception is specified.
60-
/// </param>
61-
public ArgumentReadOnlyException(string message, Exception innerException) : base(message, innerException)
60+
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if
61+
/// no inner exception is specified.</param>
62+
public ArgumentReadOnlyException(string message, Exception innerException)
63+
: base(message, innerException)
6264
{
6365
}
6466

6567
/// <summary>
66-
/// Initializes a new instance of the <see cref="ArgumentReadOnlyException"/> class.
68+
/// Initializes a new instance of the <see cref="ArgumentReadOnlyException" /> class.
6769
/// </summary>
6870
/// <param name="message">The error message that explains the reason for the exception.</param>
6971
/// <param name="paramName">The name of the parameter that caused the current exception.</param>
70-
/// <param name="innerException">
71-
/// The exception that is the cause of the current exception. If the <paramref name="innerException"/> parameter
72-
/// is not a null reference, the current exception is raised in a <see langword="catch"/> block that handles the
73-
/// inner exception.
74-
/// </param>
75-
public ArgumentReadOnlyException(string message, string paramName, Exception innerException) : base(message,
76-
paramName,
77-
innerException)
72+
/// <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException" /> parameter
73+
/// is not a null reference, the current exception is raised in a <see langword="catch" /> block that handles the
74+
/// inner exception.</param>
75+
public ArgumentReadOnlyException(string message, string paramName, Exception innerException)
76+
: base(message, paramName, innerException)
7877
{
7978
}
8079

@@ -83,7 +82,8 @@ public ArgumentReadOnlyException(string message, string paramName, Exception inn
8382
/// </summary>
8483
/// <param name="info">The object that holds the serialized object data.</param>
8584
/// <param name="context">The contextual information about the source or destination.</param>
86-
private ArgumentReadOnlyException(SerializationInfo info, StreamingContext context) : base(info, context)
85+
private ArgumentReadOnlyException(SerializationInfo info, StreamingContext context)
86+
: base(info, context)
8787
{
8888
}
8989
}

src/Standard/dotNetTips.Utility.Standard.Common/DirectoryNotFoundException.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Created : 06-06-2018
55
//
66
// Last Modified By : David McCarter
7-
// Last Modified On : 08-04-2020
7+
// Last Modified On : 11-19-2020
88
// ***********************************************************************
99
// <copyright file="DirectoryNotFoundException.cs" company="David McCarter - dotNetTips.com">
1010
// McCarter Consulting (David McCarter)
@@ -40,7 +40,8 @@ public DirectoryNotFoundException()
4040
/// Initializes a new instance of the <see cref="DirectoryNotFoundException" /> class.
4141
/// </summary>
4242
/// <param name="message">The message that describes the error.</param>
43-
public DirectoryNotFoundException(string message) : base(message)
43+
public DirectoryNotFoundException(string message)
44+
: base(message)
4445
{
4546
}
4647

@@ -49,7 +50,8 @@ public DirectoryNotFoundException(string message) : base(message)
4950
/// </summary>
5051
/// <param name="message">The message that describes the error.</param>
5152
/// <param name="directory">The directory.</param>
52-
public DirectoryNotFoundException(string message, string directory) : base(message)
53+
public DirectoryNotFoundException(string message, string directory)
54+
: base(message)
5355
{
5456
this.Directory = directory;
5557
}
@@ -59,7 +61,8 @@ public DirectoryNotFoundException(string message, string directory) : base(messa
5961
/// </summary>
6062
/// <param name="message">The error message that explains the reason for the exception.</param>
6163
/// <param name="innerException">The inner exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param>
62-
public DirectoryNotFoundException(string message, Exception innerException) : base(message, innerException)
64+
public DirectoryNotFoundException(string message, Exception innerException)
65+
: base(message, innerException)
6366
{
6467
}
6568

@@ -69,7 +72,8 @@ public DirectoryNotFoundException(string message, Exception innerException) : ba
6972
/// <param name="message">The error message that explains the reason for the exception.</param>
7073
/// <param name="directory">The directory.</param>
7174
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.</param>
72-
public DirectoryNotFoundException(string message, string directory, Exception innerException) : base(message, innerException)
75+
public DirectoryNotFoundException(string message, string directory, Exception innerException)
76+
: base(message, innerException)
7377
{
7478
this.Directory = directory;
7579
}
@@ -80,7 +84,8 @@ public DirectoryNotFoundException(string message, string directory, Exception in
8084
/// <param name="message">The message.</param>
8185
/// <param name="ex">The Exception.</param>
8286
/// <param name="userMessage">The user message.</param>
83-
public DirectoryNotFoundException(string message, Exception ex, string userMessage) : base(message, ex, userMessage)
87+
public DirectoryNotFoundException(string message, Exception ex, string userMessage)
88+
: base(message, ex, userMessage)
8489
{
8590
}
8691

@@ -91,7 +96,8 @@ public DirectoryNotFoundException(string message, Exception ex, string userMessa
9196
/// <param name="context">The <see cref="StreamingContext"></see> that contains contextual information about the source or destination.</param>
9297
/// <exception cref="ArgumentNullException">The <paramref name="info">info</paramref> parameter is null.</exception>
9398
/// <exception cref="SerializationException">The class name is null or <see cref="Exception.HResult"></see> is zero (0).</exception>
94-
protected DirectoryNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context)
99+
protected DirectoryNotFoundException(SerializationInfo info, StreamingContext context)
100+
: base(info, context)
95101
{
96102

97103
}

0 commit comments

Comments
 (0)