diff --git a/ABCNET.sln b/ABCNET.sln
index d9d63b9..82d09c2 100644
--- a/ABCNET.sln
+++ b/ABCNET.sln
@@ -1,6 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
+# Visual Studio 2012
+# SharpDevelop 4.4
VisualStudioVersion = 16.0.29609.76
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ABCNET", "NETMouse - .NET release\ABCNET.csproj", "{738CF8B3-CE36-4BE8-B9DA-BE4759D6CF5B}"
diff --git a/NETMouse - .NET release/ABCNET.csproj b/NETMouse - .NET release/ABCNET.csproj
index ef96bf3..25695fa 100644
--- a/NETMouse - .NET release/ABCNET.csproj
+++ b/NETMouse - .NET release/ABCNET.csproj
@@ -55,6 +55,9 @@
ArrayE.cs
+
+ ArrayE.cs
+
BaseE.cs
@@ -75,6 +78,9 @@
MatrixE.cs
+
+ MatrixE.cs
+
MatrixE.cs
@@ -96,40 +102,55 @@
TupleE.cs
-
-
- Array.cs
+
+ ArrayU.cs
+
+
+ ArrayU.cs
+
+
+
+ ArrayU.cs
+
+
+
+ BaseU.cs
+
+
+ BaseU.cs
+
+
+ BaseU.cs
-
- Array.cs
+
+ MatrixU.cs
-
-
- Base.cs
+
+ MatrixU.cs
-
- Base.cs
+
+ MatrixU.cs
-
- Base.cs
+
+
+
+ SequenceU.cs
-
-
- Matrix.cs
+
+ SequenceU.cs
-
- Matrix.cs
+
+ SequenceU.cs
-
-
- Sequence.cs
+
+
+ TupleU.cs
-
- Tuple.cs
+
+ TupleU.cs
-
-
- Tuple.cs
+
+ TupleU.cs
diff --git a/NETMouse - .NET release/Examples/C#/ABCNET.xml b/NETMouse - .NET release/Examples/C#/ABCNET.xml
index 18af2ba..2d93b0e 100644
--- a/NETMouse - .NET release/Examples/C#/ABCNET.xml
+++ b/NETMouse - .NET release/Examples/C#/ABCNET.xml
@@ -1301,55 +1301,55 @@
Предоставляет функционал для работы с базовыми типами.
-
+
Меняет местами значения двух переменных.
Первая переменная.
Вторая переменная.
-
+
Читает значение типа Boolean.
Приглашение к вводу.
Значение.
-
+
Читает значение типа Char.
Приглашение к вводу.
Значение.
-
+
Читает значение типа Real.
Приглашение к вводу.
Значение.
-
+
Читает значение типа Integer.
Приглашение к вводу.
Значение.
-
+
Читает значение типа String.
Приглашение к вводу.
Значение.
-
+
Генерирует случайное число [0..1).
Число.
-
+
Генерирует случайное число [low..high].
@@ -1357,7 +1357,7 @@
Верхняя граница диапазона.
Число.
-
+
Генерирует случайное число [low..high].
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/ABCNET.xml b/NETMouse - .NET release/Examples/PascalABC.NET/ABCNET.xml
index 18af2ba..2d93b0e 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/ABCNET.xml
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/ABCNET.xml
@@ -1301,55 +1301,55 @@
Предоставляет функционал для работы с базовыми типами.
-
+
Меняет местами значения двух переменных.
Первая переменная.
Вторая переменная.
-
+
Читает значение типа Boolean.
Приглашение к вводу.
Значение.
-
+
Читает значение типа Char.
Приглашение к вводу.
Значение.
-
+
Читает значение типа Real.
Приглашение к вводу.
Значение.
-
+
Читает значение типа Integer.
Приглашение к вводу.
Значение.
-
+
Читает значение типа String.
Приглашение к вводу.
Значение.
-
+
Генерирует случайное число [0..1).
Число.
-
+
Генерирует случайное число [low..high].
@@ -1357,7 +1357,7 @@
Верхняя граница диапазона.
Число.
-
+
Генерирует случайное число [low..high].
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_1.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_1.pas
index 059f577..f64264e 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_1.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_1.pas
@@ -2,6 +2,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.Rand(Base.ReadInteger('N:'), -23, 34).Println();
- Base.ReadChar();
+ Arr.Rand(BaseU.ReadInteger('N:'), -23, 34).Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_10.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_10.pas
index 7c7fd24..f405465 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_10.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_10.pas
@@ -2,6 +2,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.ReadInteger(Base.ReadInteger('N:'), 'Элемент {0}-ый:').Where(x -> x = 0).Count().Println();
- Base.ReadChar();
+ Arr.ReadInteger(BaseU.ReadInteger('N:'), 'Элемент {0}-ый:').Where(x -> x = 0).Count().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_11.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_11.pas
index 939d321..12df11e 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_11.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_11.pas
@@ -2,6 +2,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.ReadInteger(Base.ReadInteger('N:'), 'Элемент {0}-ый:').Where(x -> x mod 2 = 0).Count().Println();
- Base.ReadChar();
+ Arr.ReadInteger(BaseU.ReadInteger('N:'), 'Элемент {0}-ый:').Where(x -> x mod 2 = 0).Count().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_12.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_12.pas
index d0d7e28..953e833 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_12.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_12.pas
@@ -2,7 +2,7 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- var c := Base.ReadInteger('C:');
+ var c := BaseU.ReadInteger('C:');
Arr.ReadInteger(10, 'Элемент {0}-ый:').Where(x -> x > c).Average().Println();
- Base.ReadChar();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_13.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_13.pas
index fb1ea7b..bc77782 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_13.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_13.pas
@@ -2,6 +2,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.ReadInteger(Base.ReadInteger('N:'), 'Элемент {0}-ый:').Where((x, i) -> i mod 2 = 0).Aggregate((a, b) -> a * b).Println();
- Base.ReadChar();
+ Arr.ReadInteger(BaseU.ReadInteger('N:'), 'Элемент {0}-ый:').Where((x, i) -> i mod 2 = 0).Aggregate((a, b) -> a * b).Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_14.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_14.pas
index 253d97a..a5603ad 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_14.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_14.pas
@@ -2,7 +2,7 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- var a := Arr.ReadInteger(Base.ReadInteger('N:'), 'Элемент {0}-ый:');
+ var a := Arr.ReadInteger(BaseU.ReadInteger('N:'), 'Элемент {0}-ый:');
var b := a.Where(x -> x mod 2 = 0).ToArray();
- Base.ReadChar();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_2.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_2.pas
index c5626de..178e533 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_2.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_2.pas
@@ -2,6 +2,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.ReadInteger(Base.ReadInteger('N:'), 'Элемент {0}-ый:').Aggregate((a, b) -> a * b).Println();
- Base.ReadChar();
+ Arr.ReadInteger(BaseU.ReadInteger('N:'), 'Элемент {0}-ый:').Aggregate((a, b) -> a * b).Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_3.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_3.pas
index 587c891..c3b55bc 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_3.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_3.pas
@@ -2,6 +2,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.ReadInteger(Base.ReadInteger('N:'), 'Элемент {0}-ый:').Sum().Println();
- Base.ReadChar();
+ Arr.ReadInteger(BaseU.ReadInteger('N:'), 'Элемент {0}-ый:').Sum().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_4.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_4.pas
index a488ef1..33a3a34 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_4.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_4.pas
@@ -2,6 +2,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.ReadInteger(Base.ReadInteger('N:'), 'Элемент {0}-ый:').Average().Println();
- Base.ReadChar();
+ Arr.ReadInteger(BaseU.ReadInteger('N:'), 'Элемент {0}-ый:').Average().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_5.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_5.pas
index 35c7e1c..d63bc26 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_5.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_5.pas
@@ -2,6 +2,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.ReadInteger(Base.ReadInteger('N:'), 'Элемент {0}-ый:').Where((x, i) -> i mod 2 = 0).Sum().Println();
- Base.ReadChar();
+ Arr.ReadInteger(BaseU.ReadInteger('N:'), 'Элемент {0}-ый:').Where((x, i) -> i mod 2 = 0).Sum().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_6.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_6.pas
index 24ba051..f64bc29 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_6.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_6.pas
@@ -2,7 +2,7 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.Rand(Base.ReadInteger('N:'), -19, 26).Println()
+ Arr.Rand(BaseU.ReadInteger('N:'), -19, 26).Println()
.Where((x, i) -> i mod 2 <> 0).Aggregate((a, b) -> a * b).Println();
- Base.ReadChar();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_7.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_7.pas
index 265fff3..64b2697 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_7.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_7.pas
@@ -2,8 +2,8 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- var t := Base.ReadInteger('T:');
- Arr.Rand(Base.ReadInteger('N:'), -56, 47).Println()
+ var t := BaseU.ReadInteger('T:');
+ Arr.Rand(BaseU.ReadInteger('N:'), -56, 47).Println()
.Where((x, i) -> (i mod 2 = 0) and (x > t)).Aggregate((a, b) -> a * b).Println();
- Base.ReadChar();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_8.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_8.pas
index cb77e21..4cbe040 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_8.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_8.pas
@@ -2,6 +2,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.ReadInteger(Base.ReadInteger('N:'), 'Элемент {0}-ый:').Min().Println();
- Base.ReadChar();
+ Arr.ReadInteger(BaseU.ReadInteger('N:'), 'Элемент {0}-ый:').Min().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_9.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_9.pas
index 050aae6..631062c 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_9.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Arrays_9.pas
@@ -3,6 +3,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Arr.Rand(Base.ReadInteger('N:'), -20, 25).Println().Numerate().MinBy(x -> x.Item).Index.Println();
- Base.ReadChar();
+ Arr.Rand(BaseU.ReadInteger('N:'), -20, 25).Println().Numerate().MinBy(x -> x.Item).Index.Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_1.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_1.pas
index 493c47e..d33095d 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_1.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_1.pas
@@ -2,6 +2,6 @@
uses ABCNET.Utils;
uses ABCNET.Extensions;
begin
- Matr.Rand(Base.ReadInteger('N:'), Base.ReadInteger('M:'), -20, 25).Print();
- Base.ReadChar();
+ Matr.Rand(BaseU.ReadInteger('N:'), BaseU.ReadInteger('M:'), -20, 25).Print();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_10.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_10.pas
index 22b77d1..eb1ee57 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_10.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_10.pas
@@ -3,5 +3,5 @@
uses ABCNET.Extensions;
begin
Matr.Gen(3, 3, (i, j) -> i + 1).Print();
- Base.ReadChar();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_11.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_11.pas
index 218ac5d..239665b 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_11.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_11.pas
@@ -25,6 +25,6 @@ function Max(self: array [,] of integer): integer; extensionmethod;
end;
begin
- Matr.Rand(Base.ReadInteger('N:'), Base.ReadInteger('M:'), -27, 38).Print().Max().Println();
- Base.ReadChar();
+ Matr.Rand(BaseU.ReadInteger('N:'), BaseU.ReadInteger('M:'), -27, 38).Print().Max().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_2.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_2.pas
index 90a542a..8d362cf 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_2.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_2.pas
@@ -17,6 +17,6 @@ function Sum(self: array [,] of integer): array of integer; extensionmethod;
end;
begin
- Matr.ReadInteger(Base.ReadInteger('N:'), Base.ReadInteger('M:'), 'Элемент ({0}, {1})-ый:').Sum().Println();
- Base.ReadChar();
+ Matr.ReadInteger(BaseU.ReadInteger('N:'), BaseU.ReadInteger('M:'), 'Элемент ({0}, {1})-ый:').Sum().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_3.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_3.pas
index ed6bfcf..df8295a 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_3.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_3.pas
@@ -18,6 +18,6 @@ function Min(self: array [,] of integer): integer; extensionmethod;
end;
begin
- Matr.Rand(Base.ReadInteger('N:'), Base.ReadInteger('M:'), -30, 45).Print().Min().Println();
- Base.ReadChar();
+ Matr.Rand(BaseU.ReadInteger('N:'), BaseU.ReadInteger('M:'), -30, 45).Print().Min().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_4.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_4.pas
index 7018ffb..d101f21 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_4.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_4.pas
@@ -24,6 +24,6 @@ function Min(self: array [,] of integer): (integer, integer); extensionmethod;
end;
begin
- Matr.ReadInteger(Base.ReadInteger('N:'), Base.ReadInteger('M:'), 'Элемент ({0}, {1})-ый:').Min().Println();
- Base.ReadChar();
+ Matr.ReadInteger(BaseU.ReadInteger('N:'), BaseU.ReadInteger('M:'), 'Элемент ({0}, {1})-ый:').Min().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_5.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_5.pas
index a6c5cfb..dcf90b8 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_5.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_5.pas
@@ -17,6 +17,6 @@ function Sum(self: array [,] of integer): array of integer; extensionmethod;
end;
begin
- Matr.Rand(Base.ReadInteger('N:'), Base.ReadInteger('M:'), -19, 30).Print().Sum().Println();
- Base.ReadChar();
+ Matr.Rand(BaseU.ReadInteger('N:'), BaseU.ReadInteger('M:'), -19, 30).Print().Sum().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_6.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_6.pas
index 1d3e217..57402fc 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_6.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_6.pas
@@ -18,6 +18,6 @@ function Count(self: array [,] of integer): array of integer; extensionmethod;
end;
begin
- Matr.ReadInteger(Base.ReadInteger('N:'), Base.ReadInteger('M:'), 'Элемент ({0}, {1})-ый:').Count().Println();
- Base.ReadChar();
+ Matr.ReadInteger(BaseU.ReadInteger('N:'), BaseU.ReadInteger('M:'), 'Элемент ({0}, {1})-ый:').Count().Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_7.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_7.pas
index 77a4029..b6d3959 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_7.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_7.pas
@@ -3,5 +3,5 @@
uses ABCNET.Extensions;
begin
Matr.Gen(4, 4, (i, j) -> i = j ? 1 : 0).Print();
- Base.ReadChar();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_8.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_8.pas
index 959b71c..c2643af 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_8.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_8.pas
@@ -19,6 +19,6 @@ function Count(self: array [,] of integer): array of integer; extensionmethod;
end;
begin
- Matr.ReadInteger(Base.ReadInteger('N:'), Base.ReadInteger('M:'), 'Элемент ({0}, {1})-ый:').Count().Numerate().MaxBy(x -> x.Item).Index.Println();
- Base.ReadChar();
+ Matr.ReadInteger(BaseU.ReadInteger('N:'), BaseU.ReadInteger('M:'), 'Элемент ({0}, {1})-ый:').Count().Numerate().MaxBy(x -> x.Item).Index.Println();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_9.pas b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_9.pas
index 7602a77..83f4aa1 100644
--- a/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_9.pas
+++ b/NETMouse - .NET release/Examples/PascalABC.NET/Matrices_9.pas
@@ -18,10 +18,10 @@ function Sort(self: array [,] of integer): array [,] of integer; extensionmethod
for var k := 0 to rowsCount - 1 do
for var i := 0 to rowsCount - k - 2 do
if result[i, j] > result[i + 1, j] then
- Base.Swap(result[i, j], result[i + 1, j]);
+ BaseU.Swap(result[i, j], result[i + 1, j]);
end;
begin
- Matr.Rand(Base.ReadInteger('N:'), Base.ReadInteger('M:'), -17, 26).Print().Sort().Print();
- Base.ReadChar();
+ Matr.Rand(BaseU.ReadInteger('N:'), BaseU.ReadInteger('M:'), -17, 26).Print().Sort().Print();
+ BaseU.ReadChar();
end.
\ No newline at end of file
diff --git a/NETMouse - .NET release/Extensions/ArrayE.Generators.cs b/NETMouse - .NET release/Extensions/ArrayE.Generators.cs
index 3075f3e..44a3a0b 100644
--- a/NETMouse - .NET release/Extensions/ArrayE.Generators.cs
+++ b/NETMouse - .NET release/Extensions/ArrayE.Generators.cs
@@ -8,7 +8,9 @@ namespace ABCNET.Extensions
///
public static partial class ArrayE
{
+
#region public
+
///
/// Заполняет массив на основе функции селектора.
///
@@ -58,7 +60,7 @@ public static void Random(this int[] array, int low = Int32BordersHelper.Low, in
throw new ArgumentException(nameof(low));
for (int i = 0; i < array.Length; i++)
- array[i] = Base.Random(low, high);
+ array[i] = BaseU.Random(low, high);
}
///
@@ -75,7 +77,7 @@ public static void Random(this double[] array, double low = DoubleBordersHelper.
throw new ArgumentException(nameof(low));
for (int i = 0; i < array.Length; i++)
- array[i] = Base.Random(low, high);
+ array[i] = BaseU.Random(low, high);
}
///
@@ -91,6 +93,8 @@ public static void Fill(this T[] array, T value)
for (int i = 0; i < array.Length; i++)
array[i] = value;
}
+
#endregion public
+
}
}
diff --git a/NETMouse - .NET release/Extensions/ArrayE.Input.cs b/NETMouse - .NET release/Extensions/ArrayE.Input.cs
index e34d2c9..f906c07 100644
--- a/NETMouse - .NET release/Extensions/ArrayE.Input.cs
+++ b/NETMouse - .NET release/Extensions/ArrayE.Input.cs
@@ -1,4 +1,5 @@
using System;
+using System.Numerics;
using ABCNET.Utils;
namespace ABCNET.Extensions
@@ -8,28 +9,67 @@ namespace ABCNET.Extensions
///
public static partial class ArrayE
{
+
#region public
+
///
/// Заполняет массив значениями типа Boolean. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
///
/// Массив.
/// Приглашение к вводу.
- public static void Read(this bool[] array, string prompt = EmptyStringHelper.Empty)
+ public static void Read(this bool[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadBoolean(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Byte. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this byte[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadByte(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа SByte. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this sbyte[] array, string prompt = null)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
int i = 0;
while (i < array.Length)
- try
- {
- array[i] = Base.ReadBoolean(prompt is null ? EmptyStringHelper.Empty : string.Format(prompt, i));
- i++;
- }
- catch (Exception)
- {
- InputErrorHelper.Message.PrintLine();
- }
+ {
+ array[i] = BaseU.ReadSByte(string.Format(prompt, i));
+ i++;
+ }
}
///
@@ -37,13 +77,39 @@ public static void Read(this bool[] array, string prompt = EmptyStringHelper.Emp
///
/// Массив.
/// Приглашение к вводу.
- public static void Read(this char[] array, string prompt = EmptyStringHelper.Empty)
+ public static void Read(this char[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadChar(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Decimal. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this decimal[] array, string prompt = null)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
- for (int i = 0; i < array.Length; i++)
- array[i] = Base.ReadChar(prompt is null ? EmptyStringHelper.Empty : string.Format(prompt, i));
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadDecimal(string.Format(prompt, i));
+ i++;
+ }
}
///
@@ -51,22 +117,39 @@ public static void Read(this char[] array, string prompt = EmptyStringHelper.Emp
///
/// Массив.
/// Приглашение к вводу.
- public static void Read(this double[] array, string prompt = EmptyStringHelper.Empty)
+ public static void Read(this double[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadDouble(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Single. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this float[] array, string prompt = null)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
int i = 0;
while (i < array.Length)
- try
- {
- array[i] = Base.ReadDouble(prompt is null ? EmptyStringHelper.Empty : string.Format(prompt, i));
- i++;
- }
- catch (Exception)
- {
- InputErrorHelper.Message.PrintLine();
- }
+ {
+ array[i] = BaseU.ReadSingle(string.Format(prompt, i));
+ i++;
+ }
}
///
@@ -74,22 +157,139 @@ public static void Read(this double[] array, string prompt = EmptyStringHelper.E
///
/// Массив.
/// Приглашение к вводу.
- public static void Read(this int[] array, string prompt = EmptyStringHelper.Empty)
+ public static void Read(this int[] array, string prompt = null)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
int i = 0;
while (i < array.Length)
- try
- {
- array[i] = Base.ReadInt32(prompt is null ? EmptyStringHelper.Empty : string.Format(prompt, i));
- i++;
- }
- catch (Exception)
- {
- InputErrorHelper.Message.PrintLine();
- }
+ {
+ array[i] = BaseU.ReadInt32(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа UInt32. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this uint[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadUInt32(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Int64. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this long[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadInt64(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа UInt64. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this ulong[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadUInt64(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Int16. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this short[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadInt16(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа UInt16. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this ushort[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadUInt16(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа BigInteger. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this BigInteger[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadBigInteger(string.Format(prompt, i));
+ i++;
+ }
}
///
@@ -97,14 +297,22 @@ public static void Read(this int[] array, string prompt = EmptyStringHelper.Empt
///
/// Массив.
/// Приглашение к вводу.
- public static void Read(this string[] array, string prompt = EmptyStringHelper.Empty)
+ public static void Read(this string[] array, string prompt = null)
{
if (array == null)
throw new ArgumentNullException(nameof(array));
- for (int i = 0; i < array.Length; i++)
- array[i] = Base.ReadString(prompt is null ? EmptyStringHelper.Empty : string.Format(prompt, i));
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.ReadString(string.Format(prompt, i));
+ i++;
+ }
}
+
#endregion public
+
}
}
diff --git a/NETMouse - .NET release/Extensions/ArrayE.Nullable.Input.cs b/NETMouse - .NET release/Extensions/ArrayE.Nullable.Input.cs
new file mode 100644
index 0000000..74a7412
--- /dev/null
+++ b/NETMouse - .NET release/Extensions/ArrayE.Nullable.Input.cs
@@ -0,0 +1,301 @@
+using ABCNET.Utils;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
+using System.Text;
+
+namespace ABCNET.Extensions
+{
+ ///
+ /// Предоставляет функционал для работы с массивами.
+ ///
+ public static partial class ArrayE
+ {
+
+ #region public
+
+ ///
+ /// Заполняет массив значениями типа Boolean?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this bool?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadBoolean(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Byte?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this byte?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadByte(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа SByte?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this sbyte?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadSByte(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Char?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this char?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadChar(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Decimal?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this decimal?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadDecimal(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Double?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this double?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadDouble(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Single?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this float?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadSingle(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Int32?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this int?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadInt32(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа UInt32?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this uint?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadUInt32(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Int64?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this long?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadInt64(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа UInt64?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this ulong?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadUInt64(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа Int16?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this short?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadInt16(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа UInt16?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this ushort?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadUInt16(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ ///
+ /// Заполняет массив значениями типа BigInteger?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Массив.
+ /// Приглашение к вводу.
+ public static void Read(this BigInteger?[] array, string prompt = null)
+ {
+ if (array == null)
+ throw new ArgumentNullException(nameof(array));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ int i = 0;
+ while (i < array.Length)
+ {
+ array[i] = BaseU.Nullable.ReadBigInteger(string.Format(prompt, i));
+ i++;
+ }
+ }
+
+ #endregion
+
+ }
+}
\ No newline at end of file
diff --git a/NETMouse - .NET release/Extensions/BaseE.Generators.cs b/NETMouse - .NET release/Extensions/BaseE.Generators.cs
index 3a1a85a..18f3a4c 100644
--- a/NETMouse - .NET release/Extensions/BaseE.Generators.cs
+++ b/NETMouse - .NET release/Extensions/BaseE.Generators.cs
@@ -7,7 +7,9 @@ namespace ABCNET.Extensions
///
public static partial class BaseE
{
+
#region public
+
///
/// Создаёт последовательность от начального числа до конечного.
///
@@ -50,6 +52,8 @@ public static IEnumerable Step(this int from, int step)
from += step;
} while (true);
}
+
#endregion public
+
}
}
diff --git a/NETMouse - .NET release/Extensions/BaseE.Other.cs b/NETMouse - .NET release/Extensions/BaseE.Other.cs
index f871dd0..35cd0c0 100644
--- a/NETMouse - .NET release/Extensions/BaseE.Other.cs
+++ b/NETMouse - .NET release/Extensions/BaseE.Other.cs
@@ -5,7 +5,9 @@
///
public static partial class BaseE
{
+
#region public
+
///
/// Проверяет лежит ли число между другими двумя.
///
@@ -16,9 +18,25 @@ public static partial class BaseE
public static bool IsBetween(this int target, int firstBorder, int secondBorder)
{
if (firstBorder > secondBorder)
- Utils.Base.Swap(ref firstBorder, ref secondBorder);
+ return (target >= secondBorder) && (target <= firstBorder);
return (target >= firstBorder) && (target <= secondBorder);
}
+
+ ///
+ /// Проверяет лежит ли число между другими двумя.
+ ///
+ /// Число.
+ /// Первая граница.
+ /// Вторая граница.
+ /// Результат.
+ public static bool IsBetween(this int target, int firstBorder, bool equalsFirst, int secondBorder, bool equalsSecond)
+ {
+ if (firstBorder > secondBorder)
+ return (target > secondBorder || (equalsSecond && target == secondBorder)) && (target < firstBorder || (equalsFirst && target == firstBorder));
+ return (target > firstBorder || (equalsFirst && target == firstBorder)) && (target < secondBorder || (equalsSecond && target == secondBorder));
+ }
+
#endregion public
+
}
}
diff --git a/NETMouse - .NET release/Extensions/BaseE.Output.cs b/NETMouse - .NET release/Extensions/BaseE.Output.cs
index 6936104..5fd321e 100644
--- a/NETMouse - .NET release/Extensions/BaseE.Output.cs
+++ b/NETMouse - .NET release/Extensions/BaseE.Output.cs
@@ -7,7 +7,9 @@ namespace ABCNET.Extensions
///
public static partial class BaseE
{
+
#region public
+
///
/// Boolean.
///
@@ -183,6 +185,8 @@ public static int PrintLine(this int item)
Console.WriteLine(item.NilOrString());
return item;
}
+
#endregion public
+
}
}
\ No newline at end of file
diff --git a/NETMouse - .NET release/Extensions/MatrixE.Generators.cs b/NETMouse - .NET release/Extensions/MatrixE.Generators.cs
index 2193287..7ca4459 100644
--- a/NETMouse - .NET release/Extensions/MatrixE.Generators.cs
+++ b/NETMouse - .NET release/Extensions/MatrixE.Generators.cs
@@ -8,7 +8,9 @@ namespace ABCNET.Extensions
///
public static partial class MatrixE
{
+
#region public
+
///
/// Заполняет матрицу на основе функции селектора.
///
@@ -43,7 +45,7 @@ public static void Random(this int[,] matrix, int low = Int32BordersHelper.Low,
for (int i = 0; i < matrix.GetLength(0); i++)
for (int j = 0; j < matrix.GetLength(1); j++)
- matrix[i, j] = Base.Random(low, high);
+ matrix[i, j] = BaseU.Random(low, high);
}
///
@@ -61,7 +63,7 @@ public static void Random(this double[,] matrix, double low = DoubleBordersHelpe
for (int i = 0; i < matrix.GetLength(0); i++)
for (int j = 0; j < matrix.GetLength(1); j++)
- matrix[i, j] = Base.Random(low, high);
+ matrix[i, j] = BaseU.Random(low, high);
}
///
@@ -79,6 +81,8 @@ public static void Fill(this T[,] matrix, T value)
for (int j = 0; j < matrix.GetLength(1); j++)
matrix[i, j] = value;
}
+
#endregion public
+
}
}
diff --git a/NETMouse - .NET release/Extensions/MatrixE.Getters.cs b/NETMouse - .NET release/Extensions/MatrixE.Getters.cs
index 0661864..4a0ba28 100644
--- a/NETMouse - .NET release/Extensions/MatrixE.Getters.cs
+++ b/NETMouse - .NET release/Extensions/MatrixE.Getters.cs
@@ -9,7 +9,9 @@ namespace ABCNET.Extensions
///
public static partial class MatrixE
{
+
#region public
+
///
/// Получает столбец матрицы.
///
@@ -209,6 +211,7 @@ public static IEnumerable Rows(this T[,] matrix)
yield return matrix.InternalGetRow(j);
}
}
+
#endregion public
#region private
@@ -282,7 +285,7 @@ private static TOutput[] InternalGetRow(this T[,] matrix, int index,
int columnsCount = newMatrix.GetLength(1);
for (int j = 0; j < columnsCount; j++)
- Base.Swap(ref newMatrix[firstIndex, j], ref newMatrix[secondIndex, j]);
+ BaseU.Swap(ref newMatrix[firstIndex, j], ref newMatrix[secondIndex, j]);
return newMatrix;
}
@@ -301,7 +304,7 @@ private static TOutput[] InternalGetRow(this T[,] matrix, int index,
{
newMatrix[firstIndex, j] = selector(newMatrix[firstIndex, j]);
newMatrix[secondIndex, j] = selector(newMatrix[secondIndex, j]);
- Base.Swap(ref newMatrix[firstIndex, j], ref newMatrix[secondIndex, j]);
+ BaseU.Swap(ref newMatrix[firstIndex, j], ref newMatrix[secondIndex, j]);
}
return newMatrix;
@@ -319,7 +322,7 @@ private static TOutput[] InternalGetRow(this T[,] matrix, int index,
int rowsCount = newMatrix.GetLength(0);
for (int i = 0; i < rowsCount; i++)
- Base.Swap(ref newMatrix[i, firstIndex], ref newMatrix[i, secondIndex]);
+ BaseU.Swap(ref newMatrix[i, firstIndex], ref newMatrix[i, secondIndex]);
return newMatrix;
}
@@ -338,11 +341,13 @@ private static TOutput[] InternalGetRow(this T[,] matrix, int index,
{
newMatrix[i, firstIndex] = selector(newMatrix[i, firstIndex]);
newMatrix[i, secondIndex] = selector(newMatrix[i, secondIndex]);
- Base.Swap(ref newMatrix[i, firstIndex], ref newMatrix[i, secondIndex]);
+ BaseU.Swap(ref newMatrix[i, firstIndex], ref newMatrix[i, secondIndex]);
}
return newMatrix;
}
+
#endregion private
+
}
}
diff --git a/NETMouse - .NET release/Extensions/MatrixE.Input.cs b/NETMouse - .NET release/Extensions/MatrixE.Input.cs
index 7b6ba1c..60d8aa8 100644
--- a/NETMouse - .NET release/Extensions/MatrixE.Input.cs
+++ b/NETMouse - .NET release/Extensions/MatrixE.Input.cs
@@ -1,6 +1,8 @@
using System;
+using System.Numerics;
using ABCNET.Utils;
+
namespace ABCNET.Extensions
{
///
@@ -8,7 +10,9 @@ namespace ABCNET.Extensions
///
public static partial class MatrixE
{
+
#region public
+
///
/// Заполняет матрицу значениями типа Boolean. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
///
@@ -19,27 +23,59 @@ public static void Read(this bool[,] matrix, string prompt = EmptyStringHelper.E
if (matrix == null)
throw new ArgumentNullException(nameof(matrix));
- int i = 0;
- int j = 0;
+ prompt = prompt ?? EmptyStringHelper.Empty;
- while (i < matrix.GetLength(0))
+ for (int i = 0; i < matrix.GetLength(0); i++)
{
- while (j < matrix.GetLength(1))
- try
- {
- matrix[i, j] = Base.ReadBoolean(prompt is null ? EmptyStringHelper.Empty : string.Format(prompt, i, j));
- j++;
- }
- catch (Exception)
- {
- Console.WriteLine(InputErrorHelper.Message);
- }
-
- i++;
- j = 0;
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadBoolean(string.Format(prompt, i, j));
+ }
}
}
+
+ ///
+ /// Заполняет матрицу значениями типа Byte. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this byte[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadByte(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа SByte. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this sbyte[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadSByte(string.Format(prompt, i, j));
+ }
+ }
+ }
+
///
/// Заполняет матрицу значениями типа Char. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
///
@@ -50,11 +86,38 @@ public static void Read(this char[,] matrix, string prompt = EmptyStringHelper.E
if (matrix == null)
throw new ArgumentNullException(nameof(matrix));
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
for (int i = 0; i < matrix.GetLength(0); i++)
+ {
for (int j = 0; j < matrix.GetLength(1); j++)
- matrix[i, j] = Base.ReadChar(prompt is null ? EmptyStringHelper.Empty : string.Format(prompt, i, j));
+ {
+ matrix[i, j] = BaseU.ReadChar(string.Format(prompt, i, j));
+ }
+ }
}
+
+ ///
+ /// Заполняет матрицу значениями типа Decimal. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this decimal[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadDecimal(string.Format(prompt, i, j));
+ }
+ }
+ }
+
///
/// Заполняет матрицу значениями типа Double. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
///
@@ -65,27 +128,38 @@ public static void Read(this double[,] matrix, string prompt = EmptyStringHelper
if (matrix == null)
throw new ArgumentNullException(nameof(matrix));
- int i = 0;
- int j = 0;
+ prompt = prompt ?? EmptyStringHelper.Empty;
- while (i < matrix.GetLength(0))
+ for (int i = 0; i < matrix.GetLength(0); i++)
{
- while (j < matrix.GetLength(1))
- try
- {
- matrix[i, j] = Base.ReadDouble(prompt is null ? EmptyStringHelper.Empty : string.Format(prompt, i, j));
- j++;
- }
- catch (Exception)
- {
- Console.WriteLine(InputErrorHelper.Message);
- }
-
- i++;
- j = 0;
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadDouble(string.Format(prompt, i, j));
+ }
}
}
+
+ ///
+ /// Заполняет матрицу значениями типа Single. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this float[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadSingle(string.Format(prompt, i, j));
+ }
+ }
+ }
+
///
/// Заполняет матрицу значениями типа Int32. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
///
@@ -96,27 +170,143 @@ public static void Read(this int[,] matrix, string prompt = EmptyStringHelper.Em
if (matrix == null)
throw new ArgumentNullException(nameof(matrix));
- int i = 0;
- int j = 0;
+ prompt = prompt ?? EmptyStringHelper.Empty;
- while (i < matrix.GetLength(0))
+ for (int i = 0; i < matrix.GetLength(0); i++)
{
- while (j < matrix.GetLength(1))
- try
- {
- matrix[i, j] = Base.ReadInt32(prompt is null ? EmptyStringHelper.Empty : string.Format(prompt, i, j));
- j++;
- }
- catch (Exception)
- {
- Console.WriteLine(InputErrorHelper.Message);
- }
-
- i++;
- j = 0;
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadInt32(string.Format(prompt, i, j));
+ }
}
}
+
+ ///
+ /// Заполняет матрицу значениями типа UInt32. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this uint[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadUInt32(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа Int64. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this long[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadInt64(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа UInt64. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this ulong[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadUInt64(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа Int16. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this short[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadInt16(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа UInt16. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this ushort[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadUInt16(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа BigInteger. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this BigInteger[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.ReadBigInteger(string.Format(prompt, i, j));
+ }
+ }
+ }
+
///
/// Заполняет матрицу значениями типа String. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
///
@@ -127,10 +317,18 @@ public static void Read(this string[,] matrix, string prompt = EmptyStringHelper
if (matrix == null)
throw new ArgumentNullException(nameof(matrix));
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
for (int i = 0; i < matrix.GetLength(0); i++)
+ {
for (int j = 0; j < matrix.GetLength(1); j++)
- matrix[i, j] = Base.ReadString(prompt is null ? EmptyStringHelper.Empty : string.Format(prompt, i, j));
+ {
+ matrix[i, j] = BaseU.ReadString(string.Format(prompt, i, j));
+ }
+ }
}
+
#endregion public
+
}
}
diff --git a/NETMouse - .NET release/Extensions/MatrixE.Nullable.Input.cs b/NETMouse - .NET release/Extensions/MatrixE.Nullable.Input.cs
new file mode 100644
index 0000000..08d4796
--- /dev/null
+++ b/NETMouse - .NET release/Extensions/MatrixE.Nullable.Input.cs
@@ -0,0 +1,315 @@
+using ABCNET.Utils;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Numerics;
+using System.Text;
+
+namespace ABCNET.Extensions
+{
+ ///
+ /// Предоставляет функционал для работы с базовыми типами.
+ ///
+ public static partial class MatrixE
+ {
+
+ #region public
+
+ ///
+ /// Заполняет матрицу значениями типа Boolean?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this bool?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadBoolean(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа Byte?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this byte?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadByte(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа SByte?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this sbyte?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadSByte(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа Char?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this char?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadChar(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа Decimal?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this decimal?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadDecimal(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа Double?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this double?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadDouble(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа Single?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this float?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadSingle(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа Int32?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this int?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadInt32(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа UInt32?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this uint?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadUInt32(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа Int64?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this long?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadInt64(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа UInt64?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this ulong?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadUInt64(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа Int16?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this short?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadInt16(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа UInt16?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this ushort?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadUInt16(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ ///
+ /// Заполняет матрицу значениями типа BigInteger?. [Не работает при запуске из под оболочки в IDE PascalABC.NET.]
+ ///
+ /// Матрица.
+ /// Приглашение к вводу.
+ public static void Read(this BigInteger?[,] matrix, string prompt = EmptyStringHelper.Empty)
+ {
+ if (matrix == null)
+ throw new ArgumentNullException(nameof(matrix));
+
+ prompt = prompt ?? EmptyStringHelper.Empty;
+
+ for (int i = 0; i < matrix.GetLength(0); i++)
+ {
+ for (int j = 0; j < matrix.GetLength(1); j++)
+ {
+ matrix[i, j] = BaseU.Nullable.ReadBigInteger(string.Format(prompt, i, j));
+ }
+ }
+ }
+
+ #endregion
+
+ }
+}
diff --git a/NETMouse - .NET release/Extensions/MatrixE.Output.cs b/NETMouse - .NET release/Extensions/MatrixE.Output.cs
index 06f1b38..5226e30 100644
--- a/NETMouse - .NET release/Extensions/MatrixE.Output.cs
+++ b/NETMouse - .NET release/Extensions/MatrixE.Output.cs
@@ -7,7 +7,9 @@ namespace ABCNET.Extensions
///
public static partial class MatrixE
{
+
#region public
+
///
/// Выводит матрицу.
///
@@ -77,6 +79,7 @@ public static partial class MatrixE
Console.WriteLine();
return matrix;
}
+
#endregion public
#region private
@@ -137,6 +140,8 @@ public static partial class MatrixE
return matrix;
}
+
#endregion private
+
}
}
diff --git a/NETMouse - .NET release/Extensions/SequenceE.Getters.cs b/NETMouse - .NET release/Extensions/SequenceE.Getters.cs
index 2f2a439..cc29c33 100644
--- a/NETMouse - .NET release/Extensions/SequenceE.Getters.cs
+++ b/NETMouse - .NET release/Extensions/SequenceE.Getters.cs
@@ -1,4 +1,5 @@
-using System;
+using ABCNET.Utils;
+using System;
using System.Collections.Generic;
using System.Linq;
@@ -9,7 +10,9 @@ namespace ABCNET.Extensions
///
public static partial class SequenceE
{
+
#region public
+
///
/// Преобразует последовательность в кортеж.
///
@@ -29,7 +32,7 @@ public static Tuple ToTuple2(this IEnumerable collection)
b = en.Current;
if (en.MoveNext())
throw new ArgumentException(nameof(collection));
- return Tuple.Create(a, b);
+ return TupleU.Of(a, b);
}
throw new ArgumentException(nameof(collection));
}
@@ -59,7 +62,7 @@ public static Tuple ToTuple3(this IEnumerable collection)
c = en.Current;
if (en.MoveNext())
throw new ArgumentException(nameof(collection));
- return Tuple.Create(a, b, c);
+ return TupleU.Of(a, b, c);
}
throw new ArgumentException(nameof(collection));
}
@@ -95,7 +98,7 @@ public static Tuple ToTuple4(this IEnumerable collection)
d = en.Current;
if (en.MoveNext())
throw new ArgumentException(nameof(collection));
- return Tuple.Create(a, b, c, d);
+ return TupleU.Of(a, b, c, d);
}
throw new ArgumentException(nameof(collection));
}
@@ -137,7 +140,7 @@ public static Tuple ToTuple5(this IEnumerable collection)
e = en.Current;
if (en.MoveNext())
throw new ArgumentException(nameof(collection));
- return Tuple.Create(a, b, c, d, e);
+ return TupleU.Of(a, b, c, d, e);
}
throw new ArgumentException(nameof(collection));
}
@@ -185,7 +188,7 @@ public static Tuple ToTuple6(this IEnumerable collection
f = en.Current;
if (en.MoveNext())
throw new ArgumentException(nameof(collection));
- return Tuple.Create(a, b, c, d, e, f);
+ return TupleU.Of(a, b, c, d, e, f);
}
throw new ArgumentException(nameof(collection));
}
@@ -239,7 +242,7 @@ public static Tuple ToTuple7(this IEnumerable collect
g = en.Current;
if (en.MoveNext())
throw new ArgumentException(nameof(collection));
- return Tuple.Create(a, b, c, d, e, f, g);
+ return TupleU.Of(a, b, c, d, e, f, g);
}
throw new ArgumentException(nameof(collection));
}
@@ -342,7 +345,7 @@ public static IEnumerable> Pairwise(this IEnumerable collectio
while (enumerator.MoveNext())
{
- yield return Tuple.Create(previous, enumerator.Current);
+ yield return TupleU.Of(previous, enumerator.Current);
previous = enumerator.Current;
}
}
@@ -370,7 +373,7 @@ public static IEnumerable> Pairwise(this IEn
while (enumerator.MoveNext())
{
TOutput current = selector(enumerator.Current);
- yield return Tuple.Create(previous, current);
+ yield return TupleU.Of(previous, current);
previous = current;
}
}
@@ -431,7 +434,7 @@ public static IEnumerable> ZipTuple(this IEnumerable coll
if (secondCollection == null)
throw new ArgumentNullException(nameof(secondCollection));
- return collection.Zip(secondCollection, delegate (T x, T1 y) { return Tuple.Create(x, y); });
+ return collection.Zip(secondCollection, delegate (T x, T1 y) { return TupleU.Of(x, y); });
}
///
@@ -444,7 +447,7 @@ public static Tuple, IEnumerable> UnzipTuple(this IEnu
if (collection == null)
throw new ArgumentNullException(nameof(collection));
- return Tuple.Create(collection.Select(delegate (Tuple x) { return x.Item1; }),
+ return TupleU.Of(collection.Select(delegate (Tuple x) { return x.Item1; }),
collection.Select(delegate (Tuple x) { return x.Item2; }));
}
@@ -705,6 +708,8 @@ public static PartitionResult Partition(this IEnumerable collection, Pr
return new PartitionResult(trueList, falseList);
}
+
#endregion public
+
}
}
diff --git a/NETMouse - .NET release/Extensions/SequenceE.Output.cs b/NETMouse - .NET release/Extensions/SequenceE.Output.cs
index cffec6a..afe9448 100644
--- a/NETMouse - .NET release/Extensions/SequenceE.Output.cs
+++ b/NETMouse - .NET release/Extensions/SequenceE.Output.cs
@@ -8,7 +8,9 @@ namespace ABCNET.Extensions
///
public static partial class SequenceE
{
+
#region public
+
///
/// Выводит последовательность.
///
@@ -130,6 +132,8 @@ public static IEnumerable PrintLinesBy(this IEnumerable collec
Console.WriteLine(selector(item).NilOrString());
return collection;
}
+
#endregion public
+
}
}
diff --git a/NETMouse - .NET release/Extensions/StringE.Output.cs b/NETMouse - .NET release/Extensions/StringE.Output.cs
index dd6f350..501c345 100644
--- a/NETMouse - .NET release/Extensions/StringE.Output.cs
+++ b/NETMouse - .NET release/Extensions/StringE.Output.cs
@@ -7,7 +7,9 @@ namespace ABCNET.Extensions
///
public static partial class StringE
{
+
#region public
+
///
/// Выводит строку на экран.
///
@@ -29,6 +31,8 @@ public static string PrintLine(this string input)
Console.WriteLine(input.NilOrString());
return input;
}
+
#endregion public
+
}
}
diff --git a/NETMouse - .NET release/Extensions/TupleE.Getters.cs b/NETMouse - .NET release/Extensions/TupleE.Getters.cs
index 59a19bc..4e00f2d 100644
--- a/NETMouse - .NET release/Extensions/TupleE.Getters.cs
+++ b/NETMouse - .NET release/Extensions/TupleE.Getters.cs
@@ -8,7 +8,11 @@ namespace ABCNET.Extensions
///
public static partial class TupleE
{
+
#region public
+
+ #region ToSequence
+
///
/// Преобразует кортеж в последовательность.
///
@@ -19,79 +23,80 @@ public static IEnumerable ToSequence(this Tuple tuple)
yield return tuple.Item1;
yield return tuple.Item2;
}
-
+
///
- /// Добавляет элемент к кортежу.
- ///
- /// Кортеж.
- /// Элемент.
- /// Кортеж.
- public static Tuple AddFirst(this Tuple tuple, T2 item)
- {
- return new Tuple(item, tuple.Item1, tuple.Item2);
- }
-
- ///
- /// Добавляет элемент к кортежу.
+ /// Преобразует кортеж в последовательность.
///
/// Кортеж.
- /// Элемент.
- /// Кортеж.
- public static Tuple Add(this Tuple tuple, T2 item)
+ /// Последовательность.
+ public static IEnumerable ToSequence(this Tuple tuple)
{
- return new Tuple(tuple.Item1, tuple.Item2, item);
+ yield return tuple.Item1;
+ yield return tuple.Item2;
+ yield return tuple.Item3;
}
-
-
-
+
///
/// Преобразует кортеж в последовательность.
///
/// Кортеж.
/// Последовательность.
- public static IEnumerable ToSequence(this Tuple tuple)
+ public static IEnumerable ToSequence(this Tuple tuple)
{
yield return tuple.Item1;
yield return tuple.Item2;
yield return tuple.Item3;
+ yield return tuple.Item4;
}
-
+
///
- /// Добавляет элемент к кортежу.
+ /// Преобразует кортеж в последовательность.
///
/// Кортеж.
- /// Элемент.
- /// Кортеж.
- public static Tuple AddFirst(this Tuple tuple, T item)
+ /// Последовательность.
+ public static IEnumerable ToSequence(this Tuple tuple)
{
- return new Tuple(item, tuple.Item1, tuple.Item2, tuple.Item3);
+ yield return tuple.Item1;
+ yield return tuple.Item2;
+ yield return tuple.Item3;
+ yield return tuple.Item4;
+ yield return tuple.Item5;
}
-
+
///
- /// Добавляет элемент к кортежу.
+ /// Преобразует кортеж в последовательность.
///
/// Кортеж.
- /// Элемент.
- /// Кортеж.
- public static Tuple Add(this Tuple tuple, T item)
+ /// Последовательность.
+ public static IEnumerable ToSequence(this Tuple tuple)
{
- return new Tuple(tuple.Item1, tuple.Item2, tuple.Item3, item);
+ yield return tuple.Item1;
+ yield return tuple.Item2;
+ yield return tuple.Item3;
+ yield return tuple.Item4;
+ yield return tuple.Item5;
+ yield return tuple.Item6;
}
-
-
-
+
///
/// Преобразует кортеж в последовательность.
///
/// Кортеж.
/// Последовательность.
- public static IEnumerable ToSequence(this Tuple tuple)
+ public static IEnumerable ToSequence(this Tuple tuple)
{
yield return tuple.Item1;
yield return tuple.Item2;
yield return tuple.Item3;
yield return tuple.Item4;
+ yield return tuple.Item5;
+ yield return tuple.Item6;
+ yield return tuple.Item7;
}
+
+ #endregion
+
+ #region AddFirst
///
/// Добавляет элемент к кортежу.
@@ -99,9 +104,9 @@ public static IEnumerable ToSequence(this Tuple tuple)
/// Кортеж.
/// Элемент.
/// Кортеж.
- public static Tuple AddFirst(this Tuple tuple, T item)
+ public static Tuple AddFirst(this Tuple tuple, T2 item)
{
- return new Tuple(item, tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4);
+ return new Tuple(item, tuple.Item1, tuple.Item2);
}
///
@@ -110,25 +115,20 @@ public static Tuple AddFirst(this Tuple tuple, T i
/// Кортеж.
/// Элемент.
/// Кортеж.
- public static Tuple Add(this Tuple tuple, T item)
+ public static Tuple AddFirst(this Tuple tuple, T3 item)
{
- return new Tuple(tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, item);
+ return new Tuple(item, tuple.Item1, tuple.Item2, tuple.Item3);
}
-
-
///
- /// Преобразует кортеж в последовательность.
+ /// Добавляет элемент к кортежу.
///
/// Кортеж.
- /// Последовательность.
- public static IEnumerable ToSequence(this Tuple tuple)
+ /// Элемент.
+ /// Кортеж.
+ public static Tuple AddFirst(this Tuple tuple, T4 item)
{
- yield return tuple.Item1;
- yield return tuple.Item2;
- yield return tuple.Item3;
- yield return tuple.Item4;
- yield return tuple.Item5;
+ return new Tuple(item, tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4);
}
///
@@ -137,9 +137,9 @@ public static IEnumerable ToSequence(this Tuple tuple)
/// Кортеж.
/// Элемент.
/// Кортеж.
- public static Tuple AddFirst(this Tuple tuple, T item)
+ public static Tuple AddFirst(this Tuple tuple, T5 item)
{
- return new Tuple(item, tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, tuple.Item5);
+ return new Tuple(item, tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, tuple.Item5);
}
///
@@ -148,26 +148,35 @@ public static Tuple AddFirst(this Tuple tupl
/// Кортеж.
/// Элемент.
/// Кортеж.
- public static Tuple Add(this Tuple tuple, T item)
+ public static Tuple AddFirst(this Tuple tuple, T6 item)
{
- return new Tuple(tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, tuple.Item5, item);
+ return new Tuple(item, tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, tuple.Item5, tuple.Item6);
}
+
+ #endregion
+
+ #region Add
-
+ ///
+ /// Добавляет элемент к кортежу.
+ ///
+ /// Кортеж.
+ /// Элемент.
+ /// Кортеж.
+ public static Tuple Add(this Tuple tuple, T2 item)
+ {
+ return new Tuple(tuple.Item1, tuple.Item2, item);
+ }
///
- /// Преобразует кортеж в последовательность.
+ /// Добавляет элемент к кортежу.
///
/// Кортеж.
- /// Последовательность.
- public static IEnumerable ToSequence(this Tuple tuple)
+ /// Элемент.
+ /// Кортеж.
+ public static Tuple Add(this Tuple tuple, T3 item)
{
- yield return tuple.Item1;
- yield return tuple.Item2;
- yield return tuple.Item3;
- yield return tuple.Item4;
- yield return tuple.Item5;
- yield return tuple.Item6;
+ return new Tuple(tuple.Item1, tuple.Item2, tuple.Item3, item);
}
///
@@ -176,9 +185,9 @@ public static IEnumerable ToSequence(this Tuple tuple)
/// Кортеж.
/// Элемент.
/// Кортеж.
- public static Tuple AddFirst(this Tuple tuple, T item)
+ public static Tuple Add(this Tuple tuple, T4 item)
{
- return new Tuple(item, tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, tuple.Item5, tuple.Item6);
+ return new Tuple(tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, item);
}
///
@@ -187,26 +196,25 @@ public static Tuple AddFirst(this TupleКортеж.
/// Элемент.
/// Кортеж.
- public static Tuple Add(this Tuple tuple, T item)
+ public static Tuple Add(this Tuple tuple, T5 item)
{
- return new Tuple(tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, tuple.Item5, tuple.Item6, item);
+ return new Tuple(tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, tuple.Item5, item);
}
///
- /// Преобразует кортеж в последовательность.
+ /// Добавляет элемент к кортежу.
///
/// Кортеж.
- /// Последовательность.
- public static IEnumerable ToSequence(this Tuple tuple)
+ /// Элемент.
+ /// Кортеж.
+ public static Tuple Add(this Tuple tuple, T6 item)
{
- yield return tuple.Item1;
- yield return tuple.Item2;
- yield return tuple.Item3;
- yield return tuple.Item4;
- yield return tuple.Item5;
- yield return tuple.Item6;
- yield return tuple.Item7;
+ return new Tuple(tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, tuple.Item5, tuple.Item6, item);
}
+
+ #endregion
+
#endregion public
+
}
}
diff --git a/NETMouse - .NET release/Extensions/TupleE.Output.cs b/NETMouse - .NET release/Extensions/TupleE.Output.cs
index a34bf08..f7f396a 100644
--- a/NETMouse - .NET release/Extensions/TupleE.Output.cs
+++ b/NETMouse - .NET release/Extensions/TupleE.Output.cs
@@ -7,7 +7,9 @@ namespace ABCNET.Extensions
///
public static partial class TupleE
{
+
#region public
+
///
/// Выводит кортеж.
///
@@ -15,7 +17,7 @@ public static partial class TupleE
/// Кортеж.
public static Tuple Print(this Tuple tuple)
{
- Console.Write(Utils.Tuple.Of(tuple.Item1.NilOrString(), tuple.Item2.NilOrString()));
+ Console.Write(Utils.TupleU.Of(tuple.Item1.NilOrString(), tuple.Item2.NilOrString()));
return tuple;
}
@@ -30,7 +32,7 @@ public static Tuple Print(this Tuple tuple, Func fun
if (func == null)
throw new ArgumentNullException(nameof(func));
- return Utils.Tuple.Of(func(tuple.Item1), func(tuple.Item2)).Print();
+ return Utils.TupleU.Of(func(tuple.Item1), func(tuple.Item2)).Print();
}
///
@@ -44,7 +46,7 @@ public static Tuple PrintBy(this Tuple tuple, Func fun
if (func == null)
throw new ArgumentNullException(nameof(func));
- Utils.Tuple.Of(func(tuple.Item1), func(tuple.Item2)).Print();
+ Utils.TupleU.Of(func(tuple.Item1), func(tuple.Item2)).Print();
return tuple;
}
@@ -55,7 +57,7 @@ public static Tuple PrintBy(this Tuple tuple, Func fun
/// Кортеж.
public static Tuple PrintLine(this Tuple tuple)
{
- Console.WriteLine(Utils.Tuple.Of(tuple.Item1.NilOrString(), tuple.Item2.NilOrString()));
+ Console.WriteLine(Utils.TupleU.Of(tuple.Item1.NilOrString(), tuple.Item2.NilOrString()));
return tuple;
}
@@ -70,7 +72,7 @@ public static Tuple PrintLine(this Tuple tuple, Func
if (func == null)
throw new ArgumentNullException(nameof(func));
- return Utils.Tuple.Of(func(tuple.Item1), func(tuple.Item2)).PrintLine();
+ return Utils.TupleU.Of(func(tuple.Item1), func(tuple.Item2)).PrintLine();
}
///
@@ -84,7 +86,7 @@ public static Tuple PrintLineBy(this Tuple tuple, Func
if (func == null)
throw new ArgumentNullException(nameof(func));
- Utils.Tuple.Of(func(tuple.Item1), func(tuple.Item2)).PrintLine();
+ Utils.TupleU.Of(func(tuple.Item1), func(tuple.Item2)).PrintLine();
return tuple;
}
@@ -111,7 +113,7 @@ public static Tuple PrintLines(this Tuple tuple, Func
@@ -125,7 +127,7 @@ public static Tuple PrintLinesBy(this Tuple tuple, Func PrintLinesBy(this Tuple tuple, FuncКортеж.
public static Tuple Print(this Tuple tuple)
{
- Console.Write(Utils.Tuple.Of(tuple.Item1.NilOrString(), tuple.Item2.NilOrString(), tuple.Item3.NilOrString()));
+ Console.Write(Utils.TupleU.Of(tuple.Item1.NilOrString(), tuple.Item2.NilOrString(), tuple.Item3.NilOrString()));
return tuple;
}
@@ -151,7 +153,7 @@ public static Tuple Print(this Tuple tuple, Func
@@ -165,7 +167,7 @@ public static Tuple PrintBy(this Tuple tuple, Func PrintBy(this Tuple tuple, FuncКортеж.
public static Tuple PrintLine(this Tuple tuple)
{
- Console.WriteLine(Utils.Tuple.Of(tuple.Item1.NilOrString(), tuple.Item2.NilOrString(), tuple.Item3.NilOrString()));
+ Console.WriteLine(Utils.TupleU.Of(tuple.Item1.NilOrString(), tuple.Item2.NilOrString(), tuple.Item3.NilOrString()));
return tuple;
}
@@ -191,7 +193,7 @@ public static Tuple PrintLine(this Tuple tuple, Func
if (func == null)
throw new ArgumentNullException(nameof(func));
- return Utils.Tuple.Of(func(tuple.Item1), func(tuple.Item2), func(tuple.Item3)).PrintLine();
+ return Utils.TupleU.Of(func(tuple.Item1), func(tuple.Item2), func(tuple.Item3)).PrintLine();
}
///
@@ -205,7 +207,7 @@ public static Tuple PrintLineBy(this Tuple tuple, Func<
if (func == null)
throw new ArgumentNullException(nameof(func));
- Utils.Tuple.Of(func(tuple.Item1), func(tuple.Item2), func(tuple.Item3)).PrintLine();
+ Utils.TupleU.Of(func(tuple.Item1), func(tuple.Item2), func(tuple.Item3)).PrintLine();
return tuple;
}
@@ -233,7 +235,7 @@ public static Tuple PrintLines(this Tuple tuple, Fun
if (func == null)
throw new ArgumentNullException(nameof(func));
- return Utils.Tuple.Of(func(tuple.Item1), func(tuple.Item2), func(tuple.Item3)).PrintLines();
+ return Utils.TupleU.Of(func(tuple.Item1), func(tuple.Item2), func(tuple.Item3)).PrintLines();
}
///
@@ -247,7 +249,7 @@ public static Tuple PrintLinesBy(this Tuple tuple, Func
if (func == null)
throw new ArgumentNullException(nameof(func));
- Utils.Tuple.Of(func(tuple.Item1), func(tuple.Item2), func(tuple.Item3)).PrintLines();
+ Utils.TupleU.Of(func(tuple.Item1), func(tuple.Item2), func(tuple.Item3)).PrintLines();
return tuple;
}
@@ -258,7 +260,7 @@ public static Tuple PrintLinesBy(this Tuple tuple, Func
/// Кортеж.
public static Tuple Print(this Tuple tuple)
{
- Console.Write(Utils.Tuple.Of(tuple.Item1.NilOrString(), tuple.Item2.NilOrString(), tuple.Item3.NilOrString(),
+ Console.Write(Utils.TupleU.Of(tuple.Item1.NilOrString(), tuple.Item2.NilOrString(), tuple.Item3.NilOrString(),
tuple.Item4.NilOrString()));
return tuple;
}
@@ -274,7 +276,7 @@ public static Tuple Print