Skip to content

Commit

Permalink
Fix typos. Net Framework 4.5.2 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
grandsilence committed Nov 13, 2018
1 parent ed47d5f commit 12a5aa3
Show file tree
Hide file tree
Showing 19 changed files with 96 additions and 70 deletions.
22 changes: 11 additions & 11 deletions Leaf.Core.Tests/Extensions/String/StringBetweenExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class StringBetweenExtensionsTests
private const string BetweenTextSecond = "text 2";
private const string BetweensText = BetweenLeft + BetweenTextFirst + BetweenRight + BetweenLeft + BetweenTextSecond + BetweenRight + " hello world";

private const string BetweenNotExisingLeft = "<nothing>";
private const string BetweenNotExisingRight = "</nothing>";
private const string BetweenNotExistingLeft = "<nothing>";
private const string BetweenNotExistingRight = "</nothing>";

[TestMethod]
public void BetweensOrEmptyTest()
Expand All @@ -25,7 +25,7 @@ public void BetweensOrEmptyTest()
Assert.AreEqual(BetweenTextFirst, res[0]);
Assert.AreEqual(BetweenTextSecond, res[1]);

res = BetweensText.BetweensOrEmpty(BetweenNotExisingLeft, BetweenNotExisingRight);
res = BetweensText.BetweensOrEmpty(BetweenNotExistingLeft, BetweenNotExistingRight);
Assert.IsNotNull(res);
Assert.IsTrue(res.Length == 0);
}
Expand All @@ -40,7 +40,7 @@ public void BetweensTest()
Assert.AreEqual(BetweenTextFirst, res[0]);
Assert.AreEqual(BetweenTextSecond, res[1]);

res = BetweensText.Betweens(BetweenNotExisingLeft, BetweenNotExisingRight);
res = BetweensText.Betweens(BetweenNotExistingLeft, BetweenNotExistingRight);
Assert.IsNull(res);
}

Expand All @@ -54,7 +54,7 @@ public void BetweensExTest()
Assert.AreEqual(BetweenTextSecond, res[1]);

Assert.ThrowsException<StringBetweenException>(() => {
BetweensText.BetweensEx(BetweenNotExisingLeft, BetweenNotExisingRight);
BetweensText.BetweensEx(BetweenNotExistingLeft, BetweenNotExistingRight);
});
}

Expand All @@ -65,7 +65,7 @@ public void BetweenTest()
Assert.IsFalse(string.IsNullOrEmpty(res));
Assert.AreEqual(BetweenTextFirst, res);

res = BetweensText.Between(BetweenNotExisingLeft, BetweenNotExisingRight);
res = BetweensText.Between(BetweenNotExistingLeft, BetweenNotExistingRight);
Assert.IsNull(res);
}

Expand All @@ -76,7 +76,7 @@ public void BetweenOrEmptyTest()
Assert.IsFalse(string.IsNullOrEmpty(res));
Assert.AreEqual(BetweenTextFirst, res);

res = BetweensText.BetweenOrEmpty(BetweenNotExisingLeft, BetweenNotExisingRight);
res = BetweensText.BetweenOrEmpty(BetweenNotExistingLeft, BetweenNotExistingRight);
Assert.IsNotNull(res);
Assert.AreEqual(string.Empty, res);
}
Expand All @@ -89,7 +89,7 @@ public void BetweenExTest()
Assert.AreEqual(BetweenTextFirst, res);

Assert.ThrowsException<StringBetweenException>(() => {
BetweensText.BetweenEx(BetweenNotExisingLeft, BetweenNotExisingRight);
BetweensText.BetweenEx(BetweenNotExistingLeft, BetweenNotExistingRight);
});
}

Expand All @@ -100,7 +100,7 @@ public void BetweenLastTest()
Assert.IsFalse(string.IsNullOrEmpty(res));
Assert.AreEqual(BetweenTextSecond, res);

res = BetweensText.BetweenLast(BetweenNotExisingRight, BetweenNotExisingLeft);
res = BetweensText.BetweenLast(BetweenNotExistingRight, BetweenNotExistingLeft);
Assert.IsNull(res);
}

Expand All @@ -111,7 +111,7 @@ public void BetweenLastOrEmptyTest()
Assert.IsFalse(string.IsNullOrEmpty(res));
Assert.AreEqual(BetweenTextSecond, res);

res = BetweensText.BetweenLastOrEmpty(BetweenNotExisingRight, BetweenNotExisingLeft);
res = BetweensText.BetweenLastOrEmpty(BetweenNotExistingRight, BetweenNotExistingLeft);
Assert.IsNotNull(res);
Assert.AreEqual(string.Empty, res);
}
Expand All @@ -124,7 +124,7 @@ public void BetweenLastExTest()
Assert.AreEqual(BetweenTextSecond, res);

Assert.ThrowsException<StringBetweenException>(() => {
BetweensText.BetweenLastEx(BetweenNotExisingRight, BetweenNotExisingLeft);
BetweensText.BetweenLastEx(BetweenNotExistingRight, BetweenNotExistingLeft);
});

}
Expand Down
2 changes: 1 addition & 1 deletion Leaf.Core.Tests/Leaf.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net452;net462;net471;net472;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>

<IsPackable>false</IsPackable>

Expand Down
21 changes: 21 additions & 0 deletions Leaf.Core.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Betweens/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_0414_0435_0441_0435_0440_0438_0430_043B_0438_0437_0430_0446_0438_044F/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_0414_0435_0441_0435_0440_0438_0430_043B_0438_0437_0443_0435_043C/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_041F_0435_0440_0435_0441_043E_0437_0434_0430_0435_043C/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_041F_043E_0442_043E_043A_043E_0431_0435_0437_043E_043F_0430_0441_043D_0430_044F/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_041F_043E_0442_043E_043A_043E_0431_0435_0437_043E_043F_0430_0441_043D_043E_0435/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_0422_043E_043A_0435_043D/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_043B_043E_0433_0438_043D_043E_0432/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_043C_043D_043E_0433_043E_043F_043E_0442_043E_0447_043D_043E_0439/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_043C_043D_043E_0433_043E_043F_043E_0442_043E_0447_043D_0443_044E/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_043E_043F_0446_0438_043E_043D_0430_043B_044C_043D_0430_044F/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_043F_043E_043F_0430_043F_0430_044E_0442/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_043F_043E_0442_043E_043A_043E_0431_0435_0437_043E_043F_0430_0441_043D_043E_0433_043E/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_043F_043E_0442_043E_043A_043E_0431_0435_0437_043E_043F_0430_0441_043D_043E_0439/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_043F_043E_0442_043E_043A_043E_0431_0435_0437_043E_043F_0430_0441_043D_0443_044E/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_043F_043E_0442_043E_043A_043E_0431_0435_0437_043E_043F_0430_0441_043D_044B_0439/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_043F_043E_0442_043E_043A_043E_0431_0435_0437_043E_043F_0430_0441_043D_044B_0445/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_0442_043E_043A_0435_043D_0430/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_044E_043D_0438_043A_043E_0434/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=_044E_043D_0438_043A_043E_0434_0430/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
2 changes: 1 addition & 1 deletion Leaf.Core/Collections/Generic/CollectionRandomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Leaf.Core.Collections.Generic
/// <summary>
/// Расширения для потокобезопасных коллекций, реализующие работу со случайностями.
/// </summary>
public static class CollectionRandimizer
public static class CollectionRandomizer
{
[ThreadStatic] private static Random _rand;
private static Random Rand => _rand ?? (_rand = new Random());
Expand Down
4 changes: 2 additions & 2 deletions Leaf.Core/Collections/Generic/ConcurrentFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static class ConcurrentFactory
/// </summary>
/// <param name="filePath">Путь до файла</param>
/// <param name="ui">Потокобезопасный интерфейс, нужен для ведения лога в случае ошибки десериализации</param>
/// <param name="includeComments">Если true, то строки с коментариями тоже будут включены в выборку для десериалиализации.</param>
/// <param name="includeComments">Если true, то строки с комментариями тоже будут включены в выборку для десериалиализации.</param>
/// <param name="trim">Очищать начало и конец строк от отступов и пробелов.</param>
/// <returns>Возвращает новый потокобезопасный список объектов</returns>
public static ConcurrentBag<T> BagFromFile<T>(string filePath, ThreadSafeUI ui = null,
Expand All @@ -39,7 +39,7 @@ public static ConcurrentBag<T> BagFromFile<T>(string filePath, ThreadSafeUI ui =
/// </summary>
/// <param name="filePath">Путь до файла</param>
/// <param name="ui">Потокобезопасный интерфейс, нужен для ведения лога в случае ошибки десериализации</param>
/// <param name="includeComments">Если true, то строки с коментариями тоже будут включены в выборку для десериалиализации.</param>
/// <param name="includeComments">Если true, то строки с комментариями тоже будут включены в выборку для десериалиализации.</param>
/// <param name="trim">Очищать начало и конец строк от отступов и пробелов.</param>
/// <returns>Возвращает новую потокобезопасную очередь объектов</returns>
public static ConcurrentQueue<T> QueueFromFile<T>(string filePath, ThreadSafeUI ui = null,
Expand Down
4 changes: 2 additions & 2 deletions Leaf.Core/Collections/Generic/LockedFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static class LockedFactory
/// </summary>
/// <param name="filePath">Путь до файла</param>
/// <param name="ui">Потокобезопасный интерфейс, нужен для ведения лога в случае ошибки десериализации</param>
/// <param name="includeComments">Если true, то строки с коментариями тоже будут включены в выборку для десериалиализации.</param>
/// <param name="includeComments">Если true, то строки с комментариями тоже будут включены в выборку для десериалиализации.</param>
/// <param name="trim">Очищать начало и конец строк от отступов и пробелов.</param>
/// <returns>Возвращает новый потокобезопасный список объектов</returns>
public static LockedList<T> ListFromFile<T>(string filePath, ThreadSafeUI ui = null,
Expand All @@ -36,7 +36,7 @@ public static LockedList<T> ListFromFile<T>(string filePath, ThreadSafeUI ui = n
/// </summary>
/// <param name="filePath">Путь до файла</param>
/// <param name="ui">Потокобезопасный интерфейс, нужен для ведения лога в случае ошибки десериализации</param>
/// <param name="includeComments">Если true, то строки с коментариями тоже будут включены в выборку для десериалиализации.</param>
/// <param name="includeComments">Если true, то строки с комментариями тоже будут включены в выборку для десериалиализации.</param>
/// <param name="trim">Очищать начало и конец строк от отступов и пробелов.</param>
/// <returns>Возвращает новую потокобезопасную очередь объектов</returns>
public static LockedQueue<T> QueueFromFile<T>(string filePath, ThreadSafeUI ui = null,
Expand Down
Loading

0 comments on commit 12a5aa3

Please sign in to comment.