BitwiseXor
struct BitwiseXor : ISupplier<int, int, int>, ISupplier<long, long, long>, ISupplier<IntPtr, IntPtr, IntPtr>, ISupplier<uint, uint, uint>, ISupplier<ulong, ulong, ulong>
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace DotNext.Threading
{
[StructLayout(LayoutKind.Auto)]
internal readonly struct BitwiseXor : ISupplier<int, int, int>, ISupplier<long, long, long>, ISupplier<IntPtr, IntPtr, IntPtr>, ISupplier<uint, uint, uint>, ISupplier<ulong, ulong, ulong>
{
int ISupplier<int, int, int>.Invoke(int x, int y)
{
return x ^ y;
}
long ISupplier<long, long, long>.Invoke(long x, long y)
{
return x ^ y;
}
[return: System.Runtime.CompilerServices.NativeInteger]
unsafe IntPtr ISupplier<IntPtr, IntPtr, IntPtr>.Invoke([System.Runtime.CompilerServices.NativeInteger] IntPtr x, [System.Runtime.CompilerServices.NativeInteger] IntPtr y)
{
return (IntPtr)(void*)((long)x ^ (long)y);
}
uint ISupplier<uint, uint, uint>.Invoke(uint x, uint y)
{
return x ^ y;
}
ulong ISupplier<ulong, ulong, ulong>.Invoke(ulong x, ulong y)
{
return x ^ y;
}
}
}