diff --git a/appveyor.yml b/appveyor.yml
index f742bab..4335e77 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -110,7 +110,6 @@ deploy:
api_key:
secure: H9AFeC6uNE88rUiZxmDQNt50bhQ0ilMCua/X9s1++dNB0wMHWrKY8xjfM/M2xFja
on:
- branch: master
configuration: Release
APPVEYOR_REPO_TAG: true
# GitHub
@@ -124,6 +123,5 @@ deploy:
prerelease: false
force_update: true
on:
- branch: master
configuration: Release
APPVEYOR_REPO_TAG: true
\ No newline at end of file
diff --git a/src/Here/Either/Either.Constructor.cs b/src/Here/Either/Either.Constructor.cs
index aa0eb91..0576f81 100644
--- a/src/Here/Either/Either.Constructor.cs
+++ b/src/Here/Either/Either.Constructor.cs
@@ -20,7 +20,7 @@ public static class Either
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static Either Left([NotNull] in TLeft value)
+ public static Either Left([NotNull] TLeft value)
{
return Either.Left(value);
}
@@ -34,7 +34,7 @@ public static Either Left([NotNull] in TLeft value
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static Either Left([NotNull] in TLeft? nullable)
+ public static Either Left([NotNull] TLeft? nullable)
where TLeft : struct
{
if (nullable == null)
@@ -65,7 +65,7 @@ public static Either ToEither([NotNull] this TLeft
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static Either ToEither([NotNull] in this TLeft? nullable)
+ public static Either ToEither([NotNull] this TLeft? nullable)
where TLeft : struct
{
return Left(nullable);
@@ -79,7 +79,7 @@ public static Either ToEither([NotNull] in this TL
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static EitherLeft Left([NotNull] in TLeft value)
+ public static EitherLeft Left([NotNull] TLeft value)
{
return new EitherLeft(value);
}
@@ -92,7 +92,7 @@ public static EitherLeft Left([NotNull] in TLeft value)
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static EitherLeft Left([NotNull] in TLeft? nullable)
+ public static EitherLeft Left([NotNull] TLeft? nullable)
where TLeft : struct
{
if (nullable == null)
@@ -113,7 +113,7 @@ public static EitherLeft Left([NotNull] in TLeft? nullable)
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static Either Right([NotNull] in TRight value)
+ public static Either Right([NotNull] TRight value)
{
return Either.Right(value);
}
@@ -127,7 +127,7 @@ public static Either Right([NotNull] in TRight val
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static Either Right([NotNull] in TRight? nullable)
+ public static Either Right([NotNull] TRight? nullable)
where TRight : struct
{
if (nullable == null)
@@ -158,7 +158,7 @@ public static Either ToEither([NotNull] this TRigh
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static Either ToEither([NotNull] in this TRight? nullable)
+ public static Either ToEither([NotNull] this TRight? nullable)
where TRight : struct
{
return Right(nullable);
@@ -172,7 +172,7 @@ public static Either ToEither([NotNull] in this TR
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static EitherRight Right([NotNull] in TRight value)
+ public static EitherRight Right([NotNull] TRight value)
{
return new EitherRight(value);
}
@@ -185,7 +185,7 @@ public static EitherRight Right([NotNull] in TRight value)
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static EitherRight Right([NotNull] in TRight? nullable)
+ public static EitherRight Right([NotNull] TRight? nullable)
where TRight : struct
{
if (nullable == null)
@@ -209,7 +209,7 @@ public static EitherRight Right([NotNull] in TRight? nullable)
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static Either ToEither([CanBeNull] this TRight value, [NotNull] in TLeft defaultLeftValue)
+ public static Either ToEither([CanBeNull] this TRight value, [NotNull] TLeft defaultLeftValue)
where TRight : class
{
Throw.IfArgumentNull(defaultLeftValue, nameof(defaultLeftValue));
@@ -232,7 +232,7 @@ public static Either ToEither([CanBeNull] this TRi
/// If the is null.
/// If the value returned by the is null.
[PublicAPI, Pure]
- public static Either ToEither([CanBeNull] this TRight value, [NotNull, InstantHandle] in Func leftValueFactory)
+ public static Either ToEither([CanBeNull] this TRight value, [NotNull, InstantHandle] Func leftValueFactory)
where TRight : class
{
Throw.IfArgumentNull(leftValueFactory, nameof(leftValueFactory));
@@ -254,7 +254,7 @@ public static Either ToEither([CanBeNull] this TRi
/// An .
/// If the is null.
[PublicAPI, Pure]
- public static Either ToEither([CanBeNull] in this TRight? nullable, [NotNull] in TLeft defaultLeftValue)
+ public static Either ToEither([CanBeNull] this TRight? nullable, [NotNull] TLeft defaultLeftValue)
where TRight : struct
{
Throw.IfArgumentNull(defaultLeftValue, nameof(defaultLeftValue));
@@ -277,7 +277,7 @@ public static Either ToEither([CanBeNull] in this
/// If the is null.
/// If the value returned by the is null.
[PublicAPI, Pure]
- public static Either ToEither([CanBeNull] in this TRight? nullable, [NotNull, InstantHandle] in Func leftValueFactory)
+ public static Either ToEither([CanBeNull] this TRight? nullable, [NotNull, InstantHandle] Func leftValueFactory)
where TRight : struct
{
Throw.IfArgumentNull(leftValueFactory, nameof(leftValueFactory));
diff --git a/src/Here/Either/Either.Operations.cs b/src/Here/Either/Either.Operations.cs
index b9d7a85..3bf58b7 100644
--- a/src/Here/Either/Either.Operations.cs
+++ b/src/Here/Either/Either.Operations.cs
@@ -25,9 +25,9 @@ public partial struct Either
/// If this is in state without providing a action.
[PublicAPI, Pure]
public Unit Match(
- [NotNull, InstantHandle] in Action onRight,
- [NotNull, InstantHandle] in Action onLeft,
- [CanBeNull, InstantHandle] in Action none = null)
+ [NotNull, InstantHandle] Action onRight,
+ [NotNull, InstantHandle] Action onLeft,
+ [CanBeNull, InstantHandle] Action none = null)
{
Throw.IfArgumentNull(onRight, nameof(onRight));
Throw.IfArgumentNull(onLeft, nameof(onLeft));
@@ -64,9 +64,9 @@ public Unit Match(
/// If this is in state without providing a action.
[PublicAPI, CanBeNull, Pure]
public TOut MatchNullable(
- [NotNull, InstantHandle] in Func onRight,
- [NotNull, InstantHandle] in Func onLeft,
- [CanBeNull, InstantHandle] in Func none = null)
+ [NotNull, InstantHandle] Func onRight,
+ [NotNull, InstantHandle] Func onLeft,
+ [CanBeNull, InstantHandle] Func none = null)
{
Throw.IfArgumentNull(onRight, nameof(onRight));
Throw.IfArgumentNull(onLeft, nameof(onLeft));
@@ -99,9 +99,9 @@ public TOut MatchNullable(
/// If the result of the match is null.
[PublicAPI, NotNull, Pure]
public TOut Match(
- [NotNull, InstantHandle] in Func onRight,
- [NotNull, InstantHandle] in Func onLeft,
- [CanBeNull, InstantHandle] in Func none = null)
+ [NotNull, InstantHandle] Func onRight,
+ [NotNull, InstantHandle] Func onLeft,
+ [CanBeNull, InstantHandle] Func none = null)
{
TOut result = MatchNullable(onRight, onLeft, none);
return Throw.IfResultNull(result);
@@ -369,7 +369,7 @@ public TState BiFold(
/// The result of the applied treatment.
/// If the is null.
[PublicAPI]
- public Unit IfLeft([NotNull, InstantHandle] in Action onLeft)
+ public Unit IfLeft([NotNull, InstantHandle] Action onLeft)
{
return Match(DoNothing, onLeft, DoNothing);
}
@@ -384,7 +384,7 @@ public Unit IfLeft([NotNull, InstantHandle] in Action onLeft)
#if SUPPORTS_AGGRESSIVE_INLINING
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
- public Unit IfFailure([NotNull, InstantHandle] in Action onFailure)
+ public Unit IfFailure([NotNull, InstantHandle] Action onFailure)
{
return IfLeft(onFailure);
}
@@ -501,7 +501,7 @@ public TOut IfLeft(
/// This .
/// If the is null.
[PublicAPI]
- public Either OnLeft([NotNull, InstantHandle] in Action onLeft)
+ public Either OnLeft([NotNull, InstantHandle] Action onLeft)
{
Throw.IfArgumentNull(onLeft, nameof(onLeft));
@@ -520,7 +520,7 @@ public Either OnLeft([NotNull, InstantHandle] in Action on
#if SUPPORTS_AGGRESSIVE_INLINING
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
- public Either OnFailure([NotNull, InstantHandle] in Action onFailure)
+ public Either OnFailure([NotNull, InstantHandle] Action onFailure)
{
return OnLeft(onFailure);
}
@@ -536,7 +536,7 @@ public Either OnFailure([NotNull, InstantHandle] in Action
/// A .
/// If the is null.
[PublicAPI]
- public Unit IfRight([NotNull, InstantHandle] in Action onRight)
+ public Unit IfRight([NotNull, InstantHandle] Action onRight)
{
return Match(onRight, DoNothing, DoNothing);
}
@@ -551,7 +551,7 @@ public Unit IfRight([NotNull, InstantHandle] in Action onRight)
#if SUPPORTS_AGGRESSIVE_INLINING
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
- public Unit IfSuccess([NotNull, InstantHandle] in Action onSuccess)
+ public Unit IfSuccess([NotNull, InstantHandle] Action onSuccess)
{
return IfRight(onSuccess);
}
@@ -668,7 +668,7 @@ public TOut IfRight(
/// This .
/// If the is null.
[PublicAPI]
- public Either OnRight([NotNull, InstantHandle] in Action onRight)
+ public Either OnRight([NotNull, InstantHandle] Action onRight)
{
Throw.IfArgumentNull(onRight, nameof(onRight));
@@ -687,7 +687,7 @@ public Either OnRight([NotNull, InstantHandle] in Action
#if SUPPORTS_AGGRESSIVE_INLINING
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
- public Either OnSuccess([NotNull, InstantHandle] in Action onSuccess)
+ public Either OnSuccess([NotNull, InstantHandle] Action onSuccess)
{
return OnRight(onSuccess);
}
@@ -707,8 +707,8 @@ public Either OnSuccess([NotNull, InstantHandle] in ActionIf the is null.
[PublicAPI]
public Either OnRightOrLeft(
- [NotNull, InstantHandle] in Action onRight,
- [NotNull, InstantHandle] in Action onLeft)
+ [NotNull, InstantHandle] Action onRight,
+ [NotNull, InstantHandle] Action onLeft)
{
Throw.IfArgumentNull(onRight, nameof(onRight));
Throw.IfArgumentNull(onLeft, nameof(onLeft));
@@ -739,8 +739,8 @@ public Either OnRightOrLeft(
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
public Either OnSuccessOrFailure(
- [NotNull, InstantHandle] in Action onSuccess,
- [NotNull, InstantHandle] in Action onFailure)
+ [NotNull, InstantHandle] Action onSuccess,
+ [NotNull, InstantHandle] Action onFailure)
{
return OnRightOrLeft(onSuccess, onFailure);
}
@@ -768,7 +768,7 @@ public TRight RightOrDefault()
/// The either right value, otherwise the provided default value.
/// If the is null.
[PublicAPI, Pure, NotNull]
- public TRight RightOr([NotNull] in TRight defaultValue)
+ public TRight RightOr([NotNull] TRight defaultValue)
{
Throw.IfArgumentNull(defaultValue, nameof(defaultValue));
@@ -790,7 +790,7 @@ public TRight RightOr([NotNull] in TRight defaultValue)
/// If the is null.
/// If the result of the function is null.
[PublicAPI, Pure, NotNull]
- public TRight RightOr([NotNull, InstantHandle] in Func valueFactory)
+ public TRight RightOr([NotNull, InstantHandle] Func valueFactory)
{
Throw.IfArgumentNull(valueFactory, nameof(valueFactory));
@@ -823,7 +823,7 @@ public TLeft LeftOrDefault()
/// The either left value, otherwise the provided default value.
/// If the is null.
[PublicAPI, Pure, NotNull]
- public TLeft LeftOr([NotNull] in TLeft defaultValue)
+ public TLeft LeftOr([NotNull] TLeft defaultValue)
{
Throw.IfArgumentNull(defaultValue, nameof(defaultValue));
@@ -845,7 +845,7 @@ public TLeft LeftOr([NotNull] in TLeft defaultValue)
/// If the is null.
/// If the result of the function is null.
[PublicAPI, Pure, NotNull]
- public TLeft LeftOr([NotNull, InstantHandle] in Func valueFactory)
+ public TLeft LeftOr([NotNull, InstantHandle] Func valueFactory)
{
Throw.IfArgumentNull(valueFactory, nameof(valueFactory));
diff --git a/src/Here/Either/Either.cs b/src/Here/Either/Either.cs
index 912db70..b20679c 100644
--- a/src/Here/Either/Either.cs
+++ b/src/Here/Either/Either.cs
@@ -16,7 +16,7 @@ namespace Here
/// Type of the value embedded as right value in the .
[PublicAPI]
[DebuggerDisplay("{\"Is\" + " + nameof(_state) + " + (" + nameof(IsNone) + " ? System.String.Empty : \", Value = \" + (" + nameof(IsLeft) + " ?" + nameof(_left) + ".ToString() : " + nameof(_right) + ".ToString()))}")]
- public readonly partial struct Either :
+ public partial struct Either :
IEither,
IEquatable,
IEquatable>,
@@ -102,14 +102,14 @@ public TRight RightValue
///
/// Left value.
/// If the is null.
- private Either([NotNull] in TLeft value)
+ private Either([NotNull] TLeft value)
{
if (value == null)
throw new ArgumentNullException(nameof(value), "Cannot initialize an Either in Left state with a null value.");
_state = EitherStates.Left;
_left = value;
- _right = default;
+ _right = default(TRight);
}
///
@@ -117,13 +117,13 @@ private Either([NotNull] in TLeft value)
///
/// Right value.
/// If the is null.
- private Either([NotNull] in TRight value)
+ private Either([NotNull] TRight value)
{
if (value == null)
throw new ArgumentNullException(nameof(value), "Cannot initialize an Either in Right with a null value.");
_state = EitherStates.Right;
- _left = default;
+ _left = default(TLeft);
_right = value;
}
@@ -134,7 +134,7 @@ private Either([NotNull] in TRight value)
/// An .
/// If the is null.
[Pure]
- internal static Either Left([NotNull] in TLeft value)
+ internal static Either Left([NotNull] TLeft value)
{
return new Either(value);
}
@@ -146,7 +146,7 @@ internal static Either Left([NotNull] in TLeft value)
/// An .
/// If the is null.
[Pure]
- internal static Either Right([NotNull] in TRight value)
+ internal static Either Right([NotNull] TRight value)
{
return new Either(value);
}
@@ -158,7 +158,7 @@ internal static Either Right([NotNull] in TRight value)
/// The left value.
/// If the either is casted to a left value while not being in state.
[PublicAPI, Pure]
- public static explicit operator TLeft(in Either either)
+ public static explicit operator TLeft(Either either)
{
return either.IsLeft
? either._left
@@ -172,7 +172,7 @@ public static explicit operator TLeft(in Either either)
/// The right value.
/// If the either is casted to a left value while not being in state.
[PublicAPI, Pure]
- public static explicit operator TRight(in Either either)
+ public static explicit operator TRight(Either either)
{
return either.IsRight
? either._right
@@ -236,7 +236,7 @@ public override bool Equals(object obj)
/// Second to compare.
/// True if both are equal, otherwise false.
[Pure]
- internal static bool AreEqual(in Either either1, in Either either2)
+ internal static bool AreEqual(Either either1, Either either2)
{
if (either1.IsLeft && either2.IsLeft)
return EqualityComparer.Default.Equals(either1._left, either2._left);
@@ -256,7 +256,7 @@ internal static bool AreEqual(in Either either1, in EitherFirst to compare.
/// Second to compare.
/// True if both are equal, otherwise false.
- public static bool operator ==(in Either either1, in Either either2)
+ public static bool operator ==(Either either1, Either either2)
{
return AreEqual(either1, either2);
}
@@ -267,7 +267,7 @@ internal static bool AreEqual(in Either either1, in EitherFirst to compare.
/// Second to compare.
/// True if both are not equal, otherwise false.
- public static bool operator !=(in Either either1, in Either either2)
+ public static bool operator !=(Either either1, Either either2)
{
return !(either1 == either2);
}
@@ -278,7 +278,7 @@ internal static bool AreEqual(in Either either1, in Either to compare.
/// to compare.
/// True if and are equal, otherwise false.
- public static bool operator ==(in Either either, in EitherLeft eitherLeft)
+ public static bool operator ==(Either either, EitherLeft eitherLeft)
{
return either.Equals(eitherLeft);
}
@@ -289,7 +289,7 @@ internal static bool AreEqual(in Either either1, in Either to compare.
/// to compare.
/// True if and are not equal, otherwise false.
- public static bool operator !=(in Either either, in EitherLeft eitherLeft)
+ public static bool operator !=(Either either, EitherLeft eitherLeft)
{
return !(either == eitherLeft);
}
@@ -300,7 +300,7 @@ internal static bool AreEqual(in Either either1, in Either to compare.
/// to compare.
/// True if and are equal, otherwise false.
- public static bool operator ==(in EitherLeft eitherLeft, in Either either)
+ public static bool operator ==(EitherLeft eitherLeft, Either either)
{
return either == eitherLeft;
}
@@ -311,7 +311,7 @@ internal static bool AreEqual(in Either either1, in Either to compare.
/// to compare.
/// True if and are not equal, otherwise false.
- public static bool operator !=(in EitherLeft eitherLeft, in Either either)
+ public static bool operator !=(EitherLeft eitherLeft, Either either)
{
return !(either == eitherLeft);
}
@@ -322,7 +322,7 @@ internal static bool AreEqual(in Either either1, in Either to compare.
/// to compare.
/// True if and are equal, otherwise false.
- public static bool operator ==(in Either either, in EitherRight eitherRight)
+ public static bool operator ==(Either either, EitherRight eitherRight)
{
return either.Equals(eitherRight);
}
@@ -333,7 +333,7 @@ internal static bool AreEqual(in Either either1, in Either to compare.
/// to compare.
/// True if and are not equal, otherwise false.
- public static bool operator !=(in Either either, in EitherRight eitherRight)
+ public static bool operator !=(Either either, EitherRight eitherRight)
{
return !(either == eitherRight);
}
@@ -344,7 +344,7 @@ internal static bool AreEqual(in Either either1, in Either to compare.
/// to compare.
/// True if and are equal, otherwise false.
- public static bool operator ==(in EitherRight eitherRight, in Either either)
+ public static bool operator ==(EitherRight eitherRight, Either either)
{
return either == eitherRight;
}
@@ -355,7 +355,7 @@ internal static bool AreEqual(in Either either1, in Either to compare.
/// to compare.
/// True if and are not equal, otherwise false.
- public static bool operator !=(in EitherRight eitherRight, in Either either)
+ public static bool operator !=(EitherRight eitherRight, Either either)
{
return !(either == eitherRight);
}
@@ -367,7 +367,7 @@ internal static bool AreEqual(in Either either1, in EitherValue to compare.
/// True if the is in state
/// and its value is equals to the , otherwise false.
- public static bool operator ==(in Either either, in TRight rightValue)
+ public static bool operator ==(Either either, TRight rightValue)
{
return either.Equals(rightValue);
}
@@ -379,7 +379,7 @@ internal static bool AreEqual(in Either either1, in EitherValue to compare.
///