System.Func.Invoke(sbyte)

Here are the examples of the csharp api System.Func.Invoke(sbyte) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

19 Source : ExpressionOptimizerTests.Unary.Algebraic.cs
with MIT License
from reaqtive

[TestMethod]
        public void Unary_Algebraic_OnesComplement_Law_SByte()
        {
            var x = Expression.Parameter(typeof(sbyte));
            var o = Expression.OnesComplement(Expression.OnesComplement(x));
            var f = Expression.Lambda<Func<sbyte, sbyte>>(o, x);
            var d = f.Compile();

            for (int i = sbyte.MinValue; i <= sbyte.MaxValue; i++)
            {
                var b = (sbyte)i;

                replacedert.AreEqual(b, d(b));
            }
        }

19 Source : EnumFormatter.cs
with MIT License
from thdal

public override T Deserialize(ref byte[] bytes, int offset, DirtyTracker tracker, out int byteSize)
        {
            byteSize = 1;
            return deserializeCast(BinaryUtil.ReadSByte(ref bytes, offset));
        }

19 Source : EnumFormatter.cs
with MIT License
from thdal

public override T? Deserialize(ref byte[] bytes, int offset, DirtyTracker tracker, out int byteSize)
        {
            byteSize = 2;
            var hasValue = BinaryUtil.ReadBoolean(ref bytes, offset);
            if (!hasValue) return null;

            return deserializeCast(BinaryUtil.ReadSByte(ref bytes, offset + 1));
        }