diff --git a/.editorconfig b/.editorconfig
index 6d18247..fc1b7bd 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,27 +1,122 @@
-# EditorConfig is awesome: http://EditorConfig.org
+# EditorConfig is awesome: https://EditorConfig.org
-# top-most EditorConfig file
root = true
[*]
-charset = utf-8
+charset=utf-8
end_of_line = lf
-indent_brace_style = K&R
-indent_size = 4
-indent_style = space
-insert_final_newline = true
-max_line_length = 120
-tab_width = 4
-trim_trailing_whitespace = true
-curly_bracket_next_line = true
+insert_final_newline=true
+indent_style=space
+indent_size=4
-[*.{js,ts}]
-quote_type = double
+# Microsoft .NET properties
+csharp_new_line_before_members_in_object_initializers=false
+csharp_preferred_modifier_order=public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
+csharp_space_after_cast=false
+csharp_style_var_elsewhere=false:hint
+csharp_style_var_for_built_in_types=false:hint
+csharp_style_var_when_type_is_apparent=true:hint
+csharp_preserve_single_line_statements=false
+csharp_preserve_single_line_blocks=true
+dotnet_style_predefined_type_for_locals_parameters_members=true:hint
+dotnet_style_predefined_type_for_member_access=true:hint
+dotnet_style_qualification_for_event=true:hint
+dotnet_style_qualification_for_field=true:hint
+dotnet_style_qualification_for_method=true:hint
+dotnet_style_qualification_for_property=true:hint
+dotnet_style_require_accessibility_modifiers=for_non_interface_members:hint
-[*.json]
-indent_size = 2
-tab_width = 2
-indent_style = space
+# ReSharper properties
+resharper_alignment_tab_fill_style=optimal_fill
+resharper_apply_on_completion=true
+resharper_blank_lines_after_control_transfer_statements=1
+resharper_blank_lines_around_single_line_auto_property=1
+resharper_blank_lines_around_single_line_property=1
+resharper_blank_lines_before_single_line_comment=1
+resharper_blank_lines_between_using_groups=1
+resharper_braces_for_for=required
+resharper_braces_for_foreach=required
+resharper_braces_for_ifelse=required
+resharper_braces_for_while=required
+resharper_can_use_global_alias=false
+resharper_csharp_blank_lines_around_single_line_field=1
+resharper_csharp_blank_lines_around_single_line_invocable=1
+resharper_csharp_indent_style=tab
+resharper_csharp_insert_final_newline=true
+resharper_csharp_keep_blank_lines_in_code=1
+resharper_csharp_keep_blank_lines_in_declarations=1
+resharper_csharp_new_line_before_while=true
+resharper_csharp_use_indent_from_vs=false
+resharper_csharp_wrap_arguments_style=chop_if_long
+resharper_csharp_wrap_extends_list_style=chop_if_long
+resharper_csharp_wrap_parameters_style=chop_if_long
+resharper_css_insert_final_newline=false
+resharper_enforce_line_ending_style=true
+resharper_html_insert_final_newline=false
+resharper_indent_nested_fixed_stmt=true
+resharper_js_indent_style=tab
+resharper_js_insert_final_newline=true
+resharper_js_keep_blank_lines_in_code=1
+resharper_js_stick_comment=false
+resharper_js_use_indent_from_vs=false
+resharper_js_wrap_before_binary_opsign=true
+resharper_js_wrap_chained_method_calls=chop_if_long
+resharper_keep_blank_lines_between_declarations=1
+resharper_min_blank_lines_after_imports=1
+resharper_place_attribute_on_same_line=False
+resharper_place_constructor_initializer_on_same_line=false
+resharper_place_type_constraints_on_same_line=false
+resharper_protobuf_insert_final_newline=false
+resharper_qualified_using_at_nested_scope=true
+resharper_resx_insert_final_newline=false
+resharper_space_within_single_line_array_initializer_braces=true
+resharper_use_indents_from_main_language_in_file=false
+resharper_vb_insert_final_newline=false
+resharper_wrap_after_declaration_lpar=true
+resharper_wrap_after_invocation_lpar=true
+resharper_wrap_before_extends_colon=true
+resharper_wrap_before_first_type_parameter_constraint=true
+resharper_wrap_before_type_parameter_langle=true
+resharper_xmldoc_indent_child_elements=ZeroIndent
+resharper_xmldoc_indent_text=ZeroIndent
+resharper_xmldoc_insert_final_newline=false
+resharper_xml_insert_final_newline=false
-[*.yaml]
-indent_style = space
+# ReSharper inspection severities
+resharper_check_namespace_highlighting=none
+resharper_convert_to_auto_property_highlighting=none
+resharper_localizable_element_highlighting=none
+resharper_redundant_comma_in_attribute_list_highlighting=none
+resharper_redundant_comma_in_enum_declaration_highlighting=none
+resharper_redundant_comma_in_initializer_highlighting=none
+resharper_string_compare_to_is_culture_specific_highlighting=none
+resharper_string_index_of_is_culture_specific_1_highlighting=none
+resharper_use_null_propagation_highlighting=none
+resharper_use_object_or_collection_initializer_highlighting=hint
+resharper_use_string_interpolation_highlighting=hint
+
+# Matches the exact files either package.json or .travis.yml
+[{package.json,.travis.yml}]
+indent_style=space
+indent_size=2
+tab_width=2
+
+[*.{cs,js,json,jsx,proto,resjson,ts,tsx}]
+indent_style=space
+indent_size=space
+tab_width=4
+
+[*.{asax,ascx,aspx,cshtml,css,htm,html,master,razor,skin,vb,xaml,xamlx,xoml}]
+indent_style=space
+indent_size=4
+tab_width=4
+
+[*.{appxmanifest,build,config,csproj,dbml,discomap,dtd,jsproj,lsproj,njsproj,nuspec,proj,props,resw,resx,StyleCop,targets,tasks,vbproj,xml,xsd}]
+indent_style=space
+indent_size=2
+tab_width=2
+
+[*.proto]
+indent_style=space
+indent_size=2
+tab_width=2
diff --git a/MfGames.Locking.sln.DotSettings b/MfGames.Locking.sln.DotSettings
index 59dfc40..731bb55 100644
--- a/MfGames.Locking.sln.DotSettings
+++ b/MfGames.Locking.sln.DotSettings
@@ -1,4 +1,5 @@
+ Inherit
DO_NOT_SHOW
@@ -53,10 +54,11 @@
15
OPTIMAL_FILL
False
+ False
False
False
False
- False
+
False
False
False
@@ -68,7 +70,7 @@
1
1
-
+
NEXT_LINE
SEPARATE
ALWAYS_ADD
@@ -82,7 +84,9 @@
NEXT_LINE
1
1
+ False
True
+ EXPANDED
NEVER
NEVER
False
@@ -93,18 +97,24 @@
True
False
True
-
+
False
True
+ False
False
True
True
CHOP_IF_LONG
+ CHOP_IF_LONG
+ True
True
True
True
+ CHOP_IF_LONG
+ CHOP_IF_LONG
CHOP_IF_LONG
+ 80
CHOP_IF_LONG
OPTIMAL_FILL
OPTIMAL_FILL
@@ -128,6 +138,7 @@
OPTIMAL_FILL
ZeroIndent
ZeroIndent
+ 80
OPTIMAL_FILL
<?xml version="1.0" encoding="utf-16"?>
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
@@ -521,17 +532,14 @@ II.2.12 <HandlesEvent />
</Patterns>
CustomLayout
- True
+ False
False
True
UseExplicitType
UseVarWhenEvident
UseVarWhenEvident
True
- <copyright file="$FILENAME$" company="Moonfire Games">
-Copyright (c) Moonfire Games. MIT License.
-</copyright>
-
+
False
@@ -660,6 +668,7 @@ Copyright (c) Moonfire Games. MIT License.
True
True
True
+ True
True
True
True
@@ -669,11 +678,11 @@ Copyright (c) Moonfire Games. MIT License.
True
True
True
+ True
True
True
Always
False
- <data><IncludeFilters /><ExcludeFilters><Filter ModuleMask="MfGames.Locking.Tests" ModuleVersionMask="*" ClassMask="*" FunctionMask="*" IsEnabled="True" /></ExcludeFilters></data>
ForWarningsOrErrors
tag
10
@@ -969,6 +978,24 @@ $END$
True
2.0
InCSharpExpression
+ True
+ True
+ Inserts a strongly-type identifier property.
+ True
+ 0
+ True
+ getCurrentTime("yyyy_MM_dd_HHmmss")
+ -1
+ 1
+ True
+ True
+ 2.0
+ InCSharpFile
+ InsertIdProperty
+ True
+ /// <inheritdoc />
+ public override $Type$Id $Type$Id => new $Type$Id($When$);
+
True
True
Imported 1/13/2012
@@ -1001,6 +1028,26 @@ $END$
True
2.0
InCSharpStatement
+ True
+ True
+ Inserts a strongly-typed identifier.
+ True
+ 0
+ False
+
+
+
+ True
+ getCurrentTime("yyyy_MM_dd_HHmmss")
+ -1
+ 1
+ True
+ True
+ 2.0
+ InCSharpFile
+ InsertId
+ True
+ new $Type$Id($When$)
True
True
Calls the session server to validate a user
@@ -1180,23 +1227,36 @@ if ($CollectionType$Collection.Count > 0)
True
2.0
InCSharpStatement
- True
- True
- Imported 1/13/2012
- WEI Standard
- #region (WEI)
- True
- #region(WEI)
- True
- #region $RegionName$$END$
-$SELECTION$
-#endregion $RegionName$
-
- True
- 0
- True
- 2.0
- InCSharpFile
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
True
True
Imported 1/13/2012
@@ -1304,4 +1364,5 @@ using(DataAccessAdapter dataAccessAdapter = new DataAccessAdapter(ConnectionStri
0
True
2.0
- InCSharpStatement
+ InCSharpStatement
+
diff --git a/src/MfGames.Locking.Tests/LockTests.cs b/src/MfGames.Locking.Tests/LockTests.cs
index 75b883c..0ef0324 100644
--- a/src/MfGames.Locking.Tests/LockTests.cs
+++ b/src/MfGames.Locking.Tests/LockTests.cs
@@ -1,19 +1,17 @@
-//
-// Copyright (c) Moonfire Games. MIT License.
-//
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+
+using Xunit;
+using Xunit.Abstractions;
namespace MfGames.Locking.Tests
{
- using System;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
- using Xunit;
- using Xunit.Abstractions;
-
public class LockTests
{
- public static readonly TimeSpan ProcessTime = TimeSpan.FromMilliseconds(50);
+ public static readonly TimeSpan ProcessTime =
+ TimeSpan.FromMilliseconds(50);
private readonly List events;
@@ -44,8 +42,16 @@ namespace MfGames.Locking.Tests
public void ReadBlocksWrite()
{
Task.WaitAll(
- Task.Run(() => this.ReportInReadLock(ProcessTime * 0, ProcessTime * 3, 1)),
- Task.Run(() => this.ReportInWriteLock(ProcessTime * 1, ProcessTime * 1, 2)));
+ Task.Run(
+ () => this.ReportInReadLock(
+ ProcessTime * 0,
+ ProcessTime * 3,
+ 1)),
+ Task.Run(
+ () => this.ReportInWriteLock(
+ ProcessTime * 1,
+ ProcessTime * 1,
+ 2)));
this.Verify();
}
@@ -54,9 +60,21 @@ namespace MfGames.Locking.Tests
public void ReadsDoNotBlockReads()
{
Task.WaitAll(
- Task.Run(() => this.ReportInReadLock(ProcessTime, ProcessTime * 5, 3)),
- Task.Run(() => this.ReportInReadLock(ProcessTime * 2, ProcessTime, 1)),
- Task.Run(() => this.ReportInReadLock(ProcessTime * 2, ProcessTime * 2, 2)));
+ Task.Run(
+ () => this.ReportInReadLock(
+ ProcessTime,
+ ProcessTime * 5,
+ 3)),
+ Task.Run(
+ () => this.ReportInReadLock(
+ ProcessTime * 2,
+ ProcessTime,
+ 1)),
+ Task.Run(
+ () => this.ReportInReadLock(
+ ProcessTime * 2,
+ ProcessTime * 2,
+ 2)));
this.Verify();
}
@@ -65,7 +83,8 @@ namespace MfGames.Locking.Tests
public void ThreadedDataGatheringWorks()
{
Task.WaitAll(
- Task.Run(() => this.ReportInReadLock(ProcessTime, ProcessTime, 1)));
+ Task.Run(
+ () => this.ReportInReadLock(ProcessTime, ProcessTime, 1)));
this.Verify();
}
@@ -74,9 +93,21 @@ namespace MfGames.Locking.Tests
public void UpgradableBlocksUpgradable()
{
Task.WaitAll(
- Task.Run(() => this.ReportInUpgradableLock(ProcessTime, ProcessTime * 5, 1)),
- Task.Run(() => this.ReportInUpgradableLock(ProcessTime * 3, ProcessTime, 2)),
- Task.Run(() => this.ReportInUpgradableLock(ProcessTime * 2, ProcessTime * 2, 3)));
+ Task.Run(
+ () => this.ReportInUpgradableLock(
+ ProcessTime,
+ ProcessTime * 5,
+ 1)),
+ Task.Run(
+ () => this.ReportInUpgradableLock(
+ ProcessTime * 3,
+ ProcessTime,
+ 2)),
+ Task.Run(
+ () => this.ReportInUpgradableLock(
+ ProcessTime * 2,
+ ProcessTime * 2,
+ 3)));
this.Verify();
}
@@ -85,9 +116,21 @@ namespace MfGames.Locking.Tests
public void UpgradableDoesNotBlockReads()
{
Task.WaitAll(
- Task.Run(() => this.ReportInUpgradableLock(ProcessTime, ProcessTime * 5, 3)),
- Task.Run(() => this.ReportInReadLock(ProcessTime * 2, ProcessTime, 1)),
- Task.Run(() => this.ReportInReadLock(ProcessTime * 2, ProcessTime * 2, 2)));
+ Task.Run(
+ () => this.ReportInUpgradableLock(
+ ProcessTime,
+ ProcessTime * 5,
+ 3)),
+ Task.Run(
+ () => this.ReportInReadLock(
+ ProcessTime * 2,
+ ProcessTime,
+ 1)),
+ Task.Run(
+ () => this.ReportInReadLock(
+ ProcessTime * 2,
+ ProcessTime * 2,
+ 2)));
this.Verify();
}
@@ -96,8 +139,16 @@ namespace MfGames.Locking.Tests
public void WriteBlockRead()
{
Task.WaitAll(
- Task.Run(() => this.ReportInWriteLock(ProcessTime, ProcessTime * 3, 1)),
- Task.Run(() => this.ReportInReadLock(ProcessTime * 2, ProcessTime, 2)));
+ Task.Run(
+ () => this.ReportInWriteLock(
+ ProcessTime,
+ ProcessTime * 3,
+ 1)),
+ Task.Run(
+ () => this.ReportInReadLock(
+ ProcessTime * 2,
+ ProcessTime,
+ 2)));
this.Verify();
}
@@ -106,9 +157,21 @@ namespace MfGames.Locking.Tests
public void WriteBlockReads()
{
Task.WaitAll(
- Task.Run(() => this.ReportInWriteLock(ProcessTime, ProcessTime * 5, 1)),
- Task.Run(() => this.ReportInReadLock(ProcessTime * 2, ProcessTime, 2)),
- Task.Run(() => this.ReportInReadLock(ProcessTime * 2, ProcessTime * 2, 3)));
+ Task.Run(
+ () => this.ReportInWriteLock(
+ ProcessTime,
+ ProcessTime * 5,
+ 1)),
+ Task.Run(
+ () => this.ReportInReadLock(
+ ProcessTime * 2,
+ ProcessTime,
+ 2)),
+ Task.Run(
+ () => this.ReportInReadLock(
+ ProcessTime * 2,
+ ProcessTime * 2,
+ 3)));
this.Verify();
}
@@ -118,7 +181,8 @@ namespace MfGames.Locking.Tests
// This is a monitor lock on the slim, just to give us a second lock.
lock (this.locker)
{
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => adding sequence");
+ this.output.WriteLine(
+ this.Elapsed + ": " + sequence + " => adding sequence");
this.events.Add(sequence);
}
}
@@ -130,9 +194,11 @@ namespace MfGames.Locking.Tests
TimeSpan processTime,
int sequence)
{
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => starting process");
+ this.output.WriteLine(
+ this.Elapsed + ": " + sequence + " => starting process");
Thread.Sleep(processTime);
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => finished process");
+ this.output.WriteLine(
+ this.Elapsed + ": " + sequence + " => finished process");
this.AddEvent(sequence);
}
@@ -141,15 +207,30 @@ namespace MfGames.Locking.Tests
TimeSpan processTime,
int sequence)
{
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => entering read lock: " + sequence);
+ this.output.WriteLine(
+ this.Elapsed
+ + ": "
+ + sequence
+ + " => entering read lock: "
+ + sequence);
Thread.Sleep(settleTime);
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => locking read lock: " + sequence);
+ this.output.WriteLine(
+ this.Elapsed
+ + ": "
+ + sequence
+ + " => locking read lock: "
+ + sequence);
using (new ReadLock(this.locker))
{
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => starting read lock: " + sequence);
+ this.output.WriteLine(
+ this.Elapsed
+ + ": "
+ + sequence
+ + " => starting read lock: "
+ + sequence);
this.Report(processTime, sequence);
}
@@ -160,15 +241,30 @@ namespace MfGames.Locking.Tests
TimeSpan processTime,
int sequence)
{
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => entering upgradable lock: " + sequence);
+ this.output.WriteLine(
+ this.Elapsed
+ + ": "
+ + sequence
+ + " => entering upgradable lock: "
+ + sequence);
Thread.Sleep(settleTime);
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => locking upgradable lock: " + sequence);
+ this.output.WriteLine(
+ this.Elapsed
+ + ": "
+ + sequence
+ + " => locking upgradable lock: "
+ + sequence);
using (new UpgradableLock(this.locker))
{
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => starting upgradable lock: " + sequence);
+ this.output.WriteLine(
+ this.Elapsed
+ + ": "
+ + sequence
+ + " => starting upgradable lock: "
+ + sequence);
this.Report(processTime, sequence);
}
@@ -179,15 +275,30 @@ namespace MfGames.Locking.Tests
TimeSpan processTime,
int sequence)
{
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => entering write lock: " + sequence);
+ this.output.WriteLine(
+ this.Elapsed
+ + ": "
+ + sequence
+ + " => entering write lock: "
+ + sequence);
Thread.Sleep(settleTime);
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => locking write lock: " + sequence);
+ this.output.WriteLine(
+ this.Elapsed
+ + ": "
+ + sequence
+ + " => locking write lock: "
+ + sequence);
using (new WriteLock(this.locker))
{
- this.output.WriteLine(this.Elapsed + ": " + sequence + " => starting write lock: " + sequence);
+ this.output.WriteLine(
+ this.Elapsed
+ + ": "
+ + sequence
+ + " => starting write lock: "
+ + sequence);
this.Report(processTime, sequence);
}
@@ -198,7 +309,8 @@ namespace MfGames.Locking.Tests
///
private void Verify()
{
- this.output.WriteLine("Final Sequence: " + string.Join(", ", this.events));
+ this.output.WriteLine(
+ "Final Sequence: " + string.Join(", ", this.events));
for (int i = 1; i <= this.events.Count; i++)
{
diff --git a/src/MfGames.Locking.Tests/MfGames.Locking.Tests.csproj b/src/MfGames.Locking.Tests/MfGames.Locking.Tests.csproj
index 4277460..3388d22 100644
--- a/src/MfGames.Locking.Tests/MfGames.Locking.Tests.csproj
+++ b/src/MfGames.Locking.Tests/MfGames.Locking.Tests.csproj
@@ -8,6 +8,14 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/src/MfGames.Locking/MfGames.Locking.csproj b/src/MfGames.Locking/MfGames.Locking.csproj
index 7080019..ba6bd73 100644
--- a/src/MfGames.Locking/MfGames.Locking.csproj
+++ b/src/MfGames.Locking/MfGames.Locking.csproj
@@ -11,7 +11,7 @@
Git
locking
https://gitlab.com/dmoonfire/mfgames-locking-cil
- https://gitlab.com/dmoonfire/mfgames-locking-cil/blob/master/LICENSE.txt
+ MIT
An IDisposable pattern for using ReaderWriterLockSlim.
@@ -28,10 +28,14 @@
-
-
-
-
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/src/MfGames.Locking/NestableReadLock.cs b/src/MfGames.Locking/NestableReadLock.cs
index f353b45..896f568 100644
--- a/src/MfGames.Locking/NestableReadLock.cs
+++ b/src/MfGames.Locking/NestableReadLock.cs
@@ -1,12 +1,8 @@
-//
-// Copyright (c) Moonfire Games. MIT License.
-//
+using System;
+using System.Threading;
namespace MfGames.Locking
{
- using System;
- using System.Threading;
-
///
/// Defines a ReaderWriterLockSlim read-only lock.
///
diff --git a/src/MfGames.Locking/NestableUpgradableReadLock.cs b/src/MfGames.Locking/NestableUpgradableReadLock.cs
index c37287d..c36365a 100644
--- a/src/MfGames.Locking/NestableUpgradableReadLock.cs
+++ b/src/MfGames.Locking/NestableUpgradableReadLock.cs
@@ -1,12 +1,8 @@
-//
-// Copyright (c) Moonfire Games. MIT License.
-//
+using System;
+using System.Threading;
namespace MfGames.Locking
{
- using System;
- using System.Threading;
-
///
/// Defines a ReaderWriterLockSlim upgradable read lock.
///
@@ -17,10 +13,12 @@ namespace MfGames.Locking
private readonly ReaderWriterLockSlim readerWriterLockSlim;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the
+ /// class.
///
/// The reader writer lock slim.
- public NestableUpgradableReadLock(ReaderWriterLockSlim readerWriterLockSlim)
+ public NestableUpgradableReadLock(
+ ReaderWriterLockSlim readerWriterLockSlim)
{
// Keep track of the lock since we'll need it to release the lock.
this.readerWriterLockSlim = readerWriterLockSlim;
diff --git a/src/MfGames.Locking/NestableWriteLock.cs b/src/MfGames.Locking/NestableWriteLock.cs
index d1701de..3419ab4 100644
--- a/src/MfGames.Locking/NestableWriteLock.cs
+++ b/src/MfGames.Locking/NestableWriteLock.cs
@@ -1,12 +1,8 @@
-//
-// Copyright (c) Moonfire Games. MIT License.
-//
+using System;
+using System.Threading;
namespace MfGames.Locking
{
- using System;
- using System.Threading;
-
///
/// Defines a ReaderWriterLockSlim write lock.
///
diff --git a/src/MfGames.Locking/ReadLock.cs b/src/MfGames.Locking/ReadLock.cs
index 995f4ac..5775059 100644
--- a/src/MfGames.Locking/ReadLock.cs
+++ b/src/MfGames.Locking/ReadLock.cs
@@ -1,12 +1,8 @@
-//
-// Copyright (c) Moonfire Games. MIT License.
-//
+using System;
+using System.Threading;
namespace MfGames.Locking
{
- using System;
- using System.Threading;
-
///
///
/// Defines a ReaderWriterLockSlim read-only lock.
diff --git a/src/MfGames.Locking/TryGetCreate.cs b/src/MfGames.Locking/TryGetCreate.cs
index 8152b65..e53cc6c 100644
--- a/src/MfGames.Locking/TryGetCreate.cs
+++ b/src/MfGames.Locking/TryGetCreate.cs
@@ -1,12 +1,8 @@
-//
-// Copyright (c) Moonfire Games. MIT License.
-//
+using System;
+using System.Threading;
namespace MfGames.Locking
{
- using System;
- using System.Threading;
-
///
/// Implements the basic pattern for getting an item from a cache using
/// the ReaderWriterLockSlim class. This attempts to get it using a read-only
diff --git a/src/MfGames.Locking/TryGetHandler.cs b/src/MfGames.Locking/TryGetHandler.cs
index e6339c5..94a3df7 100644
--- a/src/MfGames.Locking/TryGetHandler.cs
+++ b/src/MfGames.Locking/TryGetHandler.cs
@@ -1,8 +1,4 @@
-//
-// Copyright (c) Moonfire Games. MIT License.
-//
-
-namespace MfGames.Locking
+namespace MfGames.Locking
{
///
/// Defines the common try/get handler to retrieve an item of a given type.
diff --git a/src/MfGames.Locking/UpgradableLock.cs b/src/MfGames.Locking/UpgradableLock.cs
index 1906ae3..d2a5177 100644
--- a/src/MfGames.Locking/UpgradableLock.cs
+++ b/src/MfGames.Locking/UpgradableLock.cs
@@ -1,12 +1,8 @@
-//
-// Copyright (c) Moonfire Games. MIT License.
-//
+using System;
+using System.Threading;
namespace MfGames.Locking
{
- using System;
- using System.Threading;
-
///
/// Defines a ReaderWriterLockSlim read-only lock.
///
@@ -25,7 +21,8 @@ namespace MfGames.Locking
}
///
- /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+ /// Performs application-defined tasks associated with freeing, releasing, or
+ /// resetting unmanaged resources.
///
public void Dispose()
{
diff --git a/src/MfGames.Locking/WriteLock.cs b/src/MfGames.Locking/WriteLock.cs
index ff99346..dea0595 100644
--- a/src/MfGames.Locking/WriteLock.cs
+++ b/src/MfGames.Locking/WriteLock.cs
@@ -1,12 +1,8 @@
-//
-// Copyright (c) Moonfire Games. MIT License.
-//
+using System;
+using System.Threading;
namespace MfGames.Locking
{
- using System;
- using System.Threading;
-
///
/// Defines a ReaderWriterLockSlim read-only lock.
///
@@ -25,7 +21,8 @@ namespace MfGames.Locking
}
///
- /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+ /// Performs application-defined tasks associated with freeing, releasing, or
+ /// resetting unmanaged resources.
///
public void Dispose()
{
diff --git a/src/stylecop.json b/src/stylecop.json
deleted file mode 100644
index 94dc57b..0000000
--- a/src/stylecop.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "$schema":
- "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
- "settings": {
- "documentationRules": {
- "companyName": "Moonfire Games",
- "copyrightText": "Copyright (c) Moonfire Games. MIT License."
- }
- }
-}