1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-10 00:05:42 +00:00

Do not aggressively inline methods

This commit is contained in:
Oliver Booth 2021-03-07 18:06:28 +00:00
parent 3bceffb4cf
commit 163b304ad1
3 changed files with 0 additions and 22 deletions

View File

@ -1,5 +1,4 @@
using System;
using System.Runtime.CompilerServices;
namespace X10D.BooleanExtensions
{
@ -30,7 +29,6 @@ namespace X10D.BooleanExtensions
/// </code>
/// </example>
[CLSCompliant(false)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static sbyte ToSByte(this bool value)
{
return value ? 1 : 0;
@ -61,7 +59,6 @@ namespace X10D.BooleanExtensions
/// </code>
/// </example>
[CLSCompliant(false)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ushort ToUInt16(this bool value)
{
return value.ToByte();
@ -92,7 +89,6 @@ namespace X10D.BooleanExtensions
/// </code>
/// </example>
[CLSCompliant(false)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static uint ToUInt32(this bool value)
{
return value.ToByte();
@ -123,7 +119,6 @@ namespace X10D.BooleanExtensions
/// </code>
/// </example>
[CLSCompliant(false)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ulong ToUInt64(this bool value)
{
return value.ToByte();

View File

@ -1,4 +1,3 @@
using System.Runtime.CompilerServices;
namespace X10D.BooleanExtensions
{
@ -28,7 +27,6 @@ namespace X10D.BooleanExtensions
/// // True converts to 1.
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte ToByte(this bool value)
{
return value ? 1 : 0;
@ -58,7 +56,6 @@ namespace X10D.BooleanExtensions
/// // True converts to 1.
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static decimal ToDecimal(this bool value)
{
return value.ToByte();
@ -88,7 +85,6 @@ namespace X10D.BooleanExtensions
/// // True converts to 1.
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long ToDouble(this bool value)
{
return value.ToByte();
@ -118,7 +114,6 @@ namespace X10D.BooleanExtensions
/// // True converts to 1.
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static short ToInt16(this bool value)
{
return value.ToByte();
@ -148,7 +143,6 @@ namespace X10D.BooleanExtensions
/// // True converts to 1.
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int ToInt32(this bool value)
{
return value.ToByte();
@ -178,7 +172,6 @@ namespace X10D.BooleanExtensions
/// // True converts to 1.
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static long ToInt64(this bool value)
{
return value.ToByte();
@ -208,7 +201,6 @@ namespace X10D.BooleanExtensions
/// // True converts to 1.
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float ToSingle(this bool value)
{
return value.ToByte();

View File

@ -1,5 +1,4 @@
using System;
using System.Runtime.CompilerServices;
namespace X10D.ComparableExtensions
{
@ -44,7 +43,6 @@ namespace X10D.ComparableExtensions
/// // True
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool Between<T1, T2, T3>(this T1 actual, T2 lower, T3 upper)
where T1 : IComparable<T2>, IComparable<T3>
{
@ -76,7 +74,6 @@ namespace X10D.ComparableExtensions
/// // clamped will be 20
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static T Clamp<T>(this T value, T lower, T upper)
where T : IComparable<T>
{
@ -109,7 +106,6 @@ namespace X10D.ComparableExtensions
/// // result will be False
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool GreaterThan<T1, T2>(this T1 value, T2 other)
where T1 : IComparable<T2>
{
@ -137,7 +133,6 @@ namespace X10D.ComparableExtensions
/// // result will be False
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool GreaterThanOrEqualTo<T1, T2>(this T1 value, T2 other)
where T1 : IComparable<T2>
{
@ -165,7 +160,6 @@ namespace X10D.ComparableExtensions
/// // result will be True
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool LessThan<T1, T2>(this T1 value, T2 other)
where T1 : IComparable<T2>
{
@ -193,7 +187,6 @@ namespace X10D.ComparableExtensions
/// // result will be True
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool LessThanOrEqualTo<T1, T2>(this T1 value, T2 other)
where T1 : IComparable<T2>
{
@ -220,7 +213,6 @@ namespace X10D.ComparableExtensions
/// // max will be 10
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static T Max<T>(this T value, T other)
where T : IComparable<T>
{
@ -247,7 +239,6 @@ namespace X10D.ComparableExtensions
/// // min will be 5
/// </code>
/// </example>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static T Min<T>(this T value, T other)
where T : IComparable<T>
{