From 35f979bdf8e7e9d71d445eb2e000720a0e96b590 Mon Sep 17 00:00:00 2001 From: Shuai Zhang Date: Mon, 19 Sep 2022 16:47:02 +0800 Subject: [PATCH] style: fix SA1633 for other files. --- .../EmptyDisposable.cs | 6 ++ .../PollingFileChangeToken.cs | 6 ++ .../VisiableToUnitTestProject.cs | 6 ++ .../WebHdfsDirectoryContents.cs | 6 ++ .../WebHdfsFileInfo.cs | 6 ++ .../WebHdfsFileProvider.cs | 6 ++ .../WebHdfsFileStatus.cs | 6 ++ .../OptionsDedupChangeExtensions.cs | 6 ++ .../PhiFailureDetector.Console/Program.cs | 8 +- .../ExponentialPhi_UnitTest.cs | 8 +- .../LongIntervalHistory_UnitTest.cs | 74 ++++++++++--------- .../NormalPhi_UnitTest.cs | 8 +- .../PhiFailureDetector/IWithStatistics.cs | 6 ++ .../PhiFailureDetector/LongIntervalHistory.cs | 6 ++ .../PhiFailureDetector/PhiFailureDetector.cs | 6 ++ .../FakeStopwatchProviderAndBlocker.cs | 6 ++ .../RateLimiter.Tests/RateLimiterTest.cs | 6 ++ RateLimiter/RateLimiter/AssemblyInfo.cs | 6 ++ RateLimiter/RateLimiter/IAsyncBlocker.cs | 6 ++ RateLimiter/RateLimiter/IRateLimiter.cs | 6 ++ RateLimiter/RateLimiter/RateLimiter.cs | 6 ++ RateLimiter/RateLimiter/RateLimiterBase.cs | 6 ++ .../RateLimiter/SmoothBurstyRateLimiter.cs | 6 ++ RateLimiter/RateLimiter/SmoothRateLimiter.cs | 6 ++ .../RateLimiter/SmoothWarmingUpRateLimiter.cs | 6 ++ RateLimiter/RateLimiter/TimeSpanExtensions.cs | 6 ++ RateLimiter/RateLimiter/TryAcquireResult.cs | 6 ++ TaskAssigner/Assigner.cs | 6 ++ TaskAssigner/AssignerCore.cs | 6 ++ TaskAssigner/AssignmentDescription.cs | 6 ++ TaskAssigner/NodeDescription.cs | 6 ++ TaskAssigner/Program.cs | 6 ++ TaskAssigner/TaskDescription.cs | 6 ++ 33 files changed, 235 insertions(+), 37 deletions(-) diff --git a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/EmptyDisposable.cs b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/EmptyDisposable.cs index 08002dcb..1716477c 100644 --- a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/EmptyDisposable.cs +++ b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/EmptyDisposable.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; namespace WebHdfs.Extensions.FileProviders @@ -11,3 +16,4 @@ public void Dispose() } } } + diff --git a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/PollingFileChangeToken.cs b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/PollingFileChangeToken.cs index cdcd9b6f..c597c56f 100644 --- a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/PollingFileChangeToken.cs +++ b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/PollingFileChangeToken.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using Microsoft.Extensions.Primitives; @@ -59,3 +64,4 @@ public IDisposable RegisterChangeCallback(Action callback, object state) } } } + diff --git a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/VisiableToUnitTestProject.cs b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/VisiableToUnitTestProject.cs index 19be997e..284ffa7e 100644 --- a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/VisiableToUnitTestProject.cs +++ b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/VisiableToUnitTestProject.cs @@ -1,3 +1,9 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("WebHdfs.Extensions.FileProviders.UnitTest")] + diff --git a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsDirectoryContents.cs b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsDirectoryContents.cs index b3ba8997..c17b52d0 100644 --- a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsDirectoryContents.cs +++ b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsDirectoryContents.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using System.Collections; using System.Collections.Generic; @@ -47,3 +52,4 @@ public void Dispose() } } } + diff --git a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileInfo.cs b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileInfo.cs index 1e107d11..8a16db77 100644 --- a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileInfo.cs +++ b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileInfo.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using System.IO; using System.Net; @@ -179,3 +184,4 @@ private static DateTimeOffset FromUnixTimeMilliseconds(long milliseconds) } } } + diff --git a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileProvider.cs b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileProvider.cs index 70a31926..a84809bf 100644 --- a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileProvider.cs +++ b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileProvider.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Primitives; @@ -58,3 +63,4 @@ public IChangeToken Watch(string filter, TimeSpan pollingInterval) } } } + diff --git a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileStatus.cs b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileStatus.cs index 45d91afa..17f6c54d 100644 --- a/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileStatus.cs +++ b/MicrosoftExtensions/FileProviders/WebHdfs/WebHdfs.Extensions.FileProviders/WebHdfsFileStatus.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using Newtonsoft.Json; namespace WebHdfs.Extensions.FileProviders @@ -28,3 +33,4 @@ internal enum WebHdfsFileType FILE, DIRECTORY, SYMLINK } } + diff --git a/MicrosoftExtensions/Options/DedupChangeExtensions/MicrosoftExtensions.Options.DedupChangeExtensions/OptionsDedupChangeExtensions.cs b/MicrosoftExtensions/Options/DedupChangeExtensions/MicrosoftExtensions.Options.DedupChangeExtensions/OptionsDedupChangeExtensions.cs index 303c68cb..e750ebe1 100644 --- a/MicrosoftExtensions/Options/DedupChangeExtensions/MicrosoftExtensions.Options.DedupChangeExtensions/OptionsDedupChangeExtensions.cs +++ b/MicrosoftExtensions/Options/DedupChangeExtensions/MicrosoftExtensions.Options.DedupChangeExtensions/OptionsDedupChangeExtensions.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using System.IO; using System.Runtime.Serialization; @@ -63,3 +68,4 @@ private static bool IsHashTokenEqual(byte[] lhs, byte[] rhs) } } } + diff --git a/PhiFailureDetector/PhiFailureDetector.Console/Program.cs b/PhiFailureDetector/PhiFailureDetector.Console/Program.cs index 2feb8f62..f768edff 100644 --- a/PhiFailureDetector/PhiFailureDetector.Console/Program.cs +++ b/PhiFailureDetector/PhiFailureDetector.Console/Program.cs @@ -1,4 +1,9 @@ -using System; +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + +using System; using System.Linq; using System.Text; @@ -78,3 +83,4 @@ private static double Normal(long duration, dynamic intervalHistory) } } } + diff --git a/PhiFailureDetector/PhiFailureDetector.UnitTest/ExponentialPhi_UnitTest.cs b/PhiFailureDetector/PhiFailureDetector.UnitTest/ExponentialPhi_UnitTest.cs index 2f440c53..d24ade78 100644 --- a/PhiFailureDetector/PhiFailureDetector.UnitTest/ExponentialPhi_UnitTest.cs +++ b/PhiFailureDetector/PhiFailureDetector.UnitTest/ExponentialPhi_UnitTest.cs @@ -1,4 +1,9 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + +using Microsoft.VisualStudio.TestTools.UnitTesting; namespace PhiFailureDetector.UnitTest { @@ -22,3 +27,4 @@ public void Test_CassandraCase() } } } + diff --git a/PhiFailureDetector/PhiFailureDetector.UnitTest/LongIntervalHistory_UnitTest.cs b/PhiFailureDetector/PhiFailureDetector.UnitTest/LongIntervalHistory_UnitTest.cs index b4a85e4c..0b988255 100644 --- a/PhiFailureDetector/PhiFailureDetector.UnitTest/LongIntervalHistory_UnitTest.cs +++ b/PhiFailureDetector/PhiFailureDetector.UnitTest/LongIntervalHistory_UnitTest.cs @@ -1,34 +1,40 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace PhiFailureDetector.UnitTest -{ - [TestClass] - public class LongIntervalHistory_UnitTest - { - [TestMethod] - public void Test_Baseline() - { - var arrivalWindow = new LongIntervalHistory(5); - - arrivalWindow.Enqueue(1); - arrivalWindow.Enqueue(2); - arrivalWindow.Enqueue(3); - arrivalWindow.Enqueue(4); - arrivalWindow.Enqueue(5); - arrivalWindow.Enqueue(6); - arrivalWindow.Enqueue(7); - - var queueArray = arrivalWindow.ToArray(); - Array.Sort(queueArray); - - CollectionAssert.AreEqual( - new long[] { 3, 4, 5, 6, 7 }, - queueArray - ); - - Assert.AreEqual(25, arrivalWindow.Sum); - Assert.AreEqual(5, arrivalWindow.Avg); - } - } -} +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace PhiFailureDetector.UnitTest +{ + [TestClass] + public class LongIntervalHistory_UnitTest + { + [TestMethod] + public void Test_Baseline() + { + var arrivalWindow = new LongIntervalHistory(5); + + arrivalWindow.Enqueue(1); + arrivalWindow.Enqueue(2); + arrivalWindow.Enqueue(3); + arrivalWindow.Enqueue(4); + arrivalWindow.Enqueue(5); + arrivalWindow.Enqueue(6); + arrivalWindow.Enqueue(7); + + var queueArray = arrivalWindow.ToArray(); + Array.Sort(queueArray); + + CollectionAssert.AreEqual( + new long[] { 3, 4, 5, 6, 7 }, + queueArray + ); + + Assert.AreEqual(25, arrivalWindow.Sum); + Assert.AreEqual(5, arrivalWindow.Avg); + } + } +} + diff --git a/PhiFailureDetector/PhiFailureDetector.UnitTest/NormalPhi_UnitTest.cs b/PhiFailureDetector/PhiFailureDetector.UnitTest/NormalPhi_UnitTest.cs index 3096b026..60cc8de1 100644 --- a/PhiFailureDetector/PhiFailureDetector.UnitTest/NormalPhi_UnitTest.cs +++ b/PhiFailureDetector/PhiFailureDetector.UnitTest/NormalPhi_UnitTest.cs @@ -1,4 +1,9 @@ -using System; +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + +using System; using System.Collections.Generic; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -93,3 +98,4 @@ public void Test_OnlyOneHeartbeat() } } } + diff --git a/PhiFailureDetector/PhiFailureDetector/IWithStatistics.cs b/PhiFailureDetector/PhiFailureDetector/IWithStatistics.cs index 329a97b1..104017d6 100644 --- a/PhiFailureDetector/PhiFailureDetector/IWithStatistics.cs +++ b/PhiFailureDetector/PhiFailureDetector/IWithStatistics.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + namespace PhiFailureDetector { public interface IWithStatistics @@ -13,3 +18,4 @@ public interface IWithStatistics double Variance { get; } } } + diff --git a/PhiFailureDetector/PhiFailureDetector/LongIntervalHistory.cs b/PhiFailureDetector/PhiFailureDetector/LongIntervalHistory.cs index c9b2fc88..633d658f 100644 --- a/PhiFailureDetector/PhiFailureDetector/LongIntervalHistory.cs +++ b/PhiFailureDetector/PhiFailureDetector/LongIntervalHistory.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using System.Collections; using System.Collections.Generic; @@ -82,3 +87,4 @@ IEnumerator IEnumerable.GetEnumerator() } } } + diff --git a/PhiFailureDetector/PhiFailureDetector/PhiFailureDetector.cs b/PhiFailureDetector/PhiFailureDetector/PhiFailureDetector.cs index bedc52e0..631f59d8 100644 --- a/PhiFailureDetector/PhiFailureDetector/PhiFailureDetector.cs +++ b/PhiFailureDetector/PhiFailureDetector/PhiFailureDetector.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using Clocks; @@ -98,3 +103,4 @@ public static double Normal(long nowTimestamp, long lastTimestamp, IWithStatisti } } } + diff --git a/RateLimiter/RateLimiter.Tests/FakeStopwatchProviderAndBlocker.cs b/RateLimiter/RateLimiter.Tests/FakeStopwatchProviderAndBlocker.cs index 82e374e0..361ef4df 100644 --- a/RateLimiter/RateLimiter.Tests/FakeStopwatchProviderAndBlocker.cs +++ b/RateLimiter/RateLimiter.Tests/FakeStopwatchProviderAndBlocker.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using System.Collections.Generic; using System.Threading; @@ -47,3 +52,4 @@ public IStopwatch StartNew() } } } + diff --git a/RateLimiter/RateLimiter.Tests/RateLimiterTest.cs b/RateLimiter/RateLimiter.Tests/RateLimiterTest.cs index dd249801..43ecba9c 100644 --- a/RateLimiter/RateLimiter.Tests/RateLimiterTest.cs +++ b/RateLimiter/RateLimiter.Tests/RateLimiterTest.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using System.Threading; using Xunit; @@ -74,3 +79,4 @@ public void TestSimpleRateUpdate() } } } + diff --git a/RateLimiter/RateLimiter/AssemblyInfo.cs b/RateLimiter/RateLimiter/AssemblyInfo.cs index 3b3d4474..80b0471c 100644 --- a/RateLimiter/RateLimiter/AssemblyInfo.cs +++ b/RateLimiter/RateLimiter/AssemblyInfo.cs @@ -1,3 +1,9 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("RateLimiter.Tests")] + diff --git a/RateLimiter/RateLimiter/IAsyncBlocker.cs b/RateLimiter/RateLimiter/IAsyncBlocker.cs index 8c548c39..e3588e2d 100644 --- a/RateLimiter/RateLimiter/IAsyncBlocker.cs +++ b/RateLimiter/RateLimiter/IAsyncBlocker.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using System.Threading; using System.Threading.Tasks; @@ -19,3 +24,4 @@ public Task WaitAsync(TimeSpan timeout, CancellationToken cancellationToken) } } } + diff --git a/RateLimiter/RateLimiter/IRateLimiter.cs b/RateLimiter/RateLimiter/IRateLimiter.cs index ad93ac2c..80ad6236 100644 --- a/RateLimiter/RateLimiter/IRateLimiter.cs +++ b/RateLimiter/RateLimiter/IRateLimiter.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; #if !NET20 using System.Threading; @@ -65,3 +70,4 @@ public interface IRateLimiter #endif } } + diff --git a/RateLimiter/RateLimiter/RateLimiter.cs b/RateLimiter/RateLimiter/RateLimiter.cs index b3fcdcb8..2178be89 100644 --- a/RateLimiter/RateLimiter/RateLimiter.cs +++ b/RateLimiter/RateLimiter/RateLimiter.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using Clocks; @@ -44,3 +49,4 @@ public static IRateLimiter Create( } } } + diff --git a/RateLimiter/RateLimiter/RateLimiterBase.cs b/RateLimiter/RateLimiter/RateLimiterBase.cs index e740a1ad..4577b1bd 100644 --- a/RateLimiter/RateLimiter/RateLimiterBase.cs +++ b/RateLimiter/RateLimiter/RateLimiterBase.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using System.Diagnostics; using System.Threading; @@ -318,3 +323,4 @@ protected bool CanAcquire(long nowTimestamp, TimeSpan timeout, out TimeSpan mome protected abstract long ReserveEarliestAvailable(int permits, long nowTimestamp); } } + diff --git a/RateLimiter/RateLimiter/SmoothBurstyRateLimiter.cs b/RateLimiter/RateLimiter/SmoothBurstyRateLimiter.cs index 3303b53d..f5b2817c 100644 --- a/RateLimiter/RateLimiter/SmoothBurstyRateLimiter.cs +++ b/RateLimiter/RateLimiter/SmoothBurstyRateLimiter.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using Clocks; @@ -49,3 +54,4 @@ protected override TimeSpan StoredPermitsToWaitTime(double storedPermits, double } } } + diff --git a/RateLimiter/RateLimiter/SmoothRateLimiter.cs b/RateLimiter/RateLimiter/SmoothRateLimiter.cs index d23e6f31..d014268f 100644 --- a/RateLimiter/RateLimiter/SmoothRateLimiter.cs +++ b/RateLimiter/RateLimiter/SmoothRateLimiter.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using Clocks; @@ -84,3 +89,4 @@ protected void Resync(long nowTimestamp) protected abstract void DoSetRate(double permitsPerSecond, TimeSpan stableInterval); } } + diff --git a/RateLimiter/RateLimiter/SmoothWarmingUpRateLimiter.cs b/RateLimiter/RateLimiter/SmoothWarmingUpRateLimiter.cs index 0ac9a3a8..794068d9 100644 --- a/RateLimiter/RateLimiter/SmoothWarmingUpRateLimiter.cs +++ b/RateLimiter/RateLimiter/SmoothWarmingUpRateLimiter.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using Clocks; @@ -77,3 +82,4 @@ private TimeSpan PermitsToTime(double permits) } } } + diff --git a/RateLimiter/RateLimiter/TimeSpanExtensions.cs b/RateLimiter/RateLimiter/TimeSpanExtensions.cs index fadd7046..205398c5 100644 --- a/RateLimiter/RateLimiter/TimeSpanExtensions.cs +++ b/RateLimiter/RateLimiter/TimeSpanExtensions.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; namespace RateLimiter @@ -31,3 +36,4 @@ public static TimeSpan Divide(this TimeSpan timeSpan, double divider) } } } + diff --git a/RateLimiter/RateLimiter/TryAcquireResult.cs b/RateLimiter/RateLimiter/TryAcquireResult.cs index 42800d90..61573d29 100644 --- a/RateLimiter/RateLimiter/TryAcquireResult.cs +++ b/RateLimiter/RateLimiter/TryAcquireResult.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; namespace RateLimiter @@ -9,3 +14,4 @@ public class TryAcquireResult public TimeSpan MomentAvailableInterval { get; set; } } } + diff --git a/TaskAssigner/Assigner.cs b/TaskAssigner/Assigner.cs index b4725080..b899f126 100644 --- a/TaskAssigner/Assigner.cs +++ b/TaskAssigner/Assigner.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using Google.OrTools.LinearSolver; @@ -24,3 +29,4 @@ public AssignmentDescription Solve(AssignmentDescription assignment) } } } + diff --git a/TaskAssigner/AssignerCore.cs b/TaskAssigner/AssignerCore.cs index 6be5f541..538304d7 100644 --- a/TaskAssigner/AssignerCore.cs +++ b/TaskAssigner/AssignerCore.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System; using System.Collections.Generic; using System.Linq; @@ -144,3 +149,4 @@ protected void AddConstraints() } } } + diff --git a/TaskAssigner/AssignmentDescription.cs b/TaskAssigner/AssignmentDescription.cs index 3eb39493..55e8c48a 100644 --- a/TaskAssigner/AssignmentDescription.cs +++ b/TaskAssigner/AssignmentDescription.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System.Collections.Generic; namespace TaskAssigner @@ -13,3 +18,4 @@ public class AssignmentDescription new Dictionary>(); } } + diff --git a/TaskAssigner/NodeDescription.cs b/TaskAssigner/NodeDescription.cs index e4c1d21c..2f2fd33d 100644 --- a/TaskAssigner/NodeDescription.cs +++ b/TaskAssigner/NodeDescription.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + namespace TaskAssigner { public class NodeDescription @@ -9,3 +14,4 @@ public class NodeDescription public int MemoryMiB { get; set; } } } + diff --git a/TaskAssigner/Program.cs b/TaskAssigner/Program.cs index 4bd57589..2d03737b 100644 --- a/TaskAssigner/Program.cs +++ b/TaskAssigner/Program.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + using System.Collections.Generic; using Google.OrTools.LinearSolver; @@ -60,3 +65,4 @@ static void Main() } } } + diff --git a/TaskAssigner/TaskDescription.cs b/TaskAssigner/TaskDescription.cs index 267ff015..ba408b39 100644 --- a/TaskAssigner/TaskDescription.cs +++ b/TaskAssigner/TaskDescription.cs @@ -1,3 +1,8 @@ +// +// Copyright Shuai Zhang. All rights reserved. +// Licensed under the GPLv3 license. See LICENSE file in the project root for full license information. +// + namespace TaskAssigner { public class TaskDescription @@ -9,3 +14,4 @@ public class TaskDescription public int MemoryMiB { get; set; } } } +