From 4bd46c4f949f8789af70b1111879adbbbd637b6e Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 22 Jul 2024 10:50:51 +0200 Subject: [PATCH] Proof out the changes necessary for making SharpTreeNode cross platform by proxying System.Windows dependencies --- .../Correctness/OverloadResolution.cs | 374 +- .../Pretty/CompoundAssignmentTest.cs | 8612 ++++++++--------- .../TestCases/Pretty/DynamicTests.cs | 740 +- .../TestCases/Pretty/RefLocalsAndReturns.cs | 14 +- .../TestCases/Pretty/ValueTypes.cs | 18 +- .../Analyzers/AnalyzerContext.cs | 76 +- ILSpy/Analyzers/AnalyzerEntityTreeNode.cs | 3 +- .../TreeNodes/AnalyzedModuleTreeNode.cs | 3 +- ILSpy/TreeNodes/AssemblyListTreeNode.cs | 9 +- ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs | 3 +- ILSpy/TreeNodes/AssemblyTreeNode.cs | 10 +- ILSpy/TreeNodes/BaseTypesEntryNode.cs | 3 +- ILSpy/TreeNodes/DerivedTypesEntryNode.cs | 3 +- ILSpy/TreeNodes/ILSpyTreeNode.cs | 3 +- ILSpy/TreeNodes/ModuleReferenceTreeNode.cs | 3 +- .../IPlatformDataObject.cs | 10 + .../PlatformAbstractions/IPlatformDragDrop.cs | 7 + .../IPlatformDragEventArgs.cs | 8 + .../IPlatformRoutedEventArgs.cs | 7 + .../WpfWindows/WpfWindowsDataObject.cs | 29 + .../WpfWindows/WpfWindowsDragDropManager.cs | 12 + .../WpfWindows/WpfWindowsDragEventArgs.cs | 18 + .../WpfWindows/WpfWindowsRoutedEventArgs.cs | 16 + .../XPlatDragDropEffects.cs | 36 + SharpTreeView/SharpTreeNode.cs | 28 +- SharpTreeView/SharpTreeView.cs | 14 +- SharpTreeView/SharpTreeViewItem.cs | 8 +- 27 files changed, 5112 insertions(+), 4955 deletions(-) create mode 100644 SharpTreeView/PlatformAbstractions/IPlatformDataObject.cs create mode 100644 SharpTreeView/PlatformAbstractions/IPlatformDragDrop.cs create mode 100644 SharpTreeView/PlatformAbstractions/IPlatformDragEventArgs.cs create mode 100644 SharpTreeView/PlatformAbstractions/IPlatformRoutedEventArgs.cs create mode 100644 SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDataObject.cs create mode 100644 SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDragDropManager.cs create mode 100644 SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDragEventArgs.cs create mode 100644 SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsRoutedEventArgs.cs create mode 100644 SharpTreeView/PlatformAbstractions/XPlatDragDropEffects.cs diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Correctness/OverloadResolution.cs b/ICSharpCode.Decompiler.Tests/TestCases/Correctness/OverloadResolution.cs index 50925bddda..0ab570e28a 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Correctness/OverloadResolution.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Correctness/OverloadResolution.cs @@ -312,241 +312,241 @@ static void OverloadSetWithRefReadOnlyParam(ref readonly int i) { Console.WriteLine("ref readonly int " + i); } - static void OverloadSetWithRefReadOnlyParam(long l) - { - Console.WriteLine("long " + l); - } - static void OverloadSetWithRefReadOnlyParam2(ref readonly long i) - { - Console.WriteLine("ref readonly long " + i); - } - static void OverloadSetWithRefReadOnlyParam2(object o) - { - Console.WriteLine("object " + o); - } - static void OverloadSetWithRefReadOnlyParam3(ref readonly int i) - { - Console.WriteLine("ref readonly int " + i); - } - static void OverloadSetWithRefReadOnlyParam3(T a) - { - Console.WriteLine("T " + a); - } - static void RefReadOnlyVsRegularParam(ref readonly int i) - { - Console.WriteLine("ref readonly int " + i); - } - static void RefReadOnlyVsRegularParam(int i) - { - Console.WriteLine("int " + i); - } + static void OverloadSetWithRefReadOnlyParam(long l) + { + Console.WriteLine("long " + l); + } + static void OverloadSetWithRefReadOnlyParam2(ref readonly long i) + { + Console.WriteLine("ref readonly long " + i); + } + static void OverloadSetWithRefReadOnlyParam2(object o) + { + Console.WriteLine("object " + o); + } + static void OverloadSetWithRefReadOnlyParam3(ref readonly int i) + { + Console.WriteLine("ref readonly int " + i); + } + static void OverloadSetWithRefReadOnlyParam3(T a) + { + Console.WriteLine("T " + a); + } + static void RefReadOnlyVsRegularParam(ref readonly int i) + { + Console.WriteLine("ref readonly int " + i); + } + static void RefReadOnlyVsRegularParam(int i) + { + Console.WriteLine("int " + i); + } #endif - #endregion + #endregion - #region In Parameter - static void CallWithInParam() - { + #region In Parameter + static void CallWithInParam() + { #if CS72 - Console.WriteLine("OverloadSetWithInParam:"); - OverloadSetWithInParam(1); - OverloadSetWithInParam(2L); - int i = 3; - OverloadSetWithInParam(in i); - OverloadSetWithInParam((long)4); + Console.WriteLine("OverloadSetWithInParam:"); + OverloadSetWithInParam(1); + OverloadSetWithInParam(2L); + int i = 3; + OverloadSetWithInParam(in i); + OverloadSetWithInParam((long)4); + + Console.WriteLine("OverloadSetWithInParam2:"); + OverloadSetWithInParam2(1); + OverloadSetWithInParam2((object)1); + + Console.WriteLine("OverloadSetWithInParam3:"); + OverloadSetWithInParam3(1); + OverloadSetWithInParam3(2); + OverloadSetWithInParam3((object)3); + + Console.WriteLine("InVsRegularParam:"); + InVsRegularParam(1); + i = 2; + InVsRegularParam(in i); +#endif + } - Console.WriteLine("OverloadSetWithInParam2:"); - OverloadSetWithInParam2(1); - OverloadSetWithInParam2((object)1); +#if CS72 + static void OverloadSetWithInParam(in int i) + { + Console.WriteLine("in int " + i); + } + static void OverloadSetWithInParam(long l) + { + Console.WriteLine("long " + l); + } + static void OverloadSetWithInParam2(in long i) + { + Console.WriteLine("in long " + i); + } + static void OverloadSetWithInParam2(object o) + { + Console.WriteLine("object " + o); + } + static void OverloadSetWithInParam3(in int i) + { + Console.WriteLine("in int " + i); + } + static void OverloadSetWithInParam3(T a) + { + Console.WriteLine("T " + a); + } + static void InVsRegularParam(in int i) + { + Console.WriteLine("in int " + i); + } + static void InVsRegularParam(int i) + { + Console.WriteLine("int " + i); + } +#endif + #endregion - Console.WriteLine("OverloadSetWithInParam3:"); - OverloadSetWithInParam3(1); - OverloadSetWithInParam3(2); - OverloadSetWithInParam3((object)3); +#if CS90 + static void NativeIntTests(IntPtr i1, nint i2) + { + Console.WriteLine("NativeIntTests(i1):"); + ObjectOrLong((object)i1); + ObjectOrLong((long)i1); + Console.WriteLine("NativeIntTests(i2):"); + ObjectOrLong((object)i2); + ObjectOrLong((long)i2); + Console.WriteLine("NativeIntTests(new IntPtr):"); + ObjectOrLong((object)new IntPtr(3)); + ObjectOrLong((long)new IntPtr(3)); + Console.WriteLine("NativeIntTests(IntPtr.Zero):"); + ObjectOrLong((object)IntPtr.Zero); + ObjectOrLong((long)IntPtr.Zero); + } - Console.WriteLine("InVsRegularParam:"); - InVsRegularParam(1); - i = 2; - InVsRegularParam(in i); + static void ObjectOrLong(object o) + { + Console.WriteLine("object " + o); + } + + static void ObjectOrLong(long l) + { + Console.WriteLine("long " + l); + } #endif - } -#if CS72 - static void OverloadSetWithInParam(in int i) - { - Console.WriteLine("in int " + i); - } - static void OverloadSetWithInParam(long l) - { - Console.WriteLine("long " + l); - } - static void OverloadSetWithInParam2(in long i) - { - Console.WriteLine("in long " + i); - } - static void OverloadSetWithInParam2(object o) - { - Console.WriteLine("object " + o); - } - static void OverloadSetWithInParam3(in int i) - { - Console.WriteLine("in int " + i); - } - static void OverloadSetWithInParam3(T a) - { - Console.WriteLine("T " + a); - } - static void InVsRegularParam(in int i) - { - Console.WriteLine("in int " + i); - } - static void InVsRegularParam(int i) + #region #2444 + public struct Issue2444 + { + public class X { } + public class Y { } + + public static implicit operator Issue2444(X x) { - Console.WriteLine("int " + i); + Console.WriteLine("#2444: op_Implicit(X)"); + return new Issue2444(); } -#endif - #endregion -#if CS90 - static void NativeIntTests(IntPtr i1, nint i2) + public static implicit operator Issue2444(Y y) { - Console.WriteLine("NativeIntTests(i1):"); - ObjectOrLong((object)i1); - ObjectOrLong((long)i1); - Console.WriteLine("NativeIntTests(i2):"); - ObjectOrLong((object)i2); - ObjectOrLong((long)i2); - Console.WriteLine("NativeIntTests(new IntPtr):"); - ObjectOrLong((object)new IntPtr(3)); - ObjectOrLong((long)new IntPtr(3)); - Console.WriteLine("NativeIntTests(IntPtr.Zero):"); - ObjectOrLong((object)IntPtr.Zero); - ObjectOrLong((long)IntPtr.Zero); + Console.WriteLine("#2444: op_Implicit(Y)"); + return new Issue2444(); } - static void ObjectOrLong(object o) + public static void M1(Issue2444 z) { - Console.WriteLine("object " + o); + Console.WriteLine(string.Format("#2444: M1({0})", z)); } - static void ObjectOrLong(long l) + public static void M2() { - Console.WriteLine("long " + l); + Console.WriteLine("#2444: before M1"); + M1((X)null); + Console.WriteLine("#2444: after M1"); } -#endif + } - #region #2444 - public struct Issue2444 + public class Issue2741 + { + public class B { - public class X { } - public class Y { } + private void M() + { + Console.WriteLine("B::M"); + } - public static implicit operator Issue2444(X x) + protected void M2() { - Console.WriteLine("#2444: op_Implicit(X)"); - return new Issue2444(); + Console.WriteLine("B::M2"); } - public static implicit operator Issue2444(Y y) + protected void M3() { - Console.WriteLine("#2444: op_Implicit(Y)"); - return new Issue2444(); + Console.WriteLine("B::M3"); } - public static void M1(Issue2444 z) + protected void M4() { - Console.WriteLine(string.Format("#2444: M1({0})", z)); + Console.WriteLine("B::M4"); } - public static void M2() + public static void Test(C c) { - Console.WriteLine("#2444: before M1"); - M1((X)null); - Console.WriteLine("#2444: after M1"); + ((B)c).M(); + ((B)c).M2(); + c.Test(); } } - public class Issue2741 + public class C : B { - public class B + public void M() { - private void M() - { - Console.WriteLine("B::M"); - } - - protected void M2() - { - Console.WriteLine("B::M2"); - } - - protected void M3() - { - Console.WriteLine("B::M3"); - } - - protected void M4() - { - Console.WriteLine("B::M4"); - } - - public static void Test(C c) - { - ((B)c).M(); - ((B)c).M2(); - c.Test(); - } + Console.WriteLine("C::M"); } - public class C : B + public new void M2() { - public void M() - { - Console.WriteLine("C::M"); - } - - public new void M2() - { - Console.WriteLine("C::M2"); - } - - public new void M3() - { - Console.WriteLine("C::M3"); - } - - public void Test() - { - M3(); - base.M3(); - M4(); - } + Console.WriteLine("C::M2"); } - } - #endregion - } - class IndexerTests - { - public object this[object key] { - get { - Console.WriteLine("IndexerTests.get_Item(object key)"); - return new object(); + public new void M3() + { + Console.WriteLine("C::M3"); } - set { - Console.WriteLine("IndexerTests.set_Item(object key, object value)"); + + public void Test() + { + M3(); + base.M3(); + M4(); } } + } + #endregion +} - public object this[int key] { - get { - Console.WriteLine("IndexerTests.get_Item(int key)"); - return new object(); - } - set { - Console.WriteLine("IndexerTests.set_Item(int key, object value)"); - } +class IndexerTests +{ + public object this[object key] { + get { + Console.WriteLine("IndexerTests.get_Item(object key)"); + return new object(); + } + set { + Console.WriteLine("IndexerTests.set_Item(object key, object value)"); + } + } + + public object this[int key] { + get { + Console.WriteLine("IndexerTests.get_Item(int key)"); + return new object(); + } + set { + Console.WriteLine("IndexerTests.set_Item(int key, object value)"); } } } +} diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.cs index 34275f2523..20e82b33f6 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.cs @@ -205,4746 +205,4746 @@ public struct CustomStruct public static CustomStruct operator >>>(CustomStruct lhs, int rhs) { throw new NotImplementedException(); - } -#endif - public static CustomStruct operator &(CustomStruct lhs, CustomStruct rhs) - { - throw new NotImplementedException(); - } - public static CustomStruct operator |(CustomStruct lhs, CustomStruct rhs) - { - throw new NotImplementedException(); - } - public static CustomStruct operator ^(CustomStruct lhs, CustomStruct rhs) - { - throw new NotImplementedException(); - } - public static CustomStruct operator ++(CustomStruct lhs) - { - throw new NotImplementedException(); - } - public static CustomStruct operator --(CustomStruct lhs) - { - throw new NotImplementedException(); - } - } - - public struct CustomStruct2 - { - public CustomClass CustomClassField; - public CustomStruct CustomStructField; - - public byte ByteField; - public sbyte SbyteField; - public short ShortField; - public ushort UshortField; - public int IntField; - public uint UintField; - public long LongField; - public ulong UlongField; - - public CustomClass CustomClassProp { get; set; } - public CustomStruct CustomStructProp { get; set; } - public byte ByteProp { get; set; } - public sbyte SbyteProp { get; set; } - public short ShortProp { get; set; } - public ushort UshortProp { get; set; } - public int IntProp { get; set; } - public uint UintProp { get; set; } - public long LongProp { get; set; } - public ulong UlongProp { get; set; } } - - private int test1; - private int[] array1; - private StructContainer field1; - private MyEnum enumField; - private Dictionary ushortDict = new Dictionary(); - private ShortEnum shortEnumField; - public static int StaticField; - public static short StaticShortField; - - private static CustomClass customClassField; - private static CustomStruct customStructField; - private static CustomStruct2 otherCustomStructField; - private static byte byteField; - private static sbyte sbyteField; - private static short shortField; - private static ushort ushortField; - private static int intField; - private static uint uintField; - private static long longField; - private static ulong ulongField; - - private static CustomClass CustomClassProp { get; set; } - private static CustomStruct CustomStructProp { get; set; } - private static byte ByteProp { get; set; } - private static sbyte SbyteProp { get; set; } - private static short ShortProp { get; set; } - private static ushort UshortProp { get; set; } - private static int IntProp { get; set; } - private static uint UintProp { get; set; } - private static long LongProp { get; set; } - private static ulong UlongProp { get; set; } - - public static int StaticProperty { get; set; } - - public static ShortEnum StaticShortProperty { get; set; } - - public static string StaticStringProperty { get; set; } - - private static void Use(ref byte b) - { - } - - private static void Use(ref sbyte b) - { - } - - private static void Use(ref T num) - { - } - - private static CustomStruct2 GetStruct() +#endif + public static CustomStruct operator &(CustomStruct lhs, CustomStruct rhs) { throw new NotImplementedException(); } -#if CS70 - private static ref CustomStruct2 GetRefStruct() + public static CustomStruct operator |(CustomStruct lhs, CustomStruct rhs) { throw new NotImplementedException(); } - - private static ref CustomStruct GetRefCustomStruct() + public static CustomStruct operator ^(CustomStruct lhs, CustomStruct rhs) { throw new NotImplementedException(); } - - private static ref CustomClass GetRefCustomClass() + public static CustomStruct operator ++(CustomStruct lhs) { throw new NotImplementedException(); } - - private static ref byte GetRefByte() + public static CustomStruct operator --(CustomStruct lhs) { throw new NotImplementedException(); } + } - private static ref sbyte GetRefSbyte() - { - throw new NotImplementedException(); - } + public struct CustomStruct2 + { + public CustomClass CustomClassField; + public CustomStruct CustomStructField; + + public byte ByteField; + public sbyte SbyteField; + public short ShortField; + public ushort UshortField; + public int IntField; + public uint UintField; + public long LongField; + public ulong UlongField; + + public CustomClass CustomClassProp { get; set; } + public CustomStruct CustomStructProp { get; set; } + public byte ByteProp { get; set; } + public sbyte SbyteProp { get; set; } + public short ShortProp { get; set; } + public ushort UshortProp { get; set; } + public int IntProp { get; set; } + public uint UintProp { get; set; } + public long LongProp { get; set; } + public ulong UlongProp { get; set; } + } - private static ref short GetRefShort() - { - throw new NotImplementedException(); - } + private int test1; + private int[] array1; + private StructContainer field1; + private MyEnum enumField; + private Dictionary ushortDict = new Dictionary(); + private ShortEnum shortEnumField; + public static int StaticField; + public static short StaticShortField; + + private static CustomClass customClassField; + private static CustomStruct customStructField; + private static CustomStruct2 otherCustomStructField; + private static byte byteField; + private static sbyte sbyteField; + private static short shortField; + private static ushort ushortField; + private static int intField; + private static uint uintField; + private static long longField; + private static ulong ulongField; + + private static CustomClass CustomClassProp { get; set; } + private static CustomStruct CustomStructProp { get; set; } + private static byte ByteProp { get; set; } + private static sbyte SbyteProp { get; set; } + private static short ShortProp { get; set; } + private static ushort UshortProp { get; set; } + private static int IntProp { get; set; } + private static uint UintProp { get; set; } + private static long LongProp { get; set; } + private static ulong UlongProp { get; set; } + + public static int StaticProperty { get; set; } + + public static ShortEnum StaticShortProperty { get; set; } + + public static string StaticStringProperty { get; set; } + + private static void Use(ref byte b) + { + } - private static ref int GetRefInt() - { - throw new NotImplementedException(); - } + private static void Use(ref sbyte b) + { + } - private static ref long GetRefLong() - { - throw new NotImplementedException(); - } + private static void Use(ref T num) + { + } - private static ref ushort GetRefUshort() - { - throw new NotImplementedException(); - } + private static CustomStruct2 GetStruct() + { + throw new NotImplementedException(); + } +#if CS70 + private static ref CustomStruct2 GetRefStruct() + { + throw new NotImplementedException(); + } - private static ref uint GetRefUint() - { - throw new NotImplementedException(); - } + private static ref CustomStruct GetRefCustomStruct() + { + throw new NotImplementedException(); + } - private static ref ulong GetRefUlong() - { - throw new NotImplementedException(); - } + private static ref CustomClass GetRefCustomClass() + { + throw new NotImplementedException(); + } + + private static ref byte GetRefByte() + { + throw new NotImplementedException(); + } + + private static ref sbyte GetRefSbyte() + { + throw new NotImplementedException(); + } + + private static ref short GetRefShort() + { + throw new NotImplementedException(); + } + + private static ref int GetRefInt() + { + throw new NotImplementedException(); + } + + private static ref long GetRefLong() + { + throw new NotImplementedException(); + } + + private static ref ushort GetRefUshort() + { + throw new NotImplementedException(); + } + + private static ref uint GetRefUint() + { + throw new NotImplementedException(); + } + + private static ref ulong GetRefUlong() + { + throw new NotImplementedException(); + } #endif - private static CustomClass GetClass() - { - throw new NotImplementedException(); - } + private static CustomClass GetClass() + { + throw new NotImplementedException(); + } - private static void X(T result) - { + private static void X(T result) + { - } + } - private MutableClass M() - { - return new MutableClass(); - } + private MutableClass M() + { + return new MutableClass(); + } - private int[,] Array() - { - return null; - } + private int[,] Array() + { + return null; + } - private unsafe int* GetPointer() - { - return null; - } + private unsafe int* GetPointer() + { + return null; + } - public int GetIndex() - { - return new Random().Next(0, 100); - } + public int GetIndex() + { + return new Random().Next(0, 100); + } - public int[] GetArray() - { - throw new NotImplementedException(); - } + public int[] GetArray() + { + throw new NotImplementedException(); + } - public int GetValue(int value) - { - return value; - } + public int GetValue(int value) + { + return value; + } - public bool IsUpperCaseA(char a) - { - return a == 'A'; - } + public bool IsUpperCaseA(char a) + { + return a == 'A'; + } - public void Int32_Local_Add(int i) - { - i++; - Console.WriteLine(i++); - Console.WriteLine(++i); - i += 5; - Console.WriteLine(i += 5); - } + public void Int32_Local_Add(int i) + { + i++; + Console.WriteLine(i++); + Console.WriteLine(++i); + i += 5; + Console.WriteLine(i += 5); + } - public void Int32_Local_Sub(int i) - { - i--; - Console.WriteLine(i--); - Console.WriteLine(--i); - i -= 5; - Console.WriteLine(i -= 5); - } + public void Int32_Local_Sub(int i) + { + i--; + Console.WriteLine(i--); + Console.WriteLine(--i); + i -= 5; + Console.WriteLine(i -= 5); + } - public void Int32_Local_Mul(int i) - { - i *= 5; - Console.WriteLine(i *= 5); - } + public void Int32_Local_Mul(int i) + { + i *= 5; + Console.WriteLine(i *= 5); + } - public void Int32_Local_Div(int i) - { - i /= 5; - Console.WriteLine(i /= 5); - } + public void Int32_Local_Div(int i) + { + i /= 5; + Console.WriteLine(i /= 5); + } - public void Int32_Local_Rem(int i) - { - i %= 5; - Console.WriteLine(i %= 5); - } + public void Int32_Local_Rem(int i) + { + i %= 5; + Console.WriteLine(i %= 5); + } - public void Int32_Local_BitAnd(int i) - { - i &= 5; - Console.WriteLine(i &= 5); - } + public void Int32_Local_BitAnd(int i) + { + i &= 5; + Console.WriteLine(i &= 5); + } - public void Int32_Local_BitOr(int i) - { - i |= 5; - Console.WriteLine(i |= 5); - } + public void Int32_Local_BitOr(int i) + { + i |= 5; + Console.WriteLine(i |= 5); + } - public void Int32_Local_BitXor(int i) - { - i ^= 5; - Console.WriteLine(i ^= 5); - } + public void Int32_Local_BitXor(int i) + { + i ^= 5; + Console.WriteLine(i ^= 5); + } - public void Int32_Local_ShiftLeft(int i) - { - i <<= 5; - Console.WriteLine(i <<= 5); - } + public void Int32_Local_ShiftLeft(int i) + { + i <<= 5; + Console.WriteLine(i <<= 5); + } - public void Int32_Local_ShiftRight(int i) - { - i >>= 5; - Console.WriteLine(i >>= 5); - } + public void Int32_Local_ShiftRight(int i) + { + i >>= 5; + Console.WriteLine(i >>= 5); + } - public void IntegerWithInline(int i) - { - Console.WriteLine(i += 5); - Console.WriteLine(i); - } + public void IntegerWithInline(int i) + { + Console.WriteLine(i += 5); + Console.WriteLine(i); + } - public void IntegerField(int i) - { - Console.WriteLine(test1 += i); - Console.WriteLine(test1); - Console.WriteLine(test1 -= i); - Console.WriteLine(test1); - } + public void IntegerField(int i) + { + Console.WriteLine(test1 += i); + Console.WriteLine(test1); + Console.WriteLine(test1 -= i); + Console.WriteLine(test1); + } - public void Array(int i) - { - Console.WriteLine(array1[i] += i); - Console.WriteLine(array1[i * 2] += i * 2); - } + public void Array(int i) + { + Console.WriteLine(array1[i] += i); + Console.WriteLine(array1[i * 2] += i * 2); + } - public int ArrayUsageWithMethods() - { - return GetArray()[GetIndex()]++; - } + public int ArrayUsageWithMethods() + { + return GetArray()[GetIndex()]++; + } - public void NestedField() + public void NestedField() + { + if (field1.HasIndex) { - if (field1.HasIndex) - { - Console.WriteLine(field1.Field *= 2); - field1.Field++; - Console.WriteLine(field1.Field++); - } + Console.WriteLine(field1.Field *= 2); + field1.Field++; + Console.WriteLine(field1.Field++); } + } - public void Enum() - { - enumField |= MyEnum.Two; - enumField &= ~MyEnum.Four; - enumField += 2; - enumField -= 3; - } + public void Enum() + { + enumField |= MyEnum.Two; + enumField &= ~MyEnum.Four; + enumField += 2; + enumField -= 3; + } - public void ShortEnumTest() - { - shortEnumField |= ShortEnum.Two; - shortEnumField &= ShortEnum.Four; - shortEnumField += 2; - shortEnumField -= 3; - } + public void ShortEnumTest() + { + shortEnumField |= ShortEnum.Two; + shortEnumField &= ShortEnum.Four; + shortEnumField += 2; + shortEnumField -= 3; + } - public int PreIncrementInAddition(int i, int j) - { - return i + ++j; - } + public int PreIncrementInAddition(int i, int j) + { + return i + ++j; + } - public int PreIncrementArrayElement(int[] array, int pos) - { - return --array[pos]; - } + public int PreIncrementArrayElement(int[] array, int pos) + { + return --array[pos]; + } - public int PostIncrementArrayElement(int[] array, int pos) - { - return array[pos]++; - } + public int PostIncrementArrayElement(int[] array, int pos) + { + return array[pos]++; + } - public void IncrementArrayElement(int[] array, int pos) - { - array[pos]++; - } + public void IncrementArrayElement(int[] array, int pos) + { + array[pos]++; + } - public void DoubleArrayElement(int[] array, int pos) - { - array[pos] *= 2; - } + public void DoubleArrayElement(int[] array, int pos) + { + array[pos] *= 2; + } - public int DoubleArrayElementAndReturn(int[] array, int pos) - { - return array[pos] *= 2; - } + public int DoubleArrayElementAndReturn(int[] array, int pos) + { + return array[pos] *= 2; + } - public int PreIncrementArrayElementShort(short[] array, int pos) - { - return --array[pos]; - } + public int PreIncrementArrayElementShort(short[] array, int pos) + { + return --array[pos]; + } - public int PostIncrementArrayElementShort(short[] array, int pos) - { - return array[pos]++; - } + public int PostIncrementArrayElementShort(short[] array, int pos) + { + return array[pos]++; + } - public void IncrementArrayElementShort(short[] array, int pos) - { - array[pos]++; - } + public void IncrementArrayElementShort(short[] array, int pos) + { + array[pos]++; + } - public void DoubleArrayElementShort(short[] array, int pos) - { - array[pos] *= 2; - } + public void DoubleArrayElementShort(short[] array, int pos) + { + array[pos] *= 2; + } - public short DoubleArrayElementShortAndReturn(short[] array, int pos) - { - return array[pos] *= 2; - } + public short DoubleArrayElementShortAndReturn(short[] array, int pos) + { + return array[pos] *= 2; + } - public int PreIncrementInstanceField() - { - return ++M().Field; - } + public int PreIncrementInstanceField() + { + return ++M().Field; + } - public int PostIncrementInstanceField() - { - return M().Field++; - } + public int PostIncrementInstanceField() + { + return M().Field++; + } - public void IncrementInstanceField() - { - M().Field++; - } + public void IncrementInstanceField() + { + M().Field++; + } - public void DoubleInstanceField() - { - M().Field *= 2; - } + public void DoubleInstanceField() + { + M().Field *= 2; + } - public int DoubleInstanceFieldAndReturn() - { - return M().Field *= 2; - } + public int DoubleInstanceFieldAndReturn() + { + return M().Field *= 2; + } - public int PreIncrementInstanceField2(MutableClass m) - { - return ++m.Field; - } + public int PreIncrementInstanceField2(MutableClass m) + { + return ++m.Field; + } - public int PostIncrementInstanceField2(MutableClass m) - { - return m.Field++; - } + public int PostIncrementInstanceField2(MutableClass m) + { + return m.Field++; + } - public void IncrementInstanceField2(MutableClass m) - { - m.Field++; - } + public void IncrementInstanceField2(MutableClass m) + { + m.Field++; + } - public int PreIncrementInstanceFieldShort() - { - return ++M().ShortField; - } + public int PreIncrementInstanceFieldShort() + { + return ++M().ShortField; + } - public int PostIncrementInstanceFieldShort() - { - return M().ShortField++; - } + public int PostIncrementInstanceFieldShort() + { + return M().ShortField++; + } - public void IncrementInstanceFieldShort() - { - M().ShortField++; - } + public void IncrementInstanceFieldShort() + { + M().ShortField++; + } - public int PreIncrementInstanceProperty() - { - return ++M().Property; - } + public int PreIncrementInstanceProperty() + { + return ++M().Property; + } - public int PostIncrementInstanceProperty() - { - return M().Property++; - } + public int PostIncrementInstanceProperty() + { + return M().Property++; + } - public void IncrementInstanceProperty() - { - M().Property++; - } + public void IncrementInstanceProperty() + { + M().Property++; + } - public void DoubleInstanceProperty() - { - M().Property *= 2; - } + public void DoubleInstanceProperty() + { + M().Property *= 2; + } - public int DoubleInstancePropertyAndReturn() - { - return M().Property *= 2; - } + public int DoubleInstancePropertyAndReturn() + { + return M().Property *= 2; + } - public int PreIncrementInstancePropertyByte() - { - return ++M().ByteProperty; - } + public int PreIncrementInstancePropertyByte() + { + return ++M().ByteProperty; + } - public int PostIncrementInstancePropertyByte() - { - return M().ByteProperty++; - } + public int PostIncrementInstancePropertyByte() + { + return M().ByteProperty++; + } - public void IncrementInstancePropertyByte() - { - M().ByteProperty++; - } + public void IncrementInstancePropertyByte() + { + M().ByteProperty++; + } - public void DoubleInstancePropertyByte() - { - M().ByteProperty *= 2; - } + public void DoubleInstancePropertyByte() + { + M().ByteProperty *= 2; + } - public int DoubleInstancePropertyByteAndReturn() - { - return M().ByteProperty *= 2; - } + public int DoubleInstancePropertyByteAndReturn() + { + return M().ByteProperty *= 2; + } - public void BitManipBoolProperty(bool b) - { - M().BoolProperty |= b; - M().BoolProperty &= b; - M().BoolProperty ^= b; - } + public void BitManipBoolProperty(bool b) + { + M().BoolProperty |= b; + M().BoolProperty &= b; + M().BoolProperty ^= b; + } - public bool BitOrBoolPropertyAndReturn(bool b) - { - return M().BoolProperty |= b; - } + public bool BitOrBoolPropertyAndReturn(bool b) + { + return M().BoolProperty |= b; + } - public bool BitAndBoolPropertyAndReturn(bool b) - { - return M().BoolProperty &= b; - } + public bool BitAndBoolPropertyAndReturn(bool b) + { + return M().BoolProperty &= b; + } - public int PreIncrementStaticField() - { - return ++StaticField; - } + public int PreIncrementStaticField() + { + return ++StaticField; + } - public int PostIncrementStaticField() - { - return StaticField++; - } + public int PostIncrementStaticField() + { + return StaticField++; + } - public void IncrementStaticField() - { - StaticField++; - } + public void IncrementStaticField() + { + StaticField++; + } - public void DoubleStaticField() - { - StaticField *= 2; - } + public void DoubleStaticField() + { + StaticField *= 2; + } - public int DoubleStaticFieldAndReturn() - { - return StaticField *= 2; - } + public int DoubleStaticFieldAndReturn() + { + return StaticField *= 2; + } - public int PreIncrementStaticFieldShort() - { - return ++StaticShortField; - } + public int PreIncrementStaticFieldShort() + { + return ++StaticShortField; + } - public int PostIncrementStaticFieldShort() - { - return StaticShortField++; - } + public int PostIncrementStaticFieldShort() + { + return StaticShortField++; + } - public void IncrementStaticFieldShort() - { - StaticShortField++; - } + public void IncrementStaticFieldShort() + { + StaticShortField++; + } - public void DoubleStaticFieldShort() - { - StaticShortField *= 2; - } + public void DoubleStaticFieldShort() + { + StaticShortField *= 2; + } - public short DoubleStaticFieldAndReturnShort() - { - return StaticShortField *= 2; - } + public short DoubleStaticFieldAndReturnShort() + { + return StaticShortField *= 2; + } - public int PreIncrementStaticProperty() - { - return ++StaticProperty; - } + public int PreIncrementStaticProperty() + { + return ++StaticProperty; + } - public int PostIncrementStaticProperty() - { - return StaticProperty++; - } + public int PostIncrementStaticProperty() + { + return StaticProperty++; + } - public void IncrementStaticProperty() - { - StaticProperty++; - } + public void IncrementStaticProperty() + { + StaticProperty++; + } - public void DoubleStaticProperty() - { - StaticProperty *= 2; - } + public void DoubleStaticProperty() + { + StaticProperty *= 2; + } - public int DoubleStaticPropertyAndReturn() - { - return StaticProperty *= 2; - } + public int DoubleStaticPropertyAndReturn() + { + return StaticProperty *= 2; + } - public ShortEnum PreIncrementStaticPropertyShort() - { - return ++StaticShortProperty; - } + public ShortEnum PreIncrementStaticPropertyShort() + { + return ++StaticShortProperty; + } - public ShortEnum PostIncrementStaticPropertyShort() - { - return StaticShortProperty++; - } + public ShortEnum PostIncrementStaticPropertyShort() + { + return StaticShortProperty++; + } - public void IncrementStaticPropertyShort() - { - StaticShortProperty++; - } + public void IncrementStaticPropertyShort() + { + StaticShortProperty++; + } - #region Generated Tests + #region Generated Tests - public static void ByteAddTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - p += 5; - b += 5; - Use(ref b); - byteField += 5; - ByteProp += 5; - c.ByteField += 5; - c.ByteProp += 5; - s.ByteField += 5; - s.ByteProp += 5; - customClassField.ByteField += 5; - customClassField.ByteProp += 5; - otherCustomStructField.ByteField += 5; - otherCustomStructField.ByteProp += 5; - CustomClassProp.ByteField += 5; - CustomClassProp.ByteProp += 5; - GetClass().ByteField += 5; - GetClass().ByteProp += 5; -#if CS70 - GetRefStruct().ByteField += 5; - GetRefStruct().ByteProp += 5; - GetRefByte() += 5; + public static void ByteAddTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + p += 5; + b += 5; + Use(ref b); + byteField += 5; + ByteProp += 5; + c.ByteField += 5; + c.ByteProp += 5; + s.ByteField += 5; + s.ByteProp += 5; + customClassField.ByteField += 5; + customClassField.ByteProp += 5; + otherCustomStructField.ByteField += 5; + otherCustomStructField.ByteProp += 5; + CustomClassProp.ByteField += 5; + CustomClassProp.ByteProp += 5; + GetClass().ByteField += 5; + GetClass().ByteProp += 5; +#if CS70 + GetRefStruct().ByteField += 5; + GetRefStruct().ByteProp += 5; + GetRefByte() += 5; #endif - } + } - public static void ByteSubtractTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - p -= 5; - b -= 5; - Use(ref b); - byteField -= 5; - ByteProp -= 5; - c.ByteField -= 5; - c.ByteProp -= 5; - s.ByteField -= 5; - s.ByteProp -= 5; - customClassField.ByteField -= 5; - customClassField.ByteProp -= 5; - otherCustomStructField.ByteField -= 5; - otherCustomStructField.ByteProp -= 5; - CustomClassProp.ByteField -= 5; - CustomClassProp.ByteProp -= 5; - GetClass().ByteField -= 5; - GetClass().ByteProp -= 5; -#if CS70 - GetRefStruct().ByteField -= 5; - GetRefStruct().ByteProp -= 5; - GetRefByte() -= 5; + public static void ByteSubtractTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + p -= 5; + b -= 5; + Use(ref b); + byteField -= 5; + ByteProp -= 5; + c.ByteField -= 5; + c.ByteProp -= 5; + s.ByteField -= 5; + s.ByteProp -= 5; + customClassField.ByteField -= 5; + customClassField.ByteProp -= 5; + otherCustomStructField.ByteField -= 5; + otherCustomStructField.ByteProp -= 5; + CustomClassProp.ByteField -= 5; + CustomClassProp.ByteProp -= 5; + GetClass().ByteField -= 5; + GetClass().ByteProp -= 5; +#if CS70 + GetRefStruct().ByteField -= 5; + GetRefStruct().ByteProp -= 5; + GetRefByte() -= 5; #endif - } + } - public static void ByteMultiplyTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - p *= 5; - b *= 5; - Use(ref b); - byteField *= 5; - ByteProp *= 5; - c.ByteField *= 5; - c.ByteProp *= 5; - s.ByteField *= 5; - s.ByteProp *= 5; - customClassField.ByteField *= 5; - customClassField.ByteProp *= 5; - otherCustomStructField.ByteField *= 5; - otherCustomStructField.ByteProp *= 5; - CustomClassProp.ByteField *= 5; - CustomClassProp.ByteProp *= 5; - GetClass().ByteField *= 5; - GetClass().ByteProp *= 5; -#if CS70 - GetRefStruct().ByteField *= 5; - GetRefStruct().ByteProp *= 5; - GetRefByte() *= 5; + public static void ByteMultiplyTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + p *= 5; + b *= 5; + Use(ref b); + byteField *= 5; + ByteProp *= 5; + c.ByteField *= 5; + c.ByteProp *= 5; + s.ByteField *= 5; + s.ByteProp *= 5; + customClassField.ByteField *= 5; + customClassField.ByteProp *= 5; + otherCustomStructField.ByteField *= 5; + otherCustomStructField.ByteProp *= 5; + CustomClassProp.ByteField *= 5; + CustomClassProp.ByteProp *= 5; + GetClass().ByteField *= 5; + GetClass().ByteProp *= 5; +#if CS70 + GetRefStruct().ByteField *= 5; + GetRefStruct().ByteProp *= 5; + GetRefByte() *= 5; #endif - } + } - public static void ByteDivideTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - p /= 5; - b /= 5; - Use(ref b); - byteField /= 5; - ByteProp /= 5; - c.ByteField /= 5; - c.ByteProp /= 5; - s.ByteField /= 5; - s.ByteProp /= 5; - customClassField.ByteField /= 5; - customClassField.ByteProp /= 5; - otherCustomStructField.ByteField /= 5; - otherCustomStructField.ByteProp /= 5; - CustomClassProp.ByteField /= 5; - CustomClassProp.ByteProp /= 5; - GetClass().ByteField /= 5; - GetClass().ByteProp /= 5; -#if CS70 - GetRefStruct().ByteField /= 5; - GetRefStruct().ByteProp /= 5; - GetRefByte() /= 5; + public static void ByteDivideTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + p /= 5; + b /= 5; + Use(ref b); + byteField /= 5; + ByteProp /= 5; + c.ByteField /= 5; + c.ByteProp /= 5; + s.ByteField /= 5; + s.ByteProp /= 5; + customClassField.ByteField /= 5; + customClassField.ByteProp /= 5; + otherCustomStructField.ByteField /= 5; + otherCustomStructField.ByteProp /= 5; + CustomClassProp.ByteField /= 5; + CustomClassProp.ByteProp /= 5; + GetClass().ByteField /= 5; + GetClass().ByteProp /= 5; +#if CS70 + GetRefStruct().ByteField /= 5; + GetRefStruct().ByteProp /= 5; + GetRefByte() /= 5; #endif - } + } - public static void ByteModulusTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - p %= 5; - b %= 5; - Use(ref b); - byteField %= 5; - ByteProp %= 5; - c.ByteField %= 5; - c.ByteProp %= 5; - s.ByteField %= 5; - s.ByteProp %= 5; - customClassField.ByteField %= 5; - customClassField.ByteProp %= 5; - otherCustomStructField.ByteField %= 5; - otherCustomStructField.ByteProp %= 5; - CustomClassProp.ByteField %= 5; - CustomClassProp.ByteProp %= 5; - GetClass().ByteField %= 5; - GetClass().ByteProp %= 5; -#if CS70 - GetRefStruct().ByteField %= 5; - GetRefStruct().ByteProp %= 5; - GetRefByte() %= 5; + public static void ByteModulusTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + p %= 5; + b %= 5; + Use(ref b); + byteField %= 5; + ByteProp %= 5; + c.ByteField %= 5; + c.ByteProp %= 5; + s.ByteField %= 5; + s.ByteProp %= 5; + customClassField.ByteField %= 5; + customClassField.ByteProp %= 5; + otherCustomStructField.ByteField %= 5; + otherCustomStructField.ByteProp %= 5; + CustomClassProp.ByteField %= 5; + CustomClassProp.ByteProp %= 5; + GetClass().ByteField %= 5; + GetClass().ByteProp %= 5; +#if CS70 + GetRefStruct().ByteField %= 5; + GetRefStruct().ByteProp %= 5; + GetRefByte() %= 5; #endif - } + } - public static void ByteLeftShiftTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - p <<= 5; - b <<= 5; - Use(ref b); - byteField <<= 5; - ByteProp <<= 5; - c.ByteField <<= 5; - c.ByteProp <<= 5; - s.ByteField <<= 5; - s.ByteProp <<= 5; - customClassField.ByteField <<= 5; - customClassField.ByteProp <<= 5; - otherCustomStructField.ByteField <<= 5; - otherCustomStructField.ByteProp <<= 5; - CustomClassProp.ByteField <<= 5; - CustomClassProp.ByteProp <<= 5; - GetClass().ByteField <<= 5; - GetClass().ByteProp <<= 5; -#if CS70 - GetRefStruct().ByteField <<= 5; - GetRefStruct().ByteProp <<= 5; - GetRefByte() <<= 5; + public static void ByteLeftShiftTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + p <<= 5; + b <<= 5; + Use(ref b); + byteField <<= 5; + ByteProp <<= 5; + c.ByteField <<= 5; + c.ByteProp <<= 5; + s.ByteField <<= 5; + s.ByteProp <<= 5; + customClassField.ByteField <<= 5; + customClassField.ByteProp <<= 5; + otherCustomStructField.ByteField <<= 5; + otherCustomStructField.ByteProp <<= 5; + CustomClassProp.ByteField <<= 5; + CustomClassProp.ByteProp <<= 5; + GetClass().ByteField <<= 5; + GetClass().ByteProp <<= 5; +#if CS70 + GetRefStruct().ByteField <<= 5; + GetRefStruct().ByteProp <<= 5; + GetRefByte() <<= 5; #endif - } + } - public static void ByteRightShiftTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - p >>= 5; - b >>= 5; - Use(ref b); - byteField >>= 5; - ByteProp >>= 5; - c.ByteField >>= 5; - c.ByteProp >>= 5; - s.ByteField >>= 5; - s.ByteProp >>= 5; - customClassField.ByteField >>= 5; - customClassField.ByteProp >>= 5; - otherCustomStructField.ByteField >>= 5; - otherCustomStructField.ByteProp >>= 5; - CustomClassProp.ByteField >>= 5; - CustomClassProp.ByteProp >>= 5; - GetClass().ByteField >>= 5; - GetClass().ByteProp >>= 5; -#if CS70 - GetRefStruct().ByteField >>= 5; - GetRefStruct().ByteProp >>= 5; - GetRefByte() >>= 5; + public static void ByteRightShiftTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + p >>= 5; + b >>= 5; + Use(ref b); + byteField >>= 5; + ByteProp >>= 5; + c.ByteField >>= 5; + c.ByteProp >>= 5; + s.ByteField >>= 5; + s.ByteProp >>= 5; + customClassField.ByteField >>= 5; + customClassField.ByteProp >>= 5; + otherCustomStructField.ByteField >>= 5; + otherCustomStructField.ByteProp >>= 5; + CustomClassProp.ByteField >>= 5; + CustomClassProp.ByteProp >>= 5; + GetClass().ByteField >>= 5; + GetClass().ByteProp >>= 5; +#if CS70 + GetRefStruct().ByteField >>= 5; + GetRefStruct().ByteProp >>= 5; + GetRefByte() >>= 5; #endif - } + } - public static void ByteBitAndTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - p &= c.ByteField; - b &= c.ByteField; - Use(ref b); - byteField &= 5; - ByteProp &= 5; - c.ByteField &= 5; - c.ByteProp &= 5; - s.ByteField &= 5; - s.ByteProp &= 5; - customClassField.ByteField &= 5; - customClassField.ByteProp &= 5; - otherCustomStructField.ByteField &= 5; - otherCustomStructField.ByteProp &= 5; - CustomClassProp.ByteField &= 5; - CustomClassProp.ByteProp &= 5; - GetClass().ByteField &= 5; - GetClass().ByteProp &= 5; -#if CS70 - GetRefStruct().ByteField &= 5; - GetRefStruct().ByteProp &= 5; - GetRefByte() &= 5; + public static void ByteBitAndTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + p &= c.ByteField; + b &= c.ByteField; + Use(ref b); + byteField &= 5; + ByteProp &= 5; + c.ByteField &= 5; + c.ByteProp &= 5; + s.ByteField &= 5; + s.ByteProp &= 5; + customClassField.ByteField &= 5; + customClassField.ByteProp &= 5; + otherCustomStructField.ByteField &= 5; + otherCustomStructField.ByteProp &= 5; + CustomClassProp.ByteField &= 5; + CustomClassProp.ByteProp &= 5; + GetClass().ByteField &= 5; + GetClass().ByteProp &= 5; +#if CS70 + GetRefStruct().ByteField &= 5; + GetRefStruct().ByteProp &= 5; + GetRefByte() &= 5; #endif - } + } - public static void ByteBitOrTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - p |= c.ByteField; - b |= c.ByteField; - Use(ref b); - byteField |= 5; - ByteProp |= 5; - c.ByteField |= 5; - c.ByteProp |= 5; - s.ByteField |= 5; - s.ByteProp |= 5; - customClassField.ByteField |= 5; - customClassField.ByteProp |= 5; - otherCustomStructField.ByteField |= 5; - otherCustomStructField.ByteProp |= 5; - CustomClassProp.ByteField |= 5; - CustomClassProp.ByteProp |= 5; - GetClass().ByteField |= 5; - GetClass().ByteProp |= 5; -#if CS70 - GetRefStruct().ByteField |= 5; - GetRefStruct().ByteProp |= 5; - GetRefByte() |= 5; + public static void ByteBitOrTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + p |= c.ByteField; + b |= c.ByteField; + Use(ref b); + byteField |= 5; + ByteProp |= 5; + c.ByteField |= 5; + c.ByteProp |= 5; + s.ByteField |= 5; + s.ByteProp |= 5; + customClassField.ByteField |= 5; + customClassField.ByteProp |= 5; + otherCustomStructField.ByteField |= 5; + otherCustomStructField.ByteProp |= 5; + CustomClassProp.ByteField |= 5; + CustomClassProp.ByteProp |= 5; + GetClass().ByteField |= 5; + GetClass().ByteProp |= 5; +#if CS70 + GetRefStruct().ByteField |= 5; + GetRefStruct().ByteProp |= 5; + GetRefByte() |= 5; #endif - } + } - public static void ByteBitXorTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - p ^= c.ByteField; - b ^= c.ByteField; - Use(ref b); - byteField ^= 5; - ByteProp ^= 5; - c.ByteField ^= 5; - c.ByteProp ^= 5; - s.ByteField ^= 5; - s.ByteProp ^= 5; - customClassField.ByteField ^= 5; - customClassField.ByteProp ^= 5; - otherCustomStructField.ByteField ^= 5; - otherCustomStructField.ByteProp ^= 5; - CustomClassProp.ByteField ^= 5; - CustomClassProp.ByteProp ^= 5; - GetClass().ByteField ^= 5; - GetClass().ByteProp ^= 5; -#if CS70 - GetRefStruct().ByteField ^= 5; - GetRefStruct().ByteProp ^= 5; - GetRefByte() ^= 5; + public static void ByteBitXorTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + p ^= c.ByteField; + b ^= c.ByteField; + Use(ref b); + byteField ^= 5; + ByteProp ^= 5; + c.ByteField ^= 5; + c.ByteProp ^= 5; + s.ByteField ^= 5; + s.ByteProp ^= 5; + customClassField.ByteField ^= 5; + customClassField.ByteProp ^= 5; + otherCustomStructField.ByteField ^= 5; + otherCustomStructField.ByteProp ^= 5; + CustomClassProp.ByteField ^= 5; + CustomClassProp.ByteProp ^= 5; + GetClass().ByteField ^= 5; + GetClass().ByteProp ^= 5; +#if CS70 + GetRefStruct().ByteField ^= 5; + GetRefStruct().ByteProp ^= 5; + GetRefByte() ^= 5; #endif - } + } - public static void BytePostIncTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - X(p++); - X(b++); - Use(ref b); - X(byteField++); - X(ByteProp++); - X(c.ByteField++); - X(c.ByteProp++); - X(s.ByteField++); - X(s.ByteProp++); - X(customClassField.ByteField++); - X(customClassField.ByteProp++); - X(otherCustomStructField.ByteField++); - X(otherCustomStructField.ByteProp++); - X(CustomClassProp.ByteField++); - X(CustomClassProp.ByteProp++); - X(GetClass().ByteField++); - X(GetClass().ByteProp++); -#if CS70 - X(GetRefStruct().ByteField++); - X(GetRefStruct().ByteProp++); - X(GetRefByte()++); + public static void BytePostIncTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + X(p++); + X(b++); + Use(ref b); + X(byteField++); + X(ByteProp++); + X(c.ByteField++); + X(c.ByteProp++); + X(s.ByteField++); + X(s.ByteProp++); + X(customClassField.ByteField++); + X(customClassField.ByteProp++); + X(otherCustomStructField.ByteField++); + X(otherCustomStructField.ByteProp++); + X(CustomClassProp.ByteField++); + X(CustomClassProp.ByteProp++); + X(GetClass().ByteField++); + X(GetClass().ByteProp++); +#if CS70 + X(GetRefStruct().ByteField++); + X(GetRefStruct().ByteProp++); + X(GetRefByte()++); #endif - } + } - public static void BytePreIncTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - X(++p); - X(++b); - Use(ref b); - X(++byteField); - X(++ByteProp); - X(++c.ByteField); - X(++c.ByteProp); - X(++s.ByteField); - X(++s.ByteProp); - X(++customClassField.ByteField); - X(++customClassField.ByteProp); - X(++otherCustomStructField.ByteField); - X(++otherCustomStructField.ByteProp); - X(++CustomClassProp.ByteField); - X(++CustomClassProp.ByteProp); - X(++GetClass().ByteField); - X(++GetClass().ByteProp); -#if CS70 - X(++GetRefStruct().ByteField); - X(++GetRefStruct().ByteProp); - X(++GetRefByte()); + public static void BytePreIncTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + X(++p); + X(++b); + Use(ref b); + X(++byteField); + X(++ByteProp); + X(++c.ByteField); + X(++c.ByteProp); + X(++s.ByteField); + X(++s.ByteProp); + X(++customClassField.ByteField); + X(++customClassField.ByteProp); + X(++otherCustomStructField.ByteField); + X(++otherCustomStructField.ByteProp); + X(++CustomClassProp.ByteField); + X(++CustomClassProp.ByteProp); + X(++GetClass().ByteField); + X(++GetClass().ByteProp); +#if CS70 + X(++GetRefStruct().ByteField); + X(++GetRefStruct().ByteProp); + X(++GetRefByte()); #endif - } - public static void BytePostDecTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - X(p--); - X(b--); - Use(ref b); - X(byteField--); - X(ByteProp--); - X(c.ByteField--); - X(c.ByteProp--); - X(s.ByteField--); - X(s.ByteProp--); - X(customClassField.ByteField--); - X(customClassField.ByteProp--); - X(otherCustomStructField.ByteField--); - X(otherCustomStructField.ByteProp--); - X(CustomClassProp.ByteField--); - X(CustomClassProp.ByteProp--); - X(GetClass().ByteField--); - X(GetClass().ByteProp--); -#if CS70 - X(GetRefStruct().ByteField--); - X(GetRefStruct().ByteProp--); - X(GetRefByte()--); + } + public static void BytePostDecTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + X(p--); + X(b--); + Use(ref b); + X(byteField--); + X(ByteProp--); + X(c.ByteField--); + X(c.ByteProp--); + X(s.ByteField--); + X(s.ByteProp--); + X(customClassField.ByteField--); + X(customClassField.ByteProp--); + X(otherCustomStructField.ByteField--); + X(otherCustomStructField.ByteProp--); + X(CustomClassProp.ByteField--); + X(CustomClassProp.ByteProp--); + X(GetClass().ByteField--); + X(GetClass().ByteProp--); +#if CS70 + X(GetRefStruct().ByteField--); + X(GetRefStruct().ByteProp--); + X(GetRefByte()--); #endif - } + } - public static void BytePreDecTest(byte p, CustomClass c, CustomStruct2 s) - { - byte b = 0; - X(--p); - X(--b); - Use(ref b); - X(--byteField); - X(--ByteProp); - X(--c.ByteField); - X(--c.ByteProp); - X(--s.ByteField); - X(--s.ByteProp); - X(--customClassField.ByteField); - X(--customClassField.ByteProp); - X(--otherCustomStructField.ByteField); - X(--otherCustomStructField.ByteProp); - X(--CustomClassProp.ByteField); - X(--CustomClassProp.ByteProp); - X(--GetClass().ByteField); - X(--GetClass().ByteProp); -#if CS70 - X(--GetRefStruct().ByteField); - X(--GetRefStruct().ByteProp); - X(--GetRefByte()); + public static void BytePreDecTest(byte p, CustomClass c, CustomStruct2 s) + { + byte b = 0; + X(--p); + X(--b); + Use(ref b); + X(--byteField); + X(--ByteProp); + X(--c.ByteField); + X(--c.ByteProp); + X(--s.ByteField); + X(--s.ByteProp); + X(--customClassField.ByteField); + X(--customClassField.ByteProp); + X(--otherCustomStructField.ByteField); + X(--otherCustomStructField.ByteProp); + X(--CustomClassProp.ByteField); + X(--CustomClassProp.ByteProp); + X(--GetClass().ByteField); + X(--GetClass().ByteProp); +#if CS70 + X(--GetRefStruct().ByteField); + X(--GetRefStruct().ByteProp); + X(--GetRefByte()); #endif - } - public static void SbyteAddTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - p += 5; - b += 5; - Use(ref b); - sbyteField += 5; - SbyteProp += 5; - c.SbyteField += 5; - c.SbyteProp += 5; - s.SbyteField += 5; - s.SbyteProp += 5; - customClassField.SbyteField += 5; - customClassField.SbyteProp += 5; - otherCustomStructField.SbyteField += 5; - otherCustomStructField.SbyteProp += 5; - CustomClassProp.SbyteField += 5; - CustomClassProp.SbyteProp += 5; - GetClass().SbyteField += 5; - GetClass().SbyteProp += 5; -#if CS70 - GetRefStruct().SbyteField += 5; - GetRefStruct().SbyteProp += 5; - GetRefSbyte() += 5; + } + public static void SbyteAddTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + p += 5; + b += 5; + Use(ref b); + sbyteField += 5; + SbyteProp += 5; + c.SbyteField += 5; + c.SbyteProp += 5; + s.SbyteField += 5; + s.SbyteProp += 5; + customClassField.SbyteField += 5; + customClassField.SbyteProp += 5; + otherCustomStructField.SbyteField += 5; + otherCustomStructField.SbyteProp += 5; + CustomClassProp.SbyteField += 5; + CustomClassProp.SbyteProp += 5; + GetClass().SbyteField += 5; + GetClass().SbyteProp += 5; +#if CS70 + GetRefStruct().SbyteField += 5; + GetRefStruct().SbyteProp += 5; + GetRefSbyte() += 5; #endif - } + } - public static void SbyteSubtractTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - p -= 5; - b -= 5; - Use(ref b); - sbyteField -= 5; - SbyteProp -= 5; - c.SbyteField -= 5; - c.SbyteProp -= 5; - s.SbyteField -= 5; - s.SbyteProp -= 5; - customClassField.SbyteField -= 5; - customClassField.SbyteProp -= 5; - otherCustomStructField.SbyteField -= 5; - otherCustomStructField.SbyteProp -= 5; - CustomClassProp.SbyteField -= 5; - CustomClassProp.SbyteProp -= 5; - GetClass().SbyteField -= 5; - GetClass().SbyteProp -= 5; -#if CS70 - GetRefStruct().SbyteField -= 5; - GetRefStruct().SbyteProp -= 5; - GetRefSbyte() -= 5; + public static void SbyteSubtractTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + p -= 5; + b -= 5; + Use(ref b); + sbyteField -= 5; + SbyteProp -= 5; + c.SbyteField -= 5; + c.SbyteProp -= 5; + s.SbyteField -= 5; + s.SbyteProp -= 5; + customClassField.SbyteField -= 5; + customClassField.SbyteProp -= 5; + otherCustomStructField.SbyteField -= 5; + otherCustomStructField.SbyteProp -= 5; + CustomClassProp.SbyteField -= 5; + CustomClassProp.SbyteProp -= 5; + GetClass().SbyteField -= 5; + GetClass().SbyteProp -= 5; +#if CS70 + GetRefStruct().SbyteField -= 5; + GetRefStruct().SbyteProp -= 5; + GetRefSbyte() -= 5; #endif - } + } - public static void SbyteMultiplyTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - p *= 5; - b *= 5; - Use(ref b); - sbyteField *= 5; - SbyteProp *= 5; - c.SbyteField *= 5; - c.SbyteProp *= 5; - s.SbyteField *= 5; - s.SbyteProp *= 5; - customClassField.SbyteField *= 5; - customClassField.SbyteProp *= 5; - otherCustomStructField.SbyteField *= 5; - otherCustomStructField.SbyteProp *= 5; - CustomClassProp.SbyteField *= 5; - CustomClassProp.SbyteProp *= 5; - GetClass().SbyteField *= 5; - GetClass().SbyteProp *= 5; -#if CS70 - GetRefStruct().SbyteField *= 5; - GetRefStruct().SbyteProp *= 5; - GetRefSbyte() *= 5; + public static void SbyteMultiplyTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + p *= 5; + b *= 5; + Use(ref b); + sbyteField *= 5; + SbyteProp *= 5; + c.SbyteField *= 5; + c.SbyteProp *= 5; + s.SbyteField *= 5; + s.SbyteProp *= 5; + customClassField.SbyteField *= 5; + customClassField.SbyteProp *= 5; + otherCustomStructField.SbyteField *= 5; + otherCustomStructField.SbyteProp *= 5; + CustomClassProp.SbyteField *= 5; + CustomClassProp.SbyteProp *= 5; + GetClass().SbyteField *= 5; + GetClass().SbyteProp *= 5; +#if CS70 + GetRefStruct().SbyteField *= 5; + GetRefStruct().SbyteProp *= 5; + GetRefSbyte() *= 5; #endif - } + } - public static void SbyteDivideTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - p /= 5; - b /= 5; - Use(ref b); - sbyteField /= 5; - SbyteProp /= 5; - c.SbyteField /= 5; - c.SbyteProp /= 5; - s.SbyteField /= 5; - s.SbyteProp /= 5; - customClassField.SbyteField /= 5; - customClassField.SbyteProp /= 5; - otherCustomStructField.SbyteField /= 5; - otherCustomStructField.SbyteProp /= 5; - CustomClassProp.SbyteField /= 5; - CustomClassProp.SbyteProp /= 5; - GetClass().SbyteField /= 5; - GetClass().SbyteProp /= 5; -#if CS70 - GetRefStruct().SbyteField /= 5; - GetRefStruct().SbyteProp /= 5; - GetRefSbyte() /= 5; + public static void SbyteDivideTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + p /= 5; + b /= 5; + Use(ref b); + sbyteField /= 5; + SbyteProp /= 5; + c.SbyteField /= 5; + c.SbyteProp /= 5; + s.SbyteField /= 5; + s.SbyteProp /= 5; + customClassField.SbyteField /= 5; + customClassField.SbyteProp /= 5; + otherCustomStructField.SbyteField /= 5; + otherCustomStructField.SbyteProp /= 5; + CustomClassProp.SbyteField /= 5; + CustomClassProp.SbyteProp /= 5; + GetClass().SbyteField /= 5; + GetClass().SbyteProp /= 5; +#if CS70 + GetRefStruct().SbyteField /= 5; + GetRefStruct().SbyteProp /= 5; + GetRefSbyte() /= 5; #endif - } + } - public static void SbyteModulusTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - p %= 5; - b %= 5; - Use(ref b); - sbyteField %= 5; - SbyteProp %= 5; - c.SbyteField %= 5; - c.SbyteProp %= 5; - s.SbyteField %= 5; - s.SbyteProp %= 5; - customClassField.SbyteField %= 5; - customClassField.SbyteProp %= 5; - otherCustomStructField.SbyteField %= 5; - otherCustomStructField.SbyteProp %= 5; - CustomClassProp.SbyteField %= 5; - CustomClassProp.SbyteProp %= 5; - GetClass().SbyteField %= 5; - GetClass().SbyteProp %= 5; -#if CS70 - GetRefStruct().SbyteField %= 5; - GetRefStruct().SbyteProp %= 5; - GetRefSbyte() %= 5; + public static void SbyteModulusTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + p %= 5; + b %= 5; + Use(ref b); + sbyteField %= 5; + SbyteProp %= 5; + c.SbyteField %= 5; + c.SbyteProp %= 5; + s.SbyteField %= 5; + s.SbyteProp %= 5; + customClassField.SbyteField %= 5; + customClassField.SbyteProp %= 5; + otherCustomStructField.SbyteField %= 5; + otherCustomStructField.SbyteProp %= 5; + CustomClassProp.SbyteField %= 5; + CustomClassProp.SbyteProp %= 5; + GetClass().SbyteField %= 5; + GetClass().SbyteProp %= 5; +#if CS70 + GetRefStruct().SbyteField %= 5; + GetRefStruct().SbyteProp %= 5; + GetRefSbyte() %= 5; #endif - } + } - public static void SbyteLeftShiftTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - p <<= 5; - b <<= 5; - Use(ref b); - sbyteField <<= 5; - SbyteProp <<= 5; - c.SbyteField <<= 5; - c.SbyteProp <<= 5; - s.SbyteField <<= 5; - s.SbyteProp <<= 5; - customClassField.SbyteField <<= 5; - customClassField.SbyteProp <<= 5; - otherCustomStructField.SbyteField <<= 5; - otherCustomStructField.SbyteProp <<= 5; - CustomClassProp.SbyteField <<= 5; - CustomClassProp.SbyteProp <<= 5; - GetClass().SbyteField <<= 5; - GetClass().SbyteProp <<= 5; -#if CS70 - GetRefStruct().SbyteField <<= 5; - GetRefStruct().SbyteProp <<= 5; - GetRefSbyte() <<= 5; + public static void SbyteLeftShiftTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + p <<= 5; + b <<= 5; + Use(ref b); + sbyteField <<= 5; + SbyteProp <<= 5; + c.SbyteField <<= 5; + c.SbyteProp <<= 5; + s.SbyteField <<= 5; + s.SbyteProp <<= 5; + customClassField.SbyteField <<= 5; + customClassField.SbyteProp <<= 5; + otherCustomStructField.SbyteField <<= 5; + otherCustomStructField.SbyteProp <<= 5; + CustomClassProp.SbyteField <<= 5; + CustomClassProp.SbyteProp <<= 5; + GetClass().SbyteField <<= 5; + GetClass().SbyteProp <<= 5; +#if CS70 + GetRefStruct().SbyteField <<= 5; + GetRefStruct().SbyteProp <<= 5; + GetRefSbyte() <<= 5; #endif - } + } - public static void SbyteRightShiftTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - p >>= 5; - b >>= 5; - Use(ref b); - sbyteField >>= 5; - SbyteProp >>= 5; - c.SbyteField >>= 5; - c.SbyteProp >>= 5; - s.SbyteField >>= 5; - s.SbyteProp >>= 5; - customClassField.SbyteField >>= 5; - customClassField.SbyteProp >>= 5; - otherCustomStructField.SbyteField >>= 5; - otherCustomStructField.SbyteProp >>= 5; - CustomClassProp.SbyteField >>= 5; - CustomClassProp.SbyteProp >>= 5; - GetClass().SbyteField >>= 5; - GetClass().SbyteProp >>= 5; -#if CS70 - GetRefStruct().SbyteField >>= 5; - GetRefStruct().SbyteProp >>= 5; - GetRefSbyte() >>= 5; + public static void SbyteRightShiftTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + p >>= 5; + b >>= 5; + Use(ref b); + sbyteField >>= 5; + SbyteProp >>= 5; + c.SbyteField >>= 5; + c.SbyteProp >>= 5; + s.SbyteField >>= 5; + s.SbyteProp >>= 5; + customClassField.SbyteField >>= 5; + customClassField.SbyteProp >>= 5; + otherCustomStructField.SbyteField >>= 5; + otherCustomStructField.SbyteProp >>= 5; + CustomClassProp.SbyteField >>= 5; + CustomClassProp.SbyteProp >>= 5; + GetClass().SbyteField >>= 5; + GetClass().SbyteProp >>= 5; +#if CS70 + GetRefStruct().SbyteField >>= 5; + GetRefStruct().SbyteProp >>= 5; + GetRefSbyte() >>= 5; #endif - } + } - public static void SbyteBitAndTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - p &= 5; - b &= 5; - Use(ref b); - sbyteField &= 5; - SbyteProp &= 5; - c.SbyteField &= 5; - c.SbyteProp &= 5; - s.SbyteField &= 5; - s.SbyteProp &= 5; - customClassField.SbyteField &= 5; - customClassField.SbyteProp &= 5; - otherCustomStructField.SbyteField &= 5; - otherCustomStructField.SbyteProp &= 5; - CustomClassProp.SbyteField &= 5; - CustomClassProp.SbyteProp &= 5; - GetClass().SbyteField &= 5; - GetClass().SbyteProp &= 5; -#if CS70 - GetRefStruct().SbyteField &= 5; - GetRefStruct().SbyteProp &= 5; - GetRefSbyte() &= 5; + public static void SbyteBitAndTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + p &= 5; + b &= 5; + Use(ref b); + sbyteField &= 5; + SbyteProp &= 5; + c.SbyteField &= 5; + c.SbyteProp &= 5; + s.SbyteField &= 5; + s.SbyteProp &= 5; + customClassField.SbyteField &= 5; + customClassField.SbyteProp &= 5; + otherCustomStructField.SbyteField &= 5; + otherCustomStructField.SbyteProp &= 5; + CustomClassProp.SbyteField &= 5; + CustomClassProp.SbyteProp &= 5; + GetClass().SbyteField &= 5; + GetClass().SbyteProp &= 5; +#if CS70 + GetRefStruct().SbyteField &= 5; + GetRefStruct().SbyteProp &= 5; + GetRefSbyte() &= 5; #endif - } + } - public static void SbyteBitOrTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - p |= 5; - b |= 5; - Use(ref b); - sbyteField |= 5; - SbyteProp |= 5; - c.SbyteField |= 5; - c.SbyteProp |= 5; - s.SbyteField |= 5; - s.SbyteProp |= 5; - customClassField.SbyteField |= 5; - customClassField.SbyteProp |= 5; - otherCustomStructField.SbyteField |= 5; - otherCustomStructField.SbyteProp |= 5; - CustomClassProp.SbyteField |= 5; - CustomClassProp.SbyteProp |= 5; - GetClass().SbyteField |= 5; - GetClass().SbyteProp |= 5; -#if CS70 - GetRefStruct().SbyteField |= 5; - GetRefStruct().SbyteProp |= 5; - GetRefSbyte() |= 5; + public static void SbyteBitOrTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + p |= 5; + b |= 5; + Use(ref b); + sbyteField |= 5; + SbyteProp |= 5; + c.SbyteField |= 5; + c.SbyteProp |= 5; + s.SbyteField |= 5; + s.SbyteProp |= 5; + customClassField.SbyteField |= 5; + customClassField.SbyteProp |= 5; + otherCustomStructField.SbyteField |= 5; + otherCustomStructField.SbyteProp |= 5; + CustomClassProp.SbyteField |= 5; + CustomClassProp.SbyteProp |= 5; + GetClass().SbyteField |= 5; + GetClass().SbyteProp |= 5; +#if CS70 + GetRefStruct().SbyteField |= 5; + GetRefStruct().SbyteProp |= 5; + GetRefSbyte() |= 5; #endif - } + } - public static void SbyteBitXorTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - p ^= 5; - b ^= 5; - Use(ref b); - sbyteField ^= 5; - SbyteProp ^= 5; - c.SbyteField ^= 5; - c.SbyteProp ^= 5; - s.SbyteField ^= 5; - s.SbyteProp ^= 5; - customClassField.SbyteField ^= 5; - customClassField.SbyteProp ^= 5; - otherCustomStructField.SbyteField ^= 5; - otherCustomStructField.SbyteProp ^= 5; - CustomClassProp.SbyteField ^= 5; - CustomClassProp.SbyteProp ^= 5; - GetClass().SbyteField ^= 5; - GetClass().SbyteProp ^= 5; -#if CS70 - GetRefStruct().SbyteField ^= 5; - GetRefStruct().SbyteProp ^= 5; - GetRefSbyte() ^= 5; + public static void SbyteBitXorTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + p ^= 5; + b ^= 5; + Use(ref b); + sbyteField ^= 5; + SbyteProp ^= 5; + c.SbyteField ^= 5; + c.SbyteProp ^= 5; + s.SbyteField ^= 5; + s.SbyteProp ^= 5; + customClassField.SbyteField ^= 5; + customClassField.SbyteProp ^= 5; + otherCustomStructField.SbyteField ^= 5; + otherCustomStructField.SbyteProp ^= 5; + CustomClassProp.SbyteField ^= 5; + CustomClassProp.SbyteProp ^= 5; + GetClass().SbyteField ^= 5; + GetClass().SbyteProp ^= 5; +#if CS70 + GetRefStruct().SbyteField ^= 5; + GetRefStruct().SbyteProp ^= 5; + GetRefSbyte() ^= 5; #endif - } + } - public static void SbytePostIncTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - X(p++); - X(b++); - Use(ref b); - X(sbyteField++); - X(SbyteProp++); - X(c.SbyteField++); - X(c.SbyteProp++); - X(s.SbyteField++); - X(s.SbyteProp++); - X(customClassField.SbyteField++); - X(customClassField.SbyteProp++); - X(otherCustomStructField.SbyteField++); - X(otherCustomStructField.SbyteProp++); - X(CustomClassProp.SbyteField++); - X(CustomClassProp.SbyteProp++); - X(GetClass().SbyteField++); - X(GetClass().SbyteProp++); -#if CS70 - X(GetRefStruct().SbyteField++); - X(GetRefStruct().SbyteProp++); - X(GetRefSbyte()++); + public static void SbytePostIncTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + X(p++); + X(b++); + Use(ref b); + X(sbyteField++); + X(SbyteProp++); + X(c.SbyteField++); + X(c.SbyteProp++); + X(s.SbyteField++); + X(s.SbyteProp++); + X(customClassField.SbyteField++); + X(customClassField.SbyteProp++); + X(otherCustomStructField.SbyteField++); + X(otherCustomStructField.SbyteProp++); + X(CustomClassProp.SbyteField++); + X(CustomClassProp.SbyteProp++); + X(GetClass().SbyteField++); + X(GetClass().SbyteProp++); +#if CS70 + X(GetRefStruct().SbyteField++); + X(GetRefStruct().SbyteProp++); + X(GetRefSbyte()++); #endif - } + } - public static void SbytePreIncTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - X(++p); - X(++b); - Use(ref b); - X(++sbyteField); - X(++SbyteProp); - X(++c.SbyteField); - X(++c.SbyteProp); - X(++s.SbyteField); - X(++s.SbyteProp); - X(++customClassField.SbyteField); - X(++customClassField.SbyteProp); - X(++otherCustomStructField.SbyteField); - X(++otherCustomStructField.SbyteProp); - X(++CustomClassProp.SbyteField); - X(++CustomClassProp.SbyteProp); - X(++GetClass().SbyteField); - X(++GetClass().SbyteProp); -#if CS70 - X(++GetRefStruct().SbyteField); - X(++GetRefStruct().SbyteProp); - X(++GetRefSbyte()); + public static void SbytePreIncTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + X(++p); + X(++b); + Use(ref b); + X(++sbyteField); + X(++SbyteProp); + X(++c.SbyteField); + X(++c.SbyteProp); + X(++s.SbyteField); + X(++s.SbyteProp); + X(++customClassField.SbyteField); + X(++customClassField.SbyteProp); + X(++otherCustomStructField.SbyteField); + X(++otherCustomStructField.SbyteProp); + X(++CustomClassProp.SbyteField); + X(++CustomClassProp.SbyteProp); + X(++GetClass().SbyteField); + X(++GetClass().SbyteProp); +#if CS70 + X(++GetRefStruct().SbyteField); + X(++GetRefStruct().SbyteProp); + X(++GetRefSbyte()); #endif - } - public static void SbytePostDecTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - X(p--); - X(b--); - Use(ref b); - X(sbyteField--); - X(SbyteProp--); - X(c.SbyteField--); - X(c.SbyteProp--); - X(s.SbyteField--); - X(s.SbyteProp--); - X(customClassField.SbyteField--); - X(customClassField.SbyteProp--); - X(otherCustomStructField.SbyteField--); - X(otherCustomStructField.SbyteProp--); - X(CustomClassProp.SbyteField--); - X(CustomClassProp.SbyteProp--); - X(GetClass().SbyteField--); - X(GetClass().SbyteProp--); -#if CS70 - X(GetRefStruct().SbyteField--); - X(GetRefStruct().SbyteProp--); - X(GetRefSbyte()--); + } + public static void SbytePostDecTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + X(p--); + X(b--); + Use(ref b); + X(sbyteField--); + X(SbyteProp--); + X(c.SbyteField--); + X(c.SbyteProp--); + X(s.SbyteField--); + X(s.SbyteProp--); + X(customClassField.SbyteField--); + X(customClassField.SbyteProp--); + X(otherCustomStructField.SbyteField--); + X(otherCustomStructField.SbyteProp--); + X(CustomClassProp.SbyteField--); + X(CustomClassProp.SbyteProp--); + X(GetClass().SbyteField--); + X(GetClass().SbyteProp--); +#if CS70 + X(GetRefStruct().SbyteField--); + X(GetRefStruct().SbyteProp--); + X(GetRefSbyte()--); #endif - } + } - public static void SbytePreDecTest(sbyte p, CustomClass c, CustomStruct2 s) - { - sbyte b = 0; - X(--p); - X(--b); - Use(ref b); - X(--sbyteField); - X(--SbyteProp); - X(--c.SbyteField); - X(--c.SbyteProp); - X(--s.SbyteField); - X(--s.SbyteProp); - X(--customClassField.SbyteField); - X(--customClassField.SbyteProp); - X(--otherCustomStructField.SbyteField); - X(--otherCustomStructField.SbyteProp); - X(--CustomClassProp.SbyteField); - X(--CustomClassProp.SbyteProp); - X(--GetClass().SbyteField); - X(--GetClass().SbyteProp); -#if CS70 - X(--GetRefStruct().SbyteField); - X(--GetRefStruct().SbyteProp); - X(--GetRefSbyte()); + public static void SbytePreDecTest(sbyte p, CustomClass c, CustomStruct2 s) + { + sbyte b = 0; + X(--p); + X(--b); + Use(ref b); + X(--sbyteField); + X(--SbyteProp); + X(--c.SbyteField); + X(--c.SbyteProp); + X(--s.SbyteField); + X(--s.SbyteProp); + X(--customClassField.SbyteField); + X(--customClassField.SbyteProp); + X(--otherCustomStructField.SbyteField); + X(--otherCustomStructField.SbyteProp); + X(--CustomClassProp.SbyteField); + X(--CustomClassProp.SbyteProp); + X(--GetClass().SbyteField); + X(--GetClass().SbyteProp); +#if CS70 + X(--GetRefStruct().SbyteField); + X(--GetRefStruct().SbyteProp); + X(--GetRefSbyte()); #endif - } - public static void ShortAddTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - p += 5; - num += 5; - Use(ref num); - shortField += 5; - ShortProp += 5; - c.ShortField += 5; - c.ShortProp += 5; - s.ShortField += 5; - s.ShortProp += 5; - customClassField.ShortField += 5; - customClassField.ShortProp += 5; - otherCustomStructField.ShortField += 5; - otherCustomStructField.ShortProp += 5; - CustomClassProp.ShortField += 5; - CustomClassProp.ShortProp += 5; - GetClass().ShortField += 5; - GetClass().ShortProp += 5; -#if CS70 - GetRefStruct().ShortField += 5; - GetRefStruct().ShortProp += 5; - GetRefShort() += 5; + } + public static void ShortAddTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + p += 5; + num += 5; + Use(ref num); + shortField += 5; + ShortProp += 5; + c.ShortField += 5; + c.ShortProp += 5; + s.ShortField += 5; + s.ShortProp += 5; + customClassField.ShortField += 5; + customClassField.ShortProp += 5; + otherCustomStructField.ShortField += 5; + otherCustomStructField.ShortProp += 5; + CustomClassProp.ShortField += 5; + CustomClassProp.ShortProp += 5; + GetClass().ShortField += 5; + GetClass().ShortProp += 5; +#if CS70 + GetRefStruct().ShortField += 5; + GetRefStruct().ShortProp += 5; + GetRefShort() += 5; #endif - } + } - public static void ShortSubtractTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - p -= 5; - num -= 5; - Use(ref num); - shortField -= 5; - ShortProp -= 5; - c.ShortField -= 5; - c.ShortProp -= 5; - s.ShortField -= 5; - s.ShortProp -= 5; - customClassField.ShortField -= 5; - customClassField.ShortProp -= 5; - otherCustomStructField.ShortField -= 5; - otherCustomStructField.ShortProp -= 5; - CustomClassProp.ShortField -= 5; - CustomClassProp.ShortProp -= 5; - GetClass().ShortField -= 5; - GetClass().ShortProp -= 5; -#if CS70 - GetRefStruct().ShortField -= 5; - GetRefStruct().ShortProp -= 5; - GetRefShort() -= 5; + public static void ShortSubtractTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + p -= 5; + num -= 5; + Use(ref num); + shortField -= 5; + ShortProp -= 5; + c.ShortField -= 5; + c.ShortProp -= 5; + s.ShortField -= 5; + s.ShortProp -= 5; + customClassField.ShortField -= 5; + customClassField.ShortProp -= 5; + otherCustomStructField.ShortField -= 5; + otherCustomStructField.ShortProp -= 5; + CustomClassProp.ShortField -= 5; + CustomClassProp.ShortProp -= 5; + GetClass().ShortField -= 5; + GetClass().ShortProp -= 5; +#if CS70 + GetRefStruct().ShortField -= 5; + GetRefStruct().ShortProp -= 5; + GetRefShort() -= 5; #endif - } + } - public static void ShortMultiplyTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - p *= 5; - num *= 5; - Use(ref num); - shortField *= 5; - ShortProp *= 5; - c.ShortField *= 5; - c.ShortProp *= 5; - s.ShortField *= 5; - s.ShortProp *= 5; - customClassField.ShortField *= 5; - customClassField.ShortProp *= 5; - otherCustomStructField.ShortField *= 5; - otherCustomStructField.ShortProp *= 5; - CustomClassProp.ShortField *= 5; - CustomClassProp.ShortProp *= 5; - GetClass().ShortField *= 5; - GetClass().ShortProp *= 5; -#if CS70 - GetRefStruct().ShortField *= 5; - GetRefStruct().ShortProp *= 5; - GetRefShort() *= 5; + public static void ShortMultiplyTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + p *= 5; + num *= 5; + Use(ref num); + shortField *= 5; + ShortProp *= 5; + c.ShortField *= 5; + c.ShortProp *= 5; + s.ShortField *= 5; + s.ShortProp *= 5; + customClassField.ShortField *= 5; + customClassField.ShortProp *= 5; + otherCustomStructField.ShortField *= 5; + otherCustomStructField.ShortProp *= 5; + CustomClassProp.ShortField *= 5; + CustomClassProp.ShortProp *= 5; + GetClass().ShortField *= 5; + GetClass().ShortProp *= 5; +#if CS70 + GetRefStruct().ShortField *= 5; + GetRefStruct().ShortProp *= 5; + GetRefShort() *= 5; #endif - } + } - public static void ShortDivideTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - p /= 5; - num /= 5; - Use(ref num); - shortField /= 5; - ShortProp /= 5; - c.ShortField /= 5; - c.ShortProp /= 5; - s.ShortField /= 5; - s.ShortProp /= 5; - customClassField.ShortField /= 5; - customClassField.ShortProp /= 5; - otherCustomStructField.ShortField /= 5; - otherCustomStructField.ShortProp /= 5; - CustomClassProp.ShortField /= 5; - CustomClassProp.ShortProp /= 5; - GetClass().ShortField /= 5; - GetClass().ShortProp /= 5; -#if CS70 - GetRefStruct().ShortField /= 5; - GetRefStruct().ShortProp /= 5; - GetRefShort() /= 5; + public static void ShortDivideTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + p /= 5; + num /= 5; + Use(ref num); + shortField /= 5; + ShortProp /= 5; + c.ShortField /= 5; + c.ShortProp /= 5; + s.ShortField /= 5; + s.ShortProp /= 5; + customClassField.ShortField /= 5; + customClassField.ShortProp /= 5; + otherCustomStructField.ShortField /= 5; + otherCustomStructField.ShortProp /= 5; + CustomClassProp.ShortField /= 5; + CustomClassProp.ShortProp /= 5; + GetClass().ShortField /= 5; + GetClass().ShortProp /= 5; +#if CS70 + GetRefStruct().ShortField /= 5; + GetRefStruct().ShortProp /= 5; + GetRefShort() /= 5; #endif - } + } - public static void ShortModulusTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - p %= 5; - num %= 5; - Use(ref num); - shortField %= 5; - ShortProp %= 5; - c.ShortField %= 5; - c.ShortProp %= 5; - s.ShortField %= 5; - s.ShortProp %= 5; - customClassField.ShortField %= 5; - customClassField.ShortProp %= 5; - otherCustomStructField.ShortField %= 5; - otherCustomStructField.ShortProp %= 5; - CustomClassProp.ShortField %= 5; - CustomClassProp.ShortProp %= 5; - GetClass().ShortField %= 5; - GetClass().ShortProp %= 5; -#if CS70 - GetRefStruct().ShortField %= 5; - GetRefStruct().ShortProp %= 5; - GetRefShort() %= 5; + public static void ShortModulusTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + p %= 5; + num %= 5; + Use(ref num); + shortField %= 5; + ShortProp %= 5; + c.ShortField %= 5; + c.ShortProp %= 5; + s.ShortField %= 5; + s.ShortProp %= 5; + customClassField.ShortField %= 5; + customClassField.ShortProp %= 5; + otherCustomStructField.ShortField %= 5; + otherCustomStructField.ShortProp %= 5; + CustomClassProp.ShortField %= 5; + CustomClassProp.ShortProp %= 5; + GetClass().ShortField %= 5; + GetClass().ShortProp %= 5; +#if CS70 + GetRefStruct().ShortField %= 5; + GetRefStruct().ShortProp %= 5; + GetRefShort() %= 5; #endif - } + } - public static void ShortLeftShiftTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - p <<= 5; - num <<= 5; - Use(ref num); - shortField <<= 5; - ShortProp <<= 5; - c.ShortField <<= 5; - c.ShortProp <<= 5; - s.ShortField <<= 5; - s.ShortProp <<= 5; - customClassField.ShortField <<= 5; - customClassField.ShortProp <<= 5; - otherCustomStructField.ShortField <<= 5; - otherCustomStructField.ShortProp <<= 5; - CustomClassProp.ShortField <<= 5; - CustomClassProp.ShortProp <<= 5; - GetClass().ShortField <<= 5; - GetClass().ShortProp <<= 5; -#if CS70 - GetRefStruct().ShortField <<= 5; - GetRefStruct().ShortProp <<= 5; - GetRefShort() <<= 5; + public static void ShortLeftShiftTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + p <<= 5; + num <<= 5; + Use(ref num); + shortField <<= 5; + ShortProp <<= 5; + c.ShortField <<= 5; + c.ShortProp <<= 5; + s.ShortField <<= 5; + s.ShortProp <<= 5; + customClassField.ShortField <<= 5; + customClassField.ShortProp <<= 5; + otherCustomStructField.ShortField <<= 5; + otherCustomStructField.ShortProp <<= 5; + CustomClassProp.ShortField <<= 5; + CustomClassProp.ShortProp <<= 5; + GetClass().ShortField <<= 5; + GetClass().ShortProp <<= 5; +#if CS70 + GetRefStruct().ShortField <<= 5; + GetRefStruct().ShortProp <<= 5; + GetRefShort() <<= 5; #endif - } + } - public static void ShortRightShiftTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - p >>= 5; - num >>= 5; - Use(ref num); - shortField >>= 5; - ShortProp >>= 5; - c.ShortField >>= 5; - c.ShortProp >>= 5; - s.ShortField >>= 5; - s.ShortProp >>= 5; - customClassField.ShortField >>= 5; - customClassField.ShortProp >>= 5; - otherCustomStructField.ShortField >>= 5; - otherCustomStructField.ShortProp >>= 5; - CustomClassProp.ShortField >>= 5; - CustomClassProp.ShortProp >>= 5; - GetClass().ShortField >>= 5; - GetClass().ShortProp >>= 5; -#if CS70 - GetRefStruct().ShortField >>= 5; - GetRefStruct().ShortProp >>= 5; - GetRefShort() >>= 5; + public static void ShortRightShiftTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + p >>= 5; + num >>= 5; + Use(ref num); + shortField >>= 5; + ShortProp >>= 5; + c.ShortField >>= 5; + c.ShortProp >>= 5; + s.ShortField >>= 5; + s.ShortProp >>= 5; + customClassField.ShortField >>= 5; + customClassField.ShortProp >>= 5; + otherCustomStructField.ShortField >>= 5; + otherCustomStructField.ShortProp >>= 5; + CustomClassProp.ShortField >>= 5; + CustomClassProp.ShortProp >>= 5; + GetClass().ShortField >>= 5; + GetClass().ShortProp >>= 5; +#if CS70 + GetRefStruct().ShortField >>= 5; + GetRefStruct().ShortProp >>= 5; + GetRefShort() >>= 5; #endif - } + } #if CS110 - public static void ShortUnsignedRightShiftTest(short p, CustomClass c, CustomStruct2 s) - { - //X(p >>>= 5); - shortField >>>= 5; - ShortProp >>>= 5; - c.ShortField >>>= 5; - c.ShortProp >>>= 5; - s.ShortField >>>= 5; - s.ShortProp >>>= 5; - customClassField.ShortField >>>= 5; - customClassField.ShortProp >>>= 5; - otherCustomStructField.ShortField >>>= 5; - otherCustomStructField.ShortProp >>>= 5; - CustomClassProp.ShortField >>>= 5; - CustomClassProp.ShortProp >>>= 5; - GetClass().ShortField >>>= 5; - GetClass().ShortProp >>>= 5; - GetRefStruct().ShortField >>>= 5; - GetRefStruct().ShortProp >>>= 5; - GetRefShort() >>>= 5; - } + public static void ShortUnsignedRightShiftTest(short p, CustomClass c, CustomStruct2 s) + { + //X(p >>>= 5); + shortField >>>= 5; + ShortProp >>>= 5; + c.ShortField >>>= 5; + c.ShortProp >>>= 5; + s.ShortField >>>= 5; + s.ShortProp >>>= 5; + customClassField.ShortField >>>= 5; + customClassField.ShortProp >>>= 5; + otherCustomStructField.ShortField >>>= 5; + otherCustomStructField.ShortProp >>>= 5; + CustomClassProp.ShortField >>>= 5; + CustomClassProp.ShortProp >>>= 5; + GetClass().ShortField >>>= 5; + GetClass().ShortProp >>>= 5; + GetRefStruct().ShortField >>>= 5; + GetRefStruct().ShortProp >>>= 5; + GetRefShort() >>>= 5; + } #endif - public static void ShortBitAndTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - p &= 5; - num &= 5; - Use(ref num); - shortField &= 5; - ShortProp &= 5; - c.ShortField &= 5; - c.ShortProp &= 5; - s.ShortField &= 5; - s.ShortProp &= 5; - customClassField.ShortField &= 5; - customClassField.ShortProp &= 5; - otherCustomStructField.ShortField &= 5; - otherCustomStructField.ShortProp &= 5; - CustomClassProp.ShortField &= 5; - CustomClassProp.ShortProp &= 5; - GetClass().ShortField &= 5; - GetClass().ShortProp &= 5; -#if CS70 - GetRefStruct().ShortField &= 5; - GetRefStruct().ShortProp &= 5; - GetRefShort() &= 5; + public static void ShortBitAndTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + p &= 5; + num &= 5; + Use(ref num); + shortField &= 5; + ShortProp &= 5; + c.ShortField &= 5; + c.ShortProp &= 5; + s.ShortField &= 5; + s.ShortProp &= 5; + customClassField.ShortField &= 5; + customClassField.ShortProp &= 5; + otherCustomStructField.ShortField &= 5; + otherCustomStructField.ShortProp &= 5; + CustomClassProp.ShortField &= 5; + CustomClassProp.ShortProp &= 5; + GetClass().ShortField &= 5; + GetClass().ShortProp &= 5; +#if CS70 + GetRefStruct().ShortField &= 5; + GetRefStruct().ShortProp &= 5; + GetRefShort() &= 5; #endif - } + } - public static void ShortBitOrTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - p |= 5; - num |= 5; - Use(ref num); - shortField |= 5; - ShortProp |= 5; - c.ShortField |= 5; - c.ShortProp |= 5; - s.ShortField |= 5; - s.ShortProp |= 5; - customClassField.ShortField |= 5; - customClassField.ShortProp |= 5; - otherCustomStructField.ShortField |= 5; - otherCustomStructField.ShortProp |= 5; - CustomClassProp.ShortField |= 5; - CustomClassProp.ShortProp |= 5; - GetClass().ShortField |= 5; - GetClass().ShortProp |= 5; -#if CS70 - GetRefStruct().ShortField |= 5; - GetRefStruct().ShortProp |= 5; - GetRefShort() |= 5; + public static void ShortBitOrTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + p |= 5; + num |= 5; + Use(ref num); + shortField |= 5; + ShortProp |= 5; + c.ShortField |= 5; + c.ShortProp |= 5; + s.ShortField |= 5; + s.ShortProp |= 5; + customClassField.ShortField |= 5; + customClassField.ShortProp |= 5; + otherCustomStructField.ShortField |= 5; + otherCustomStructField.ShortProp |= 5; + CustomClassProp.ShortField |= 5; + CustomClassProp.ShortProp |= 5; + GetClass().ShortField |= 5; + GetClass().ShortProp |= 5; +#if CS70 + GetRefStruct().ShortField |= 5; + GetRefStruct().ShortProp |= 5; + GetRefShort() |= 5; #endif - } + } - public static void ShortBitXorTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - p ^= 5; - num ^= 5; - Use(ref num); - shortField ^= 5; - ShortProp ^= 5; - c.ShortField ^= 5; - c.ShortProp ^= 5; - s.ShortField ^= 5; - s.ShortProp ^= 5; - customClassField.ShortField ^= 5; - customClassField.ShortProp ^= 5; - otherCustomStructField.ShortField ^= 5; - otherCustomStructField.ShortProp ^= 5; - CustomClassProp.ShortField ^= 5; - CustomClassProp.ShortProp ^= 5; - GetClass().ShortField ^= 5; - GetClass().ShortProp ^= 5; -#if CS70 - GetRefStruct().ShortField ^= 5; - GetRefStruct().ShortProp ^= 5; - GetRefShort() ^= 5; + public static void ShortBitXorTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + p ^= 5; + num ^= 5; + Use(ref num); + shortField ^= 5; + ShortProp ^= 5; + c.ShortField ^= 5; + c.ShortProp ^= 5; + s.ShortField ^= 5; + s.ShortProp ^= 5; + customClassField.ShortField ^= 5; + customClassField.ShortProp ^= 5; + otherCustomStructField.ShortField ^= 5; + otherCustomStructField.ShortProp ^= 5; + CustomClassProp.ShortField ^= 5; + CustomClassProp.ShortProp ^= 5; + GetClass().ShortField ^= 5; + GetClass().ShortProp ^= 5; +#if CS70 + GetRefStruct().ShortField ^= 5; + GetRefStruct().ShortProp ^= 5; + GetRefShort() ^= 5; #endif - } + } - public static void ShortPostIncTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - X(p++); - X(num++); - Use(ref num); - X(shortField++); - X(ShortProp++); - X(c.ShortField++); - X(c.ShortProp++); - X(s.ShortField++); - X(s.ShortProp++); - X(customClassField.ShortField++); - X(customClassField.ShortProp++); - X(otherCustomStructField.ShortField++); - X(otherCustomStructField.ShortProp++); - X(CustomClassProp.ShortField++); - X(CustomClassProp.ShortProp++); - X(GetClass().ShortField++); - X(GetClass().ShortProp++); -#if CS70 - X(GetRefStruct().ShortField++); - X(GetRefStruct().ShortProp++); - X(GetRefShort()++); + public static void ShortPostIncTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + X(p++); + X(num++); + Use(ref num); + X(shortField++); + X(ShortProp++); + X(c.ShortField++); + X(c.ShortProp++); + X(s.ShortField++); + X(s.ShortProp++); + X(customClassField.ShortField++); + X(customClassField.ShortProp++); + X(otherCustomStructField.ShortField++); + X(otherCustomStructField.ShortProp++); + X(CustomClassProp.ShortField++); + X(CustomClassProp.ShortProp++); + X(GetClass().ShortField++); + X(GetClass().ShortProp++); +#if CS70 + X(GetRefStruct().ShortField++); + X(GetRefStruct().ShortProp++); + X(GetRefShort()++); #endif - } + } - public static void ShortPreIncTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - X(++p); - X(++num); - Use(ref num); - X(++shortField); - X(++ShortProp); - X(++c.ShortField); - X(++c.ShortProp); - X(++s.ShortField); - X(++s.ShortProp); - X(++customClassField.ShortField); - X(++customClassField.ShortProp); - X(++otherCustomStructField.ShortField); - X(++otherCustomStructField.ShortProp); - X(++CustomClassProp.ShortField); - X(++CustomClassProp.ShortProp); - X(++GetClass().ShortField); - X(++GetClass().ShortProp); -#if CS70 - X(++GetRefStruct().ShortField); - X(++GetRefStruct().ShortProp); - X(++GetRefShort()); + public static void ShortPreIncTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + X(++p); + X(++num); + Use(ref num); + X(++shortField); + X(++ShortProp); + X(++c.ShortField); + X(++c.ShortProp); + X(++s.ShortField); + X(++s.ShortProp); + X(++customClassField.ShortField); + X(++customClassField.ShortProp); + X(++otherCustomStructField.ShortField); + X(++otherCustomStructField.ShortProp); + X(++CustomClassProp.ShortField); + X(++CustomClassProp.ShortProp); + X(++GetClass().ShortField); + X(++GetClass().ShortProp); +#if CS70 + X(++GetRefStruct().ShortField); + X(++GetRefStruct().ShortProp); + X(++GetRefShort()); #endif - } - public static void ShortPostDecTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - X(p--); - X(num--); - Use(ref num); - X(shortField--); - X(ShortProp--); - X(c.ShortField--); - X(c.ShortProp--); - X(s.ShortField--); - X(s.ShortProp--); - X(customClassField.ShortField--); - X(customClassField.ShortProp--); - X(otherCustomStructField.ShortField--); - X(otherCustomStructField.ShortProp--); - X(CustomClassProp.ShortField--); - X(CustomClassProp.ShortProp--); - X(GetClass().ShortField--); - X(GetClass().ShortProp--); -#if CS70 - X(GetRefStruct().ShortField--); - X(GetRefStruct().ShortProp--); - X(GetRefShort()--); + } + public static void ShortPostDecTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + X(p--); + X(num--); + Use(ref num); + X(shortField--); + X(ShortProp--); + X(c.ShortField--); + X(c.ShortProp--); + X(s.ShortField--); + X(s.ShortProp--); + X(customClassField.ShortField--); + X(customClassField.ShortProp--); + X(otherCustomStructField.ShortField--); + X(otherCustomStructField.ShortProp--); + X(CustomClassProp.ShortField--); + X(CustomClassProp.ShortProp--); + X(GetClass().ShortField--); + X(GetClass().ShortProp--); +#if CS70 + X(GetRefStruct().ShortField--); + X(GetRefStruct().ShortProp--); + X(GetRefShort()--); #endif - } + } - public static void ShortPreDecTest(short p, CustomClass c, CustomStruct2 s) - { - short num = 0; - X(--p); - X(--num); - Use(ref num); - X(--shortField); - X(--ShortProp); - X(--c.ShortField); - X(--c.ShortProp); - X(--s.ShortField); - X(--s.ShortProp); - X(--customClassField.ShortField); - X(--customClassField.ShortProp); - X(--otherCustomStructField.ShortField); - X(--otherCustomStructField.ShortProp); - X(--CustomClassProp.ShortField); - X(--CustomClassProp.ShortProp); - X(--GetClass().ShortField); - X(--GetClass().ShortProp); -#if CS70 - X(--GetRefStruct().ShortField); - X(--GetRefStruct().ShortProp); - X(--GetRefShort()); + public static void ShortPreDecTest(short p, CustomClass c, CustomStruct2 s) + { + short num = 0; + X(--p); + X(--num); + Use(ref num); + X(--shortField); + X(--ShortProp); + X(--c.ShortField); + X(--c.ShortProp); + X(--s.ShortField); + X(--s.ShortProp); + X(--customClassField.ShortField); + X(--customClassField.ShortProp); + X(--otherCustomStructField.ShortField); + X(--otherCustomStructField.ShortProp); + X(--CustomClassProp.ShortField); + X(--CustomClassProp.ShortProp); + X(--GetClass().ShortField); + X(--GetClass().ShortProp); +#if CS70 + X(--GetRefStruct().ShortField); + X(--GetRefStruct().ShortProp); + X(--GetRefShort()); #endif - } - public static void UshortAddTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - p += 5; - num += 5; - Use(ref num); - ushortField += 5; - UshortProp += 5; - c.UshortField += 5; - c.UshortProp += 5; - s.UshortField += 5; - s.UshortProp += 5; - customClassField.UshortField += 5; - customClassField.UshortProp += 5; - otherCustomStructField.UshortField += 5; - otherCustomStructField.UshortProp += 5; - CustomClassProp.UshortField += 5; - CustomClassProp.UshortProp += 5; - GetClass().UshortField += 5; - GetClass().UshortProp += 5; -#if CS70 - GetRefStruct().UshortField += 5; - GetRefStruct().UshortProp += 5; - GetRefUshort() += 5; + } + public static void UshortAddTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + p += 5; + num += 5; + Use(ref num); + ushortField += 5; + UshortProp += 5; + c.UshortField += 5; + c.UshortProp += 5; + s.UshortField += 5; + s.UshortProp += 5; + customClassField.UshortField += 5; + customClassField.UshortProp += 5; + otherCustomStructField.UshortField += 5; + otherCustomStructField.UshortProp += 5; + CustomClassProp.UshortField += 5; + CustomClassProp.UshortProp += 5; + GetClass().UshortField += 5; + GetClass().UshortProp += 5; +#if CS70 + GetRefStruct().UshortField += 5; + GetRefStruct().UshortProp += 5; + GetRefUshort() += 5; #endif - } + } - public static void UshortSubtractTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - p -= 5; - num -= 5; - Use(ref num); - ushortField -= 5; - UshortProp -= 5; - c.UshortField -= 5; - c.UshortProp -= 5; - s.UshortField -= 5; - s.UshortProp -= 5; - customClassField.UshortField -= 5; - customClassField.UshortProp -= 5; - otherCustomStructField.UshortField -= 5; - otherCustomStructField.UshortProp -= 5; - CustomClassProp.UshortField -= 5; - CustomClassProp.UshortProp -= 5; - GetClass().UshortField -= 5; - GetClass().UshortProp -= 5; -#if CS70 - GetRefStruct().UshortField -= 5; - GetRefStruct().UshortProp -= 5; - GetRefUshort() -= 5; + public static void UshortSubtractTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + p -= 5; + num -= 5; + Use(ref num); + ushortField -= 5; + UshortProp -= 5; + c.UshortField -= 5; + c.UshortProp -= 5; + s.UshortField -= 5; + s.UshortProp -= 5; + customClassField.UshortField -= 5; + customClassField.UshortProp -= 5; + otherCustomStructField.UshortField -= 5; + otherCustomStructField.UshortProp -= 5; + CustomClassProp.UshortField -= 5; + CustomClassProp.UshortProp -= 5; + GetClass().UshortField -= 5; + GetClass().UshortProp -= 5; +#if CS70 + GetRefStruct().UshortField -= 5; + GetRefStruct().UshortProp -= 5; + GetRefUshort() -= 5; #endif - } + } - public static void UshortMultiplyTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - p *= 5; - num *= 5; - Use(ref num); - ushortField *= 5; - UshortProp *= 5; - c.UshortField *= 5; - c.UshortProp *= 5; - s.UshortField *= 5; - s.UshortProp *= 5; - customClassField.UshortField *= 5; - customClassField.UshortProp *= 5; - otherCustomStructField.UshortField *= 5; - otherCustomStructField.UshortProp *= 5; - CustomClassProp.UshortField *= 5; - CustomClassProp.UshortProp *= 5; - GetClass().UshortField *= 5; - GetClass().UshortProp *= 5; -#if CS70 - GetRefStruct().UshortField *= 5; - GetRefStruct().UshortProp *= 5; - GetRefUshort() *= 5; + public static void UshortMultiplyTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + p *= 5; + num *= 5; + Use(ref num); + ushortField *= 5; + UshortProp *= 5; + c.UshortField *= 5; + c.UshortProp *= 5; + s.UshortField *= 5; + s.UshortProp *= 5; + customClassField.UshortField *= 5; + customClassField.UshortProp *= 5; + otherCustomStructField.UshortField *= 5; + otherCustomStructField.UshortProp *= 5; + CustomClassProp.UshortField *= 5; + CustomClassProp.UshortProp *= 5; + GetClass().UshortField *= 5; + GetClass().UshortProp *= 5; +#if CS70 + GetRefStruct().UshortField *= 5; + GetRefStruct().UshortProp *= 5; + GetRefUshort() *= 5; #endif - } + } - public static void UshortDivideTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - p /= 5; - num /= 5; - Use(ref num); - ushortField /= 5; - UshortProp /= 5; - c.UshortField /= 5; - c.UshortProp /= 5; - s.UshortField /= 5; - s.UshortProp /= 5; - customClassField.UshortField /= 5; - customClassField.UshortProp /= 5; - otherCustomStructField.UshortField /= 5; - otherCustomStructField.UshortProp /= 5; - CustomClassProp.UshortField /= 5; - CustomClassProp.UshortProp /= 5; - GetClass().UshortField /= 5; - GetClass().UshortProp /= 5; -#if CS70 - GetRefStruct().UshortField /= 5; - GetRefStruct().UshortProp /= 5; - GetRefUshort() /= 5; + public static void UshortDivideTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + p /= 5; + num /= 5; + Use(ref num); + ushortField /= 5; + UshortProp /= 5; + c.UshortField /= 5; + c.UshortProp /= 5; + s.UshortField /= 5; + s.UshortProp /= 5; + customClassField.UshortField /= 5; + customClassField.UshortProp /= 5; + otherCustomStructField.UshortField /= 5; + otherCustomStructField.UshortProp /= 5; + CustomClassProp.UshortField /= 5; + CustomClassProp.UshortProp /= 5; + GetClass().UshortField /= 5; + GetClass().UshortProp /= 5; +#if CS70 + GetRefStruct().UshortField /= 5; + GetRefStruct().UshortProp /= 5; + GetRefUshort() /= 5; #endif - } + } - public static void UshortModulusTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - p %= 5; - num %= 5; - Use(ref num); - ushortField %= 5; - UshortProp %= 5; - c.UshortField %= 5; - c.UshortProp %= 5; - s.UshortField %= 5; - s.UshortProp %= 5; - customClassField.UshortField %= 5; - customClassField.UshortProp %= 5; - otherCustomStructField.UshortField %= 5; - otherCustomStructField.UshortProp %= 5; - CustomClassProp.UshortField %= 5; - CustomClassProp.UshortProp %= 5; - GetClass().UshortField %= 5; - GetClass().UshortProp %= 5; -#if CS70 - GetRefStruct().UshortField %= 5; - GetRefStruct().UshortProp %= 5; - GetRefUshort() %= 5; + public static void UshortModulusTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + p %= 5; + num %= 5; + Use(ref num); + ushortField %= 5; + UshortProp %= 5; + c.UshortField %= 5; + c.UshortProp %= 5; + s.UshortField %= 5; + s.UshortProp %= 5; + customClassField.UshortField %= 5; + customClassField.UshortProp %= 5; + otherCustomStructField.UshortField %= 5; + otherCustomStructField.UshortProp %= 5; + CustomClassProp.UshortField %= 5; + CustomClassProp.UshortProp %= 5; + GetClass().UshortField %= 5; + GetClass().UshortProp %= 5; +#if CS70 + GetRefStruct().UshortField %= 5; + GetRefStruct().UshortProp %= 5; + GetRefUshort() %= 5; #endif - } + } - public static void UshortLeftShiftTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - p <<= 5; - num <<= 5; - Use(ref num); - ushortField <<= 5; - UshortProp <<= 5; - c.UshortField <<= 5; - c.UshortProp <<= 5; - s.UshortField <<= 5; - s.UshortProp <<= 5; - customClassField.UshortField <<= 5; - customClassField.UshortProp <<= 5; - otherCustomStructField.UshortField <<= 5; - otherCustomStructField.UshortProp <<= 5; - CustomClassProp.UshortField <<= 5; - CustomClassProp.UshortProp <<= 5; - GetClass().UshortField <<= 5; - GetClass().UshortProp <<= 5; -#if CS70 - GetRefStruct().UshortField <<= 5; - GetRefStruct().UshortProp <<= 5; - GetRefUshort() <<= 5; + public static void UshortLeftShiftTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + p <<= 5; + num <<= 5; + Use(ref num); + ushortField <<= 5; + UshortProp <<= 5; + c.UshortField <<= 5; + c.UshortProp <<= 5; + s.UshortField <<= 5; + s.UshortProp <<= 5; + customClassField.UshortField <<= 5; + customClassField.UshortProp <<= 5; + otherCustomStructField.UshortField <<= 5; + otherCustomStructField.UshortProp <<= 5; + CustomClassProp.UshortField <<= 5; + CustomClassProp.UshortProp <<= 5; + GetClass().UshortField <<= 5; + GetClass().UshortProp <<= 5; +#if CS70 + GetRefStruct().UshortField <<= 5; + GetRefStruct().UshortProp <<= 5; + GetRefUshort() <<= 5; #endif - } + } - public static void UshortRightShiftTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - p >>= 5; - num >>= 5; - Use(ref num); - ushortField >>= 5; - UshortProp >>= 5; - c.UshortField >>= 5; - c.UshortProp >>= 5; - s.UshortField >>= 5; - s.UshortProp >>= 5; - customClassField.UshortField >>= 5; - customClassField.UshortProp >>= 5; - otherCustomStructField.UshortField >>= 5; - otherCustomStructField.UshortProp >>= 5; - CustomClassProp.UshortField >>= 5; - CustomClassProp.UshortProp >>= 5; - GetClass().UshortField >>= 5; - GetClass().UshortProp >>= 5; -#if CS70 - GetRefStruct().UshortField >>= 5; - GetRefStruct().UshortProp >>= 5; - GetRefUshort() >>= 5; + public static void UshortRightShiftTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + p >>= 5; + num >>= 5; + Use(ref num); + ushortField >>= 5; + UshortProp >>= 5; + c.UshortField >>= 5; + c.UshortProp >>= 5; + s.UshortField >>= 5; + s.UshortProp >>= 5; + customClassField.UshortField >>= 5; + customClassField.UshortProp >>= 5; + otherCustomStructField.UshortField >>= 5; + otherCustomStructField.UshortProp >>= 5; + CustomClassProp.UshortField >>= 5; + CustomClassProp.UshortProp >>= 5; + GetClass().UshortField >>= 5; + GetClass().UshortProp >>= 5; +#if CS70 + GetRefStruct().UshortField >>= 5; + GetRefStruct().UshortProp >>= 5; + GetRefUshort() >>= 5; #endif - } + } #if CS110 - public static void UshortUnsignedRightShiftTest(ushort p, CustomClass c, CustomStruct2 s) - { - //ushort l = 0; - //p >>>= 5; - //l >>>= 5; - ushortField >>>= 5; - UshortProp >>>= 5; - c.UshortField >>>= 5; - c.UshortProp >>>= 5; - s.UshortField >>>= 5; - s.UshortProp >>>= 5; - customClassField.UshortField >>>= 5; - customClassField.UshortProp >>>= 5; - otherCustomStructField.UshortField >>>= 5; - otherCustomStructField.UshortProp >>>= 5; - CustomClassProp.UshortField >>>= 5; - CustomClassProp.UshortProp >>>= 5; - GetClass().UshortField >>>= 5; - GetClass().UshortProp >>>= 5; - GetRefStruct().UshortField >>>= 5; - GetRefStruct().UshortProp >>>= 5; - GetRefUshort() >>>= 5; - } + public static void UshortUnsignedRightShiftTest(ushort p, CustomClass c, CustomStruct2 s) + { + //ushort l = 0; + //p >>>= 5; + //l >>>= 5; + ushortField >>>= 5; + UshortProp >>>= 5; + c.UshortField >>>= 5; + c.UshortProp >>>= 5; + s.UshortField >>>= 5; + s.UshortProp >>>= 5; + customClassField.UshortField >>>= 5; + customClassField.UshortProp >>>= 5; + otherCustomStructField.UshortField >>>= 5; + otherCustomStructField.UshortProp >>>= 5; + CustomClassProp.UshortField >>>= 5; + CustomClassProp.UshortProp >>>= 5; + GetClass().UshortField >>>= 5; + GetClass().UshortProp >>>= 5; + GetRefStruct().UshortField >>>= 5; + GetRefStruct().UshortProp >>>= 5; + GetRefUshort() >>>= 5; + } #endif - public static void UshortBitAndTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - p &= c.UshortField; - num &= c.UshortField; - Use(ref num); - ushortField &= 5; - UshortProp &= 5; - c.UshortField &= 5; - c.UshortProp &= 5; - s.UshortField &= 5; - s.UshortProp &= 5; - customClassField.UshortField &= 5; - customClassField.UshortProp &= 5; - otherCustomStructField.UshortField &= 5; - otherCustomStructField.UshortProp &= 5; - CustomClassProp.UshortField &= 5; - CustomClassProp.UshortProp &= 5; - GetClass().UshortField &= 5; - GetClass().UshortProp &= 5; -#if CS70 - GetRefStruct().UshortField &= 5; - GetRefStruct().UshortProp &= 5; - GetRefUshort() &= 5; + public static void UshortBitAndTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + p &= c.UshortField; + num &= c.UshortField; + Use(ref num); + ushortField &= 5; + UshortProp &= 5; + c.UshortField &= 5; + c.UshortProp &= 5; + s.UshortField &= 5; + s.UshortProp &= 5; + customClassField.UshortField &= 5; + customClassField.UshortProp &= 5; + otherCustomStructField.UshortField &= 5; + otherCustomStructField.UshortProp &= 5; + CustomClassProp.UshortField &= 5; + CustomClassProp.UshortProp &= 5; + GetClass().UshortField &= 5; + GetClass().UshortProp &= 5; +#if CS70 + GetRefStruct().UshortField &= 5; + GetRefStruct().UshortProp &= 5; + GetRefUshort() &= 5; #endif - } + } - public static void UshortBitOrTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - p |= c.UshortField; - num |= c.UshortField; - Use(ref num); - ushortField |= 5; - UshortProp |= 5; - c.UshortField |= 5; - c.UshortProp |= 5; - s.UshortField |= 5; - s.UshortProp |= 5; - customClassField.UshortField |= 5; - customClassField.UshortProp |= 5; - otherCustomStructField.UshortField |= 5; - otherCustomStructField.UshortProp |= 5; - CustomClassProp.UshortField |= 5; - CustomClassProp.UshortProp |= 5; - GetClass().UshortField |= 5; - GetClass().UshortProp |= 5; -#if CS70 - GetRefStruct().UshortField |= 5; - GetRefStruct().UshortProp |= 5; - GetRefUshort() |= 5; + public static void UshortBitOrTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + p |= c.UshortField; + num |= c.UshortField; + Use(ref num); + ushortField |= 5; + UshortProp |= 5; + c.UshortField |= 5; + c.UshortProp |= 5; + s.UshortField |= 5; + s.UshortProp |= 5; + customClassField.UshortField |= 5; + customClassField.UshortProp |= 5; + otherCustomStructField.UshortField |= 5; + otherCustomStructField.UshortProp |= 5; + CustomClassProp.UshortField |= 5; + CustomClassProp.UshortProp |= 5; + GetClass().UshortField |= 5; + GetClass().UshortProp |= 5; +#if CS70 + GetRefStruct().UshortField |= 5; + GetRefStruct().UshortProp |= 5; + GetRefUshort() |= 5; #endif - } + } - public static void UshortBitXorTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - p ^= c.UshortField; - num ^= c.UshortField; - Use(ref num); - ushortField ^= 5; - UshortProp ^= 5; - c.UshortField ^= 5; - c.UshortProp ^= 5; - s.UshortField ^= 5; - s.UshortProp ^= 5; - customClassField.UshortField ^= 5; - customClassField.UshortProp ^= 5; - otherCustomStructField.UshortField ^= 5; - otherCustomStructField.UshortProp ^= 5; - CustomClassProp.UshortField ^= 5; - CustomClassProp.UshortProp ^= 5; - GetClass().UshortField ^= 5; - GetClass().UshortProp ^= 5; -#if CS70 - GetRefStruct().UshortField ^= 5; - GetRefStruct().UshortProp ^= 5; - GetRefUshort() ^= 5; + public static void UshortBitXorTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + p ^= c.UshortField; + num ^= c.UshortField; + Use(ref num); + ushortField ^= 5; + UshortProp ^= 5; + c.UshortField ^= 5; + c.UshortProp ^= 5; + s.UshortField ^= 5; + s.UshortProp ^= 5; + customClassField.UshortField ^= 5; + customClassField.UshortProp ^= 5; + otherCustomStructField.UshortField ^= 5; + otherCustomStructField.UshortProp ^= 5; + CustomClassProp.UshortField ^= 5; + CustomClassProp.UshortProp ^= 5; + GetClass().UshortField ^= 5; + GetClass().UshortProp ^= 5; +#if CS70 + GetRefStruct().UshortField ^= 5; + GetRefStruct().UshortProp ^= 5; + GetRefUshort() ^= 5; #endif - } + } - public static void UshortPostIncTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - X(p++); - X(num++); - Use(ref num); - X(ushortField++); - X(UshortProp++); - X(c.UshortField++); - X(c.UshortProp++); - X(s.UshortField++); - X(s.UshortProp++); - X(customClassField.UshortField++); - X(customClassField.UshortProp++); - X(otherCustomStructField.UshortField++); - X(otherCustomStructField.UshortProp++); - X(CustomClassProp.UshortField++); - X(CustomClassProp.UshortProp++); - X(GetClass().UshortField++); - X(GetClass().UshortProp++); -#if CS70 - X(GetRefStruct().UshortField++); - X(GetRefStruct().UshortProp++); - X(GetRefUshort()++); + public static void UshortPostIncTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + X(p++); + X(num++); + Use(ref num); + X(ushortField++); + X(UshortProp++); + X(c.UshortField++); + X(c.UshortProp++); + X(s.UshortField++); + X(s.UshortProp++); + X(customClassField.UshortField++); + X(customClassField.UshortProp++); + X(otherCustomStructField.UshortField++); + X(otherCustomStructField.UshortProp++); + X(CustomClassProp.UshortField++); + X(CustomClassProp.UshortProp++); + X(GetClass().UshortField++); + X(GetClass().UshortProp++); +#if CS70 + X(GetRefStruct().UshortField++); + X(GetRefStruct().UshortProp++); + X(GetRefUshort()++); #endif - } + } - public static void UshortPreIncTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - X(++p); - X(++num); - Use(ref num); - X(++ushortField); - X(++UshortProp); - X(++c.UshortField); - X(++c.UshortProp); - X(++s.UshortField); - X(++s.UshortProp); - X(++customClassField.UshortField); - X(++customClassField.UshortProp); - X(++otherCustomStructField.UshortField); - X(++otherCustomStructField.UshortProp); - X(++CustomClassProp.UshortField); - X(++CustomClassProp.UshortProp); - X(++GetClass().UshortField); - X(++GetClass().UshortProp); -#if CS70 - X(++GetRefStruct().UshortField); - X(++GetRefStruct().UshortProp); - X(++GetRefUshort()); + public static void UshortPreIncTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + X(++p); + X(++num); + Use(ref num); + X(++ushortField); + X(++UshortProp); + X(++c.UshortField); + X(++c.UshortProp); + X(++s.UshortField); + X(++s.UshortProp); + X(++customClassField.UshortField); + X(++customClassField.UshortProp); + X(++otherCustomStructField.UshortField); + X(++otherCustomStructField.UshortProp); + X(++CustomClassProp.UshortField); + X(++CustomClassProp.UshortProp); + X(++GetClass().UshortField); + X(++GetClass().UshortProp); +#if CS70 + X(++GetRefStruct().UshortField); + X(++GetRefStruct().UshortProp); + X(++GetRefUshort()); #endif - } - public static void UshortPostDecTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - X(p--); - X(num--); - Use(ref num); - X(ushortField--); - X(UshortProp--); - X(c.UshortField--); - X(c.UshortProp--); - X(s.UshortField--); - X(s.UshortProp--); - X(customClassField.UshortField--); - X(customClassField.UshortProp--); - X(otherCustomStructField.UshortField--); - X(otherCustomStructField.UshortProp--); - X(CustomClassProp.UshortField--); - X(CustomClassProp.UshortProp--); - X(GetClass().UshortField--); - X(GetClass().UshortProp--); -#if CS70 - X(GetRefStruct().UshortField--); - X(GetRefStruct().UshortProp--); - X(GetRefUshort()--); + } + public static void UshortPostDecTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + X(p--); + X(num--); + Use(ref num); + X(ushortField--); + X(UshortProp--); + X(c.UshortField--); + X(c.UshortProp--); + X(s.UshortField--); + X(s.UshortProp--); + X(customClassField.UshortField--); + X(customClassField.UshortProp--); + X(otherCustomStructField.UshortField--); + X(otherCustomStructField.UshortProp--); + X(CustomClassProp.UshortField--); + X(CustomClassProp.UshortProp--); + X(GetClass().UshortField--); + X(GetClass().UshortProp--); +#if CS70 + X(GetRefStruct().UshortField--); + X(GetRefStruct().UshortProp--); + X(GetRefUshort()--); #endif - } + } - public static void UshortPreDecTest(ushort p, CustomClass c, CustomStruct2 s) - { - ushort num = 0; - X(--p); - X(--num); - Use(ref num); - X(--ushortField); - X(--UshortProp); - X(--c.UshortField); - X(--c.UshortProp); - X(--s.UshortField); - X(--s.UshortProp); - X(--customClassField.UshortField); - X(--customClassField.UshortProp); - X(--otherCustomStructField.UshortField); - X(--otherCustomStructField.UshortProp); - X(--CustomClassProp.UshortField); - X(--CustomClassProp.UshortProp); - X(--GetClass().UshortField); - X(--GetClass().UshortProp); -#if CS70 - X(--GetRefStruct().UshortField); - X(--GetRefStruct().UshortProp); - X(--GetRefUshort()); + public static void UshortPreDecTest(ushort p, CustomClass c, CustomStruct2 s) + { + ushort num = 0; + X(--p); + X(--num); + Use(ref num); + X(--ushortField); + X(--UshortProp); + X(--c.UshortField); + X(--c.UshortProp); + X(--s.UshortField); + X(--s.UshortProp); + X(--customClassField.UshortField); + X(--customClassField.UshortProp); + X(--otherCustomStructField.UshortField); + X(--otherCustomStructField.UshortProp); + X(--CustomClassProp.UshortField); + X(--CustomClassProp.UshortProp); + X(--GetClass().UshortField); + X(--GetClass().UshortProp); +#if CS70 + X(--GetRefStruct().UshortField); + X(--GetRefStruct().UshortProp); + X(--GetRefUshort()); #endif - } - public static void IntAddTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - p += 5; - num += 5; - Use(ref num); - intField += 5; - IntProp += 5; - c.IntField += 5; - c.IntProp += 5; - s.IntField += 5; - s.IntProp += 5; - customClassField.IntField += 5; - customClassField.IntProp += 5; - otherCustomStructField.IntField += 5; - otherCustomStructField.IntProp += 5; - CustomClassProp.IntField += 5; - CustomClassProp.IntProp += 5; - GetClass().IntField += 5; - GetClass().IntProp += 5; -#if CS70 - GetRefStruct().IntField += 5; - GetRefStruct().IntProp += 5; - GetRefInt() += 5; + } + public static void IntAddTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + p += 5; + num += 5; + Use(ref num); + intField += 5; + IntProp += 5; + c.IntField += 5; + c.IntProp += 5; + s.IntField += 5; + s.IntProp += 5; + customClassField.IntField += 5; + customClassField.IntProp += 5; + otherCustomStructField.IntField += 5; + otherCustomStructField.IntProp += 5; + CustomClassProp.IntField += 5; + CustomClassProp.IntProp += 5; + GetClass().IntField += 5; + GetClass().IntProp += 5; +#if CS70 + GetRefStruct().IntField += 5; + GetRefStruct().IntProp += 5; + GetRefInt() += 5; #endif - } + } - public static void IntSubtractTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - p -= 5; - num -= 5; - Use(ref num); - intField -= 5; - IntProp -= 5; - c.IntField -= 5; - c.IntProp -= 5; - s.IntField -= 5; - s.IntProp -= 5; - customClassField.IntField -= 5; - customClassField.IntProp -= 5; - otherCustomStructField.IntField -= 5; - otherCustomStructField.IntProp -= 5; - CustomClassProp.IntField -= 5; - CustomClassProp.IntProp -= 5; - GetClass().IntField -= 5; - GetClass().IntProp -= 5; -#if CS70 - GetRefStruct().IntField -= 5; - GetRefStruct().IntProp -= 5; - GetRefInt() -= 5; + public static void IntSubtractTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + p -= 5; + num -= 5; + Use(ref num); + intField -= 5; + IntProp -= 5; + c.IntField -= 5; + c.IntProp -= 5; + s.IntField -= 5; + s.IntProp -= 5; + customClassField.IntField -= 5; + customClassField.IntProp -= 5; + otherCustomStructField.IntField -= 5; + otherCustomStructField.IntProp -= 5; + CustomClassProp.IntField -= 5; + CustomClassProp.IntProp -= 5; + GetClass().IntField -= 5; + GetClass().IntProp -= 5; +#if CS70 + GetRefStruct().IntField -= 5; + GetRefStruct().IntProp -= 5; + GetRefInt() -= 5; #endif - } + } - public static void IntMultiplyTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - p *= 5; - num *= 5; - Use(ref num); - intField *= 5; - IntProp *= 5; - c.IntField *= 5; - c.IntProp *= 5; - s.IntField *= 5; - s.IntProp *= 5; - customClassField.IntField *= 5; - customClassField.IntProp *= 5; - otherCustomStructField.IntField *= 5; - otherCustomStructField.IntProp *= 5; - CustomClassProp.IntField *= 5; - CustomClassProp.IntProp *= 5; - GetClass().IntField *= 5; - GetClass().IntProp *= 5; -#if CS70 - GetRefStruct().IntField *= 5; - GetRefStruct().IntProp *= 5; - GetRefInt() *= 5; + public static void IntMultiplyTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + p *= 5; + num *= 5; + Use(ref num); + intField *= 5; + IntProp *= 5; + c.IntField *= 5; + c.IntProp *= 5; + s.IntField *= 5; + s.IntProp *= 5; + customClassField.IntField *= 5; + customClassField.IntProp *= 5; + otherCustomStructField.IntField *= 5; + otherCustomStructField.IntProp *= 5; + CustomClassProp.IntField *= 5; + CustomClassProp.IntProp *= 5; + GetClass().IntField *= 5; + GetClass().IntProp *= 5; +#if CS70 + GetRefStruct().IntField *= 5; + GetRefStruct().IntProp *= 5; + GetRefInt() *= 5; #endif - } + } - public static void IntDivideTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - p /= 5; - num /= 5; - Use(ref num); - intField /= 5; - IntProp /= 5; - c.IntField /= 5; - c.IntProp /= 5; - s.IntField /= 5; - s.IntProp /= 5; - customClassField.IntField /= 5; - customClassField.IntProp /= 5; - otherCustomStructField.IntField /= 5; - otherCustomStructField.IntProp /= 5; - CustomClassProp.IntField /= 5; - CustomClassProp.IntProp /= 5; - GetClass().IntField /= 5; - GetClass().IntProp /= 5; -#if CS70 - GetRefStruct().IntField /= 5; - GetRefStruct().IntProp /= 5; - GetRefInt() /= 5; + public static void IntDivideTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + p /= 5; + num /= 5; + Use(ref num); + intField /= 5; + IntProp /= 5; + c.IntField /= 5; + c.IntProp /= 5; + s.IntField /= 5; + s.IntProp /= 5; + customClassField.IntField /= 5; + customClassField.IntProp /= 5; + otherCustomStructField.IntField /= 5; + otherCustomStructField.IntProp /= 5; + CustomClassProp.IntField /= 5; + CustomClassProp.IntProp /= 5; + GetClass().IntField /= 5; + GetClass().IntProp /= 5; +#if CS70 + GetRefStruct().IntField /= 5; + GetRefStruct().IntProp /= 5; + GetRefInt() /= 5; #endif - } + } - public static void IntModulusTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - p %= 5; - num %= 5; - Use(ref num); - intField %= 5; - IntProp %= 5; - c.IntField %= 5; - c.IntProp %= 5; - s.IntField %= 5; - s.IntProp %= 5; - customClassField.IntField %= 5; - customClassField.IntProp %= 5; - otherCustomStructField.IntField %= 5; - otherCustomStructField.IntProp %= 5; - CustomClassProp.IntField %= 5; - CustomClassProp.IntProp %= 5; - GetClass().IntField %= 5; - GetClass().IntProp %= 5; -#if CS70 - GetRefStruct().IntField %= 5; - GetRefStruct().IntProp %= 5; - GetRefInt() %= 5; + public static void IntModulusTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + p %= 5; + num %= 5; + Use(ref num); + intField %= 5; + IntProp %= 5; + c.IntField %= 5; + c.IntProp %= 5; + s.IntField %= 5; + s.IntProp %= 5; + customClassField.IntField %= 5; + customClassField.IntProp %= 5; + otherCustomStructField.IntField %= 5; + otherCustomStructField.IntProp %= 5; + CustomClassProp.IntField %= 5; + CustomClassProp.IntProp %= 5; + GetClass().IntField %= 5; + GetClass().IntProp %= 5; +#if CS70 + GetRefStruct().IntField %= 5; + GetRefStruct().IntProp %= 5; + GetRefInt() %= 5; #endif - } + } - public static void IntLeftShiftTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - p <<= 5; - num <<= 5; - Use(ref num); - intField <<= 5; - IntProp <<= 5; - c.IntField <<= 5; - c.IntProp <<= 5; - s.IntField <<= 5; - s.IntProp <<= 5; - customClassField.IntField <<= 5; - customClassField.IntProp <<= 5; - otherCustomStructField.IntField <<= 5; - otherCustomStructField.IntProp <<= 5; - CustomClassProp.IntField <<= 5; - CustomClassProp.IntProp <<= 5; - GetClass().IntField <<= 5; - GetClass().IntProp <<= 5; -#if CS70 - GetRefStruct().IntField <<= 5; - GetRefStruct().IntProp <<= 5; - GetRefInt() <<= 5; + public static void IntLeftShiftTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + p <<= 5; + num <<= 5; + Use(ref num); + intField <<= 5; + IntProp <<= 5; + c.IntField <<= 5; + c.IntProp <<= 5; + s.IntField <<= 5; + s.IntProp <<= 5; + customClassField.IntField <<= 5; + customClassField.IntProp <<= 5; + otherCustomStructField.IntField <<= 5; + otherCustomStructField.IntProp <<= 5; + CustomClassProp.IntField <<= 5; + CustomClassProp.IntProp <<= 5; + GetClass().IntField <<= 5; + GetClass().IntProp <<= 5; +#if CS70 + GetRefStruct().IntField <<= 5; + GetRefStruct().IntProp <<= 5; + GetRefInt() <<= 5; #endif - } + } - public static void IntRightShiftTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - p >>= 5; - num >>= 5; - Use(ref num); - intField >>= 5; - IntProp >>= 5; - c.IntField >>= 5; - c.IntProp >>= 5; - s.IntField >>= 5; - s.IntProp >>= 5; - customClassField.IntField >>= 5; - customClassField.IntProp >>= 5; - otherCustomStructField.IntField >>= 5; - otherCustomStructField.IntProp >>= 5; - CustomClassProp.IntField >>= 5; - CustomClassProp.IntProp >>= 5; - GetClass().IntField >>= 5; - GetClass().IntProp >>= 5; -#if CS70 - GetRefStruct().IntField >>= 5; - GetRefStruct().IntProp >>= 5; - GetRefInt() >>= 5; + public static void IntRightShiftTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + p >>= 5; + num >>= 5; + Use(ref num); + intField >>= 5; + IntProp >>= 5; + c.IntField >>= 5; + c.IntProp >>= 5; + s.IntField >>= 5; + s.IntProp >>= 5; + customClassField.IntField >>= 5; + customClassField.IntProp >>= 5; + otherCustomStructField.IntField >>= 5; + otherCustomStructField.IntProp >>= 5; + CustomClassProp.IntField >>= 5; + CustomClassProp.IntProp >>= 5; + GetClass().IntField >>= 5; + GetClass().IntProp >>= 5; +#if CS70 + GetRefStruct().IntField >>= 5; + GetRefStruct().IntProp >>= 5; + GetRefInt() >>= 5; #endif - } + } #if CS110 - public static void IntUnsignedRightShiftTest(int p, CustomClass c, CustomStruct2 s) - { - X(p >>>= 5); - intField >>>= 5; - IntProp >>>= 5; - c.IntField >>>= 5; - c.IntProp >>>= 5; - s.IntField >>>= 5; - s.IntProp >>>= 5; - customClassField.IntField >>>= 5; - customClassField.IntProp >>>= 5; - otherCustomStructField.IntField >>>= 5; - otherCustomStructField.IntProp >>>= 5; - CustomClassProp.IntField >>>= 5; - CustomClassProp.IntProp >>>= 5; - GetClass().IntField >>>= 5; - GetClass().IntProp >>>= 5; - GetRefStruct().IntField >>>= 5; - GetRefStruct().IntProp >>>= 5; - GetRefInt() >>>= 5; - } + public static void IntUnsignedRightShiftTest(int p, CustomClass c, CustomStruct2 s) + { + X(p >>>= 5); + intField >>>= 5; + IntProp >>>= 5; + c.IntField >>>= 5; + c.IntProp >>>= 5; + s.IntField >>>= 5; + s.IntProp >>>= 5; + customClassField.IntField >>>= 5; + customClassField.IntProp >>>= 5; + otherCustomStructField.IntField >>>= 5; + otherCustomStructField.IntProp >>>= 5; + CustomClassProp.IntField >>>= 5; + CustomClassProp.IntProp >>>= 5; + GetClass().IntField >>>= 5; + GetClass().IntProp >>>= 5; + GetRefStruct().IntField >>>= 5; + GetRefStruct().IntProp >>>= 5; + GetRefInt() >>>= 5; + } #endif - public static void IntBitAndTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - p &= 5; - num &= 5; - Use(ref num); - intField &= 5; - IntProp &= 5; - c.IntField &= 5; - c.IntProp &= 5; - s.IntField &= 5; - s.IntProp &= 5; - customClassField.IntField &= 5; - customClassField.IntProp &= 5; - otherCustomStructField.IntField &= 5; - otherCustomStructField.IntProp &= 5; - CustomClassProp.IntField &= 5; - CustomClassProp.IntProp &= 5; - GetClass().IntField &= 5; - GetClass().IntProp &= 5; -#if CS70 - GetRefStruct().IntField &= 5; - GetRefStruct().IntProp &= 5; - GetRefInt() &= 5; + public static void IntBitAndTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + p &= 5; + num &= 5; + Use(ref num); + intField &= 5; + IntProp &= 5; + c.IntField &= 5; + c.IntProp &= 5; + s.IntField &= 5; + s.IntProp &= 5; + customClassField.IntField &= 5; + customClassField.IntProp &= 5; + otherCustomStructField.IntField &= 5; + otherCustomStructField.IntProp &= 5; + CustomClassProp.IntField &= 5; + CustomClassProp.IntProp &= 5; + GetClass().IntField &= 5; + GetClass().IntProp &= 5; +#if CS70 + GetRefStruct().IntField &= 5; + GetRefStruct().IntProp &= 5; + GetRefInt() &= 5; #endif - } + } - public static void IntBitOrTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - p |= 5; - num |= 5; - Use(ref num); - intField |= 5; - IntProp |= 5; - c.IntField |= 5; - c.IntProp |= 5; - s.IntField |= 5; - s.IntProp |= 5; - customClassField.IntField |= 5; - customClassField.IntProp |= 5; - otherCustomStructField.IntField |= 5; - otherCustomStructField.IntProp |= 5; - CustomClassProp.IntField |= 5; - CustomClassProp.IntProp |= 5; - GetClass().IntField |= 5; - GetClass().IntProp |= 5; -#if CS70 - GetRefStruct().IntField |= 5; - GetRefStruct().IntProp |= 5; - GetRefInt() |= 5; + public static void IntBitOrTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + p |= 5; + num |= 5; + Use(ref num); + intField |= 5; + IntProp |= 5; + c.IntField |= 5; + c.IntProp |= 5; + s.IntField |= 5; + s.IntProp |= 5; + customClassField.IntField |= 5; + customClassField.IntProp |= 5; + otherCustomStructField.IntField |= 5; + otherCustomStructField.IntProp |= 5; + CustomClassProp.IntField |= 5; + CustomClassProp.IntProp |= 5; + GetClass().IntField |= 5; + GetClass().IntProp |= 5; +#if CS70 + GetRefStruct().IntField |= 5; + GetRefStruct().IntProp |= 5; + GetRefInt() |= 5; #endif - } + } - public static void IntBitXorTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - p ^= 5; - num ^= 5; - Use(ref num); - intField ^= 5; - IntProp ^= 5; - c.IntField ^= 5; - c.IntProp ^= 5; - s.IntField ^= 5; - s.IntProp ^= 5; - customClassField.IntField ^= 5; - customClassField.IntProp ^= 5; - otherCustomStructField.IntField ^= 5; - otherCustomStructField.IntProp ^= 5; - CustomClassProp.IntField ^= 5; - CustomClassProp.IntProp ^= 5; - GetClass().IntField ^= 5; - GetClass().IntProp ^= 5; -#if CS70 - GetRefStruct().IntField ^= 5; - GetRefStruct().IntProp ^= 5; - GetRefInt() ^= 5; + public static void IntBitXorTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + p ^= 5; + num ^= 5; + Use(ref num); + intField ^= 5; + IntProp ^= 5; + c.IntField ^= 5; + c.IntProp ^= 5; + s.IntField ^= 5; + s.IntProp ^= 5; + customClassField.IntField ^= 5; + customClassField.IntProp ^= 5; + otherCustomStructField.IntField ^= 5; + otherCustomStructField.IntProp ^= 5; + CustomClassProp.IntField ^= 5; + CustomClassProp.IntProp ^= 5; + GetClass().IntField ^= 5; + GetClass().IntProp ^= 5; +#if CS70 + GetRefStruct().IntField ^= 5; + GetRefStruct().IntProp ^= 5; + GetRefInt() ^= 5; #endif - } + } - public static void IntPostIncTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - X(p++); - X(num++); - Use(ref num); - X(intField++); - X(IntProp++); - X(c.IntField++); - X(c.IntProp++); - X(s.IntField++); - X(s.IntProp++); - X(customClassField.IntField++); - X(customClassField.IntProp++); - X(otherCustomStructField.IntField++); - X(otherCustomStructField.IntProp++); - X(CustomClassProp.IntField++); - X(CustomClassProp.IntProp++); - X(GetClass().IntField++); - X(GetClass().IntProp++); -#if CS70 - X(GetRefStruct().IntField++); - X(GetRefStruct().IntProp++); - X(GetRefInt()++); + public static void IntPostIncTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + X(p++); + X(num++); + Use(ref num); + X(intField++); + X(IntProp++); + X(c.IntField++); + X(c.IntProp++); + X(s.IntField++); + X(s.IntProp++); + X(customClassField.IntField++); + X(customClassField.IntProp++); + X(otherCustomStructField.IntField++); + X(otherCustomStructField.IntProp++); + X(CustomClassProp.IntField++); + X(CustomClassProp.IntProp++); + X(GetClass().IntField++); + X(GetClass().IntProp++); +#if CS70 + X(GetRefStruct().IntField++); + X(GetRefStruct().IntProp++); + X(GetRefInt()++); #endif - } + } - public static void IntPreIncTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - X(++p); - X(++num); - Use(ref num); - X(++intField); - X(++IntProp); - X(++c.IntField); - X(++c.IntProp); - X(++s.IntField); - X(++s.IntProp); - X(++customClassField.IntField); - X(++customClassField.IntProp); - X(++otherCustomStructField.IntField); - X(++otherCustomStructField.IntProp); - X(++CustomClassProp.IntField); - X(++CustomClassProp.IntProp); - X(++GetClass().IntField); - X(++GetClass().IntProp); -#if CS70 - X(++GetRefStruct().IntField); - X(++GetRefStruct().IntProp); - X(++GetRefInt()); + public static void IntPreIncTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + X(++p); + X(++num); + Use(ref num); + X(++intField); + X(++IntProp); + X(++c.IntField); + X(++c.IntProp); + X(++s.IntField); + X(++s.IntProp); + X(++customClassField.IntField); + X(++customClassField.IntProp); + X(++otherCustomStructField.IntField); + X(++otherCustomStructField.IntProp); + X(++CustomClassProp.IntField); + X(++CustomClassProp.IntProp); + X(++GetClass().IntField); + X(++GetClass().IntProp); +#if CS70 + X(++GetRefStruct().IntField); + X(++GetRefStruct().IntProp); + X(++GetRefInt()); #endif - } - public static void IntPostDecTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - X(p--); - X(num--); - Use(ref num); - X(intField--); - X(IntProp--); - X(c.IntField--); - X(c.IntProp--); - X(s.IntField--); - X(s.IntProp--); - X(customClassField.IntField--); - X(customClassField.IntProp--); - X(otherCustomStructField.IntField--); - X(otherCustomStructField.IntProp--); - X(CustomClassProp.IntField--); - X(CustomClassProp.IntProp--); - X(GetClass().IntField--); - X(GetClass().IntProp--); -#if CS70 - X(GetRefStruct().IntField--); - X(GetRefStruct().IntProp--); - X(GetRefInt()--); + } + public static void IntPostDecTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + X(p--); + X(num--); + Use(ref num); + X(intField--); + X(IntProp--); + X(c.IntField--); + X(c.IntProp--); + X(s.IntField--); + X(s.IntProp--); + X(customClassField.IntField--); + X(customClassField.IntProp--); + X(otherCustomStructField.IntField--); + X(otherCustomStructField.IntProp--); + X(CustomClassProp.IntField--); + X(CustomClassProp.IntProp--); + X(GetClass().IntField--); + X(GetClass().IntProp--); +#if CS70 + X(GetRefStruct().IntField--); + X(GetRefStruct().IntProp--); + X(GetRefInt()--); #endif - } + } - public static void IntPreDecTest(int p, CustomClass c, CustomStruct2 s) - { - int num = 0; - X(--p); - X(--num); - Use(ref num); - X(--intField); - X(--IntProp); - X(--c.IntField); - X(--c.IntProp); - X(--s.IntField); - X(--s.IntProp); - X(--customClassField.IntField); - X(--customClassField.IntProp); - X(--otherCustomStructField.IntField); - X(--otherCustomStructField.IntProp); - X(--CustomClassProp.IntField); - X(--CustomClassProp.IntProp); - X(--GetClass().IntField); - X(--GetClass().IntProp); -#if CS70 - X(--GetRefStruct().IntField); - X(--GetRefStruct().IntProp); - X(--GetRefInt()); + public static void IntPreDecTest(int p, CustomClass c, CustomStruct2 s) + { + int num = 0; + X(--p); + X(--num); + Use(ref num); + X(--intField); + X(--IntProp); + X(--c.IntField); + X(--c.IntProp); + X(--s.IntField); + X(--s.IntProp); + X(--customClassField.IntField); + X(--customClassField.IntProp); + X(--otherCustomStructField.IntField); + X(--otherCustomStructField.IntProp); + X(--CustomClassProp.IntField); + X(--CustomClassProp.IntProp); + X(--GetClass().IntField); + X(--GetClass().IntProp); +#if CS70 + X(--GetRefStruct().IntField); + X(--GetRefStruct().IntProp); + X(--GetRefInt()); #endif - } - public static void UintAddTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - p += 5; - num += 5; - Use(ref num); - uintField += 5u; - UintProp += 5u; - c.UintField += 5u; - c.UintProp += 5u; - s.UintField += 5u; - s.UintProp += 5u; - customClassField.UintField += 5u; - customClassField.UintProp += 5u; - otherCustomStructField.UintField += 5u; - otherCustomStructField.UintProp += 5u; - CustomClassProp.UintField += 5u; - CustomClassProp.UintProp += 5u; - GetClass().UintField += 5u; - GetClass().UintProp += 5u; -#if CS70 - GetRefStruct().UintField += 5u; - GetRefStruct().UintProp += 5u; - GetRefUint() += 5u; + } + public static void UintAddTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + p += 5; + num += 5; + Use(ref num); + uintField += 5u; + UintProp += 5u; + c.UintField += 5u; + c.UintProp += 5u; + s.UintField += 5u; + s.UintProp += 5u; + customClassField.UintField += 5u; + customClassField.UintProp += 5u; + otherCustomStructField.UintField += 5u; + otherCustomStructField.UintProp += 5u; + CustomClassProp.UintField += 5u; + CustomClassProp.UintProp += 5u; + GetClass().UintField += 5u; + GetClass().UintProp += 5u; +#if CS70 + GetRefStruct().UintField += 5u; + GetRefStruct().UintProp += 5u; + GetRefUint() += 5u; #endif - } + } - public static void UintSubtractTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - p -= 5; - num -= 5; - Use(ref num); - uintField -= 5u; - UintProp -= 5u; - c.UintField -= 5u; - c.UintProp -= 5u; - s.UintField -= 5u; - s.UintProp -= 5u; - customClassField.UintField -= 5u; - customClassField.UintProp -= 5u; - otherCustomStructField.UintField -= 5u; - otherCustomStructField.UintProp -= 5u; - CustomClassProp.UintField -= 5u; - CustomClassProp.UintProp -= 5u; - GetClass().UintField -= 5u; - GetClass().UintProp -= 5u; -#if CS70 - GetRefStruct().UintField -= 5u; - GetRefStruct().UintProp -= 5u; - GetRefUint() -= 5u; + public static void UintSubtractTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + p -= 5; + num -= 5; + Use(ref num); + uintField -= 5u; + UintProp -= 5u; + c.UintField -= 5u; + c.UintProp -= 5u; + s.UintField -= 5u; + s.UintProp -= 5u; + customClassField.UintField -= 5u; + customClassField.UintProp -= 5u; + otherCustomStructField.UintField -= 5u; + otherCustomStructField.UintProp -= 5u; + CustomClassProp.UintField -= 5u; + CustomClassProp.UintProp -= 5u; + GetClass().UintField -= 5u; + GetClass().UintProp -= 5u; +#if CS70 + GetRefStruct().UintField -= 5u; + GetRefStruct().UintProp -= 5u; + GetRefUint() -= 5u; #endif - } + } - public static void UintMultiplyTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - p *= 5; - num *= 5; - Use(ref num); - uintField *= 5u; - UintProp *= 5u; - c.UintField *= 5u; - c.UintProp *= 5u; - s.UintField *= 5u; - s.UintProp *= 5u; - customClassField.UintField *= 5u; - customClassField.UintProp *= 5u; - otherCustomStructField.UintField *= 5u; - otherCustomStructField.UintProp *= 5u; - CustomClassProp.UintField *= 5u; - CustomClassProp.UintProp *= 5u; - GetClass().UintField *= 5u; - GetClass().UintProp *= 5u; -#if CS70 - GetRefStruct().UintField *= 5u; - GetRefStruct().UintProp *= 5u; - GetRefUint() *= 5u; + public static void UintMultiplyTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + p *= 5; + num *= 5; + Use(ref num); + uintField *= 5u; + UintProp *= 5u; + c.UintField *= 5u; + c.UintProp *= 5u; + s.UintField *= 5u; + s.UintProp *= 5u; + customClassField.UintField *= 5u; + customClassField.UintProp *= 5u; + otherCustomStructField.UintField *= 5u; + otherCustomStructField.UintProp *= 5u; + CustomClassProp.UintField *= 5u; + CustomClassProp.UintProp *= 5u; + GetClass().UintField *= 5u; + GetClass().UintProp *= 5u; +#if CS70 + GetRefStruct().UintField *= 5u; + GetRefStruct().UintProp *= 5u; + GetRefUint() *= 5u; #endif - } + } - public static void UintDivideTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - p /= 5; - num /= 5; - Use(ref num); - uintField /= 5u; - UintProp /= 5u; - c.UintField /= 5u; - c.UintProp /= 5u; - s.UintField /= 5u; - s.UintProp /= 5u; - customClassField.UintField /= 5u; - customClassField.UintProp /= 5u; - otherCustomStructField.UintField /= 5u; - otherCustomStructField.UintProp /= 5u; - CustomClassProp.UintField /= 5u; - CustomClassProp.UintProp /= 5u; - GetClass().UintField /= 5u; - GetClass().UintProp /= 5u; -#if CS70 - GetRefStruct().UintField /= 5u; - GetRefStruct().UintProp /= 5u; - GetRefUint() /= 5u; + public static void UintDivideTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + p /= 5; + num /= 5; + Use(ref num); + uintField /= 5u; + UintProp /= 5u; + c.UintField /= 5u; + c.UintProp /= 5u; + s.UintField /= 5u; + s.UintProp /= 5u; + customClassField.UintField /= 5u; + customClassField.UintProp /= 5u; + otherCustomStructField.UintField /= 5u; + otherCustomStructField.UintProp /= 5u; + CustomClassProp.UintField /= 5u; + CustomClassProp.UintProp /= 5u; + GetClass().UintField /= 5u; + GetClass().UintProp /= 5u; +#if CS70 + GetRefStruct().UintField /= 5u; + GetRefStruct().UintProp /= 5u; + GetRefUint() /= 5u; #endif - } + } - public static void UintModulusTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - p %= 5; - num %= 5; - Use(ref num); - uintField %= 5u; - UintProp %= 5u; - c.UintField %= 5u; - c.UintProp %= 5u; - s.UintField %= 5u; - s.UintProp %= 5u; - customClassField.UintField %= 5u; - customClassField.UintProp %= 5u; - otherCustomStructField.UintField %= 5u; - otherCustomStructField.UintProp %= 5u; - CustomClassProp.UintField %= 5u; - CustomClassProp.UintProp %= 5u; - GetClass().UintField %= 5u; - GetClass().UintProp %= 5u; -#if CS70 - GetRefStruct().UintField %= 5u; - GetRefStruct().UintProp %= 5u; - GetRefUint() %= 5u; + public static void UintModulusTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + p %= 5; + num %= 5; + Use(ref num); + uintField %= 5u; + UintProp %= 5u; + c.UintField %= 5u; + c.UintProp %= 5u; + s.UintField %= 5u; + s.UintProp %= 5u; + customClassField.UintField %= 5u; + customClassField.UintProp %= 5u; + otherCustomStructField.UintField %= 5u; + otherCustomStructField.UintProp %= 5u; + CustomClassProp.UintField %= 5u; + CustomClassProp.UintProp %= 5u; + GetClass().UintField %= 5u; + GetClass().UintProp %= 5u; +#if CS70 + GetRefStruct().UintField %= 5u; + GetRefStruct().UintProp %= 5u; + GetRefUint() %= 5u; #endif - } + } - public static void UintLeftShiftTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - p <<= 5; - num <<= 5; - Use(ref num); - uintField <<= 5; - UintProp <<= 5; - c.UintField <<= 5; - c.UintProp <<= 5; - s.UintField <<= 5; - s.UintProp <<= 5; - customClassField.UintField <<= 5; - customClassField.UintProp <<= 5; - otherCustomStructField.UintField <<= 5; - otherCustomStructField.UintProp <<= 5; - CustomClassProp.UintField <<= 5; - CustomClassProp.UintProp <<= 5; - GetClass().UintField <<= 5; - GetClass().UintProp <<= 5; -#if CS70 - GetRefStruct().UintField <<= 5; - GetRefStruct().UintProp <<= 5; - GetRefUint() <<= 5; + public static void UintLeftShiftTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + p <<= 5; + num <<= 5; + Use(ref num); + uintField <<= 5; + UintProp <<= 5; + c.UintField <<= 5; + c.UintProp <<= 5; + s.UintField <<= 5; + s.UintProp <<= 5; + customClassField.UintField <<= 5; + customClassField.UintProp <<= 5; + otherCustomStructField.UintField <<= 5; + otherCustomStructField.UintProp <<= 5; + CustomClassProp.UintField <<= 5; + CustomClassProp.UintProp <<= 5; + GetClass().UintField <<= 5; + GetClass().UintProp <<= 5; +#if CS70 + GetRefStruct().UintField <<= 5; + GetRefStruct().UintProp <<= 5; + GetRefUint() <<= 5; #endif - } + } - public static void UintRightShiftTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - p >>= 5; - num >>= 5; - Use(ref num); - uintField >>= 5; - UintProp >>= 5; - c.UintField >>= 5; - c.UintProp >>= 5; - s.UintField >>= 5; - s.UintProp >>= 5; - customClassField.UintField >>= 5; - customClassField.UintProp >>= 5; - otherCustomStructField.UintField >>= 5; - otherCustomStructField.UintProp >>= 5; - CustomClassProp.UintField >>= 5; - CustomClassProp.UintProp >>= 5; - GetClass().UintField >>= 5; - GetClass().UintProp >>= 5; -#if CS70 - GetRefStruct().UintField >>= 5; - GetRefStruct().UintProp >>= 5; - GetRefUint() >>= 5; + public static void UintRightShiftTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + p >>= 5; + num >>= 5; + Use(ref num); + uintField >>= 5; + UintProp >>= 5; + c.UintField >>= 5; + c.UintProp >>= 5; + s.UintField >>= 5; + s.UintProp >>= 5; + customClassField.UintField >>= 5; + customClassField.UintProp >>= 5; + otherCustomStructField.UintField >>= 5; + otherCustomStructField.UintProp >>= 5; + CustomClassProp.UintField >>= 5; + CustomClassProp.UintProp >>= 5; + GetClass().UintField >>= 5; + GetClass().UintProp >>= 5; +#if CS70 + GetRefStruct().UintField >>= 5; + GetRefStruct().UintProp >>= 5; + GetRefUint() >>= 5; #endif - } + } - public static void UintBitAndTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - p &= 5u; - num &= 5u; - Use(ref num); - uintField &= 5u; - UintProp &= 5u; - c.UintField &= 5u; - c.UintProp &= 5u; - s.UintField &= 5u; - s.UintProp &= 5u; - customClassField.UintField &= 5u; - customClassField.UintProp &= 5u; - otherCustomStructField.UintField &= 5u; - otherCustomStructField.UintProp &= 5u; - CustomClassProp.UintField &= 5u; - CustomClassProp.UintProp &= 5u; - GetClass().UintField &= 5u; - GetClass().UintProp &= 5u; -#if CS70 - GetRefStruct().UintField &= 5u; - GetRefStruct().UintProp &= 5u; - GetRefUint() &= 5u; + public static void UintBitAndTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + p &= 5u; + num &= 5u; + Use(ref num); + uintField &= 5u; + UintProp &= 5u; + c.UintField &= 5u; + c.UintProp &= 5u; + s.UintField &= 5u; + s.UintProp &= 5u; + customClassField.UintField &= 5u; + customClassField.UintProp &= 5u; + otherCustomStructField.UintField &= 5u; + otherCustomStructField.UintProp &= 5u; + CustomClassProp.UintField &= 5u; + CustomClassProp.UintProp &= 5u; + GetClass().UintField &= 5u; + GetClass().UintProp &= 5u; +#if CS70 + GetRefStruct().UintField &= 5u; + GetRefStruct().UintProp &= 5u; + GetRefUint() &= 5u; #endif - } + } - public static void UintBitOrTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - p |= 5u; - num |= 5u; - Use(ref num); - uintField |= 5u; - UintProp |= 5u; - c.UintField |= 5u; - c.UintProp |= 5u; - s.UintField |= 5u; - s.UintProp |= 5u; - customClassField.UintField |= 5u; - customClassField.UintProp |= 5u; - otherCustomStructField.UintField |= 5u; - otherCustomStructField.UintProp |= 5u; - CustomClassProp.UintField |= 5u; - CustomClassProp.UintProp |= 5u; - GetClass().UintField |= 5u; - GetClass().UintProp |= 5u; -#if CS70 - GetRefStruct().UintField |= 5u; - GetRefStruct().UintProp |= 5u; - GetRefUint() |= 5u; + public static void UintBitOrTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + p |= 5u; + num |= 5u; + Use(ref num); + uintField |= 5u; + UintProp |= 5u; + c.UintField |= 5u; + c.UintProp |= 5u; + s.UintField |= 5u; + s.UintProp |= 5u; + customClassField.UintField |= 5u; + customClassField.UintProp |= 5u; + otherCustomStructField.UintField |= 5u; + otherCustomStructField.UintProp |= 5u; + CustomClassProp.UintField |= 5u; + CustomClassProp.UintProp |= 5u; + GetClass().UintField |= 5u; + GetClass().UintProp |= 5u; +#if CS70 + GetRefStruct().UintField |= 5u; + GetRefStruct().UintProp |= 5u; + GetRefUint() |= 5u; #endif - } + } - public static void UintBitXorTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - p ^= 5u; - num ^= 5u; - Use(ref num); - uintField ^= 5u; - UintProp ^= 5u; - c.UintField ^= 5u; - c.UintProp ^= 5u; - s.UintField ^= 5u; - s.UintProp ^= 5u; - customClassField.UintField ^= 5u; - customClassField.UintProp ^= 5u; - otherCustomStructField.UintField ^= 5u; - otherCustomStructField.UintProp ^= 5u; - CustomClassProp.UintField ^= 5u; - CustomClassProp.UintProp ^= 5u; - GetClass().UintField ^= 5u; - GetClass().UintProp ^= 5u; -#if CS70 - GetRefStruct().UintField ^= 5u; - GetRefStruct().UintProp ^= 5u; - GetRefUint() ^= 5u; + public static void UintBitXorTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + p ^= 5u; + num ^= 5u; + Use(ref num); + uintField ^= 5u; + UintProp ^= 5u; + c.UintField ^= 5u; + c.UintProp ^= 5u; + s.UintField ^= 5u; + s.UintProp ^= 5u; + customClassField.UintField ^= 5u; + customClassField.UintProp ^= 5u; + otherCustomStructField.UintField ^= 5u; + otherCustomStructField.UintProp ^= 5u; + CustomClassProp.UintField ^= 5u; + CustomClassProp.UintProp ^= 5u; + GetClass().UintField ^= 5u; + GetClass().UintProp ^= 5u; +#if CS70 + GetRefStruct().UintField ^= 5u; + GetRefStruct().UintProp ^= 5u; + GetRefUint() ^= 5u; #endif - } + } - public static void UintPostIncTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - X(p++); - X(num++); - Use(ref num); - X(uintField++); - X(UintProp++); - X(c.UintField++); - X(c.UintProp++); - X(s.UintField++); - X(s.UintProp++); - X(customClassField.UintField++); - X(customClassField.UintProp++); - X(otherCustomStructField.UintField++); - X(otherCustomStructField.UintProp++); - X(CustomClassProp.UintField++); - X(CustomClassProp.UintProp++); - X(GetClass().UintField++); - X(GetClass().UintProp++); -#if CS70 - X(GetRefStruct().UintField++); - X(GetRefStruct().UintProp++); - X(GetRefUint()++); + public static void UintPostIncTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + X(p++); + X(num++); + Use(ref num); + X(uintField++); + X(UintProp++); + X(c.UintField++); + X(c.UintProp++); + X(s.UintField++); + X(s.UintProp++); + X(customClassField.UintField++); + X(customClassField.UintProp++); + X(otherCustomStructField.UintField++); + X(otherCustomStructField.UintProp++); + X(CustomClassProp.UintField++); + X(CustomClassProp.UintProp++); + X(GetClass().UintField++); + X(GetClass().UintProp++); +#if CS70 + X(GetRefStruct().UintField++); + X(GetRefStruct().UintProp++); + X(GetRefUint()++); #endif - } + } - public static void UintPreIncTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - X(++p); - X(++num); - Use(ref num); - X(++uintField); - X(++UintProp); - X(++c.UintField); - X(++c.UintProp); - X(++s.UintField); - X(++s.UintProp); - X(++customClassField.UintField); - X(++customClassField.UintProp); - X(++otherCustomStructField.UintField); - X(++otherCustomStructField.UintProp); - X(++CustomClassProp.UintField); - X(++CustomClassProp.UintProp); - X(++GetClass().UintField); - X(++GetClass().UintProp); -#if CS70 - X(++GetRefStruct().UintField); - X(++GetRefStruct().UintProp); - X(++GetRefUint()); + public static void UintPreIncTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + X(++p); + X(++num); + Use(ref num); + X(++uintField); + X(++UintProp); + X(++c.UintField); + X(++c.UintProp); + X(++s.UintField); + X(++s.UintProp); + X(++customClassField.UintField); + X(++customClassField.UintProp); + X(++otherCustomStructField.UintField); + X(++otherCustomStructField.UintProp); + X(++CustomClassProp.UintField); + X(++CustomClassProp.UintProp); + X(++GetClass().UintField); + X(++GetClass().UintProp); +#if CS70 + X(++GetRefStruct().UintField); + X(++GetRefStruct().UintProp); + X(++GetRefUint()); #endif - } - public static void UintPostDecTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - X(p--); - X(num--); - Use(ref num); - X(uintField--); - X(UintProp--); - X(c.UintField--); - X(c.UintProp--); - X(s.UintField--); - X(s.UintProp--); - X(customClassField.UintField--); - X(customClassField.UintProp--); - X(otherCustomStructField.UintField--); - X(otherCustomStructField.UintProp--); - X(CustomClassProp.UintField--); - X(CustomClassProp.UintProp--); - X(GetClass().UintField--); - X(GetClass().UintProp--); -#if CS70 - X(GetRefStruct().UintField--); - X(GetRefStruct().UintProp--); - X(GetRefUint()--); + } + public static void UintPostDecTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + X(p--); + X(num--); + Use(ref num); + X(uintField--); + X(UintProp--); + X(c.UintField--); + X(c.UintProp--); + X(s.UintField--); + X(s.UintProp--); + X(customClassField.UintField--); + X(customClassField.UintProp--); + X(otherCustomStructField.UintField--); + X(otherCustomStructField.UintProp--); + X(CustomClassProp.UintField--); + X(CustomClassProp.UintProp--); + X(GetClass().UintField--); + X(GetClass().UintProp--); +#if CS70 + X(GetRefStruct().UintField--); + X(GetRefStruct().UintProp--); + X(GetRefUint()--); #endif - } + } - public static void UintPreDecTest(uint p, CustomClass c, CustomStruct2 s) - { - uint num = 0u; - X(--p); - X(--num); - Use(ref num); - X(--uintField); - X(--UintProp); - X(--c.UintField); - X(--c.UintProp); - X(--s.UintField); - X(--s.UintProp); - X(--customClassField.UintField); - X(--customClassField.UintProp); - X(--otherCustomStructField.UintField); - X(--otherCustomStructField.UintProp); - X(--CustomClassProp.UintField); - X(--CustomClassProp.UintProp); - X(--GetClass().UintField); - X(--GetClass().UintProp); -#if CS70 - X(--GetRefStruct().UintField); - X(--GetRefStruct().UintProp); - X(--GetRefUint()); + public static void UintPreDecTest(uint p, CustomClass c, CustomStruct2 s) + { + uint num = 0u; + X(--p); + X(--num); + Use(ref num); + X(--uintField); + X(--UintProp); + X(--c.UintField); + X(--c.UintProp); + X(--s.UintField); + X(--s.UintProp); + X(--customClassField.UintField); + X(--customClassField.UintProp); + X(--otherCustomStructField.UintField); + X(--otherCustomStructField.UintProp); + X(--CustomClassProp.UintField); + X(--CustomClassProp.UintProp); + X(--GetClass().UintField); + X(--GetClass().UintProp); +#if CS70 + X(--GetRefStruct().UintField); + X(--GetRefStruct().UintProp); + X(--GetRefUint()); #endif - } - public static void LongAddTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - p += 5; - num += 5; - Use(ref num); - longField += 5L; - LongProp += 5L; - c.LongField += 5L; - c.LongProp += 5L; - s.LongField += 5L; - s.LongProp += 5L; - customClassField.LongField += 5L; - customClassField.LongProp += 5L; - otherCustomStructField.LongField += 5L; - otherCustomStructField.LongProp += 5L; - CustomClassProp.LongField += 5L; - CustomClassProp.LongProp += 5L; - GetClass().LongField += 5L; - GetClass().LongProp += 5L; -#if CS70 - GetRefStruct().LongField += 5L; - GetRefStruct().LongProp += 5L; - GetRefLong() += 5L; + } + public static void LongAddTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + p += 5; + num += 5; + Use(ref num); + longField += 5L; + LongProp += 5L; + c.LongField += 5L; + c.LongProp += 5L; + s.LongField += 5L; + s.LongProp += 5L; + customClassField.LongField += 5L; + customClassField.LongProp += 5L; + otherCustomStructField.LongField += 5L; + otherCustomStructField.LongProp += 5L; + CustomClassProp.LongField += 5L; + CustomClassProp.LongProp += 5L; + GetClass().LongField += 5L; + GetClass().LongProp += 5L; +#if CS70 + GetRefStruct().LongField += 5L; + GetRefStruct().LongProp += 5L; + GetRefLong() += 5L; #endif - } + } - public static void LongSubtractTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - p -= 5; - num -= 5; - Use(ref num); - longField -= 5L; - LongProp -= 5L; - c.LongField -= 5L; - c.LongProp -= 5L; - s.LongField -= 5L; - s.LongProp -= 5L; - customClassField.LongField -= 5L; - customClassField.LongProp -= 5L; - otherCustomStructField.LongField -= 5L; - otherCustomStructField.LongProp -= 5L; - CustomClassProp.LongField -= 5L; - CustomClassProp.LongProp -= 5L; - GetClass().LongField -= 5L; - GetClass().LongProp -= 5L; -#if CS70 - GetRefStruct().LongField -= 5L; - GetRefStruct().LongProp -= 5L; - GetRefLong() -= 5L; + public static void LongSubtractTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + p -= 5; + num -= 5; + Use(ref num); + longField -= 5L; + LongProp -= 5L; + c.LongField -= 5L; + c.LongProp -= 5L; + s.LongField -= 5L; + s.LongProp -= 5L; + customClassField.LongField -= 5L; + customClassField.LongProp -= 5L; + otherCustomStructField.LongField -= 5L; + otherCustomStructField.LongProp -= 5L; + CustomClassProp.LongField -= 5L; + CustomClassProp.LongProp -= 5L; + GetClass().LongField -= 5L; + GetClass().LongProp -= 5L; +#if CS70 + GetRefStruct().LongField -= 5L; + GetRefStruct().LongProp -= 5L; + GetRefLong() -= 5L; #endif - } + } - public static void LongMultiplyTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - p *= 5; - num *= 5; - Use(ref num); - longField *= 5L; - LongProp *= 5L; - c.LongField *= 5L; - c.LongProp *= 5L; - s.LongField *= 5L; - s.LongProp *= 5L; - customClassField.LongField *= 5L; - customClassField.LongProp *= 5L; - otherCustomStructField.LongField *= 5L; - otherCustomStructField.LongProp *= 5L; - CustomClassProp.LongField *= 5L; - CustomClassProp.LongProp *= 5L; - GetClass().LongField *= 5L; - GetClass().LongProp *= 5L; -#if CS70 - GetRefStruct().LongField *= 5L; - GetRefStruct().LongProp *= 5L; - GetRefLong() *= 5L; + public static void LongMultiplyTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + p *= 5; + num *= 5; + Use(ref num); + longField *= 5L; + LongProp *= 5L; + c.LongField *= 5L; + c.LongProp *= 5L; + s.LongField *= 5L; + s.LongProp *= 5L; + customClassField.LongField *= 5L; + customClassField.LongProp *= 5L; + otherCustomStructField.LongField *= 5L; + otherCustomStructField.LongProp *= 5L; + CustomClassProp.LongField *= 5L; + CustomClassProp.LongProp *= 5L; + GetClass().LongField *= 5L; + GetClass().LongProp *= 5L; +#if CS70 + GetRefStruct().LongField *= 5L; + GetRefStruct().LongProp *= 5L; + GetRefLong() *= 5L; #endif - } + } - public static void LongDivideTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - p /= 5; - num /= 5; - Use(ref num); - longField /= 5L; - LongProp /= 5L; - c.LongField /= 5L; - c.LongProp /= 5L; - s.LongField /= 5L; - s.LongProp /= 5L; - customClassField.LongField /= 5L; - customClassField.LongProp /= 5L; - otherCustomStructField.LongField /= 5L; - otherCustomStructField.LongProp /= 5L; - CustomClassProp.LongField /= 5L; - CustomClassProp.LongProp /= 5L; - GetClass().LongField /= 5L; - GetClass().LongProp /= 5L; -#if CS70 - GetRefStruct().LongField /= 5L; - GetRefStruct().LongProp /= 5L; - GetRefLong() /= 5L; + public static void LongDivideTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + p /= 5; + num /= 5; + Use(ref num); + longField /= 5L; + LongProp /= 5L; + c.LongField /= 5L; + c.LongProp /= 5L; + s.LongField /= 5L; + s.LongProp /= 5L; + customClassField.LongField /= 5L; + customClassField.LongProp /= 5L; + otherCustomStructField.LongField /= 5L; + otherCustomStructField.LongProp /= 5L; + CustomClassProp.LongField /= 5L; + CustomClassProp.LongProp /= 5L; + GetClass().LongField /= 5L; + GetClass().LongProp /= 5L; +#if CS70 + GetRefStruct().LongField /= 5L; + GetRefStruct().LongProp /= 5L; + GetRefLong() /= 5L; #endif - } + } - public static void LongModulusTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - p %= 5; - num %= 5; - Use(ref num); - longField %= 5L; - LongProp %= 5L; - c.LongField %= 5L; - c.LongProp %= 5L; - s.LongField %= 5L; - s.LongProp %= 5L; - customClassField.LongField %= 5L; - customClassField.LongProp %= 5L; - otherCustomStructField.LongField %= 5L; - otherCustomStructField.LongProp %= 5L; - CustomClassProp.LongField %= 5L; - CustomClassProp.LongProp %= 5L; - GetClass().LongField %= 5L; - GetClass().LongProp %= 5L; -#if CS70 - GetRefStruct().LongField %= 5L; - GetRefStruct().LongProp %= 5L; - GetRefLong() %= 5L; + public static void LongModulusTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + p %= 5; + num %= 5; + Use(ref num); + longField %= 5L; + LongProp %= 5L; + c.LongField %= 5L; + c.LongProp %= 5L; + s.LongField %= 5L; + s.LongProp %= 5L; + customClassField.LongField %= 5L; + customClassField.LongProp %= 5L; + otherCustomStructField.LongField %= 5L; + otherCustomStructField.LongProp %= 5L; + CustomClassProp.LongField %= 5L; + CustomClassProp.LongProp %= 5L; + GetClass().LongField %= 5L; + GetClass().LongProp %= 5L; +#if CS70 + GetRefStruct().LongField %= 5L; + GetRefStruct().LongProp %= 5L; + GetRefLong() %= 5L; #endif - } + } - public static void LongLeftShiftTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - p <<= 5; - num <<= 5; - Use(ref num); - longField <<= 5; - LongProp <<= 5; - c.LongField <<= 5; - c.LongProp <<= 5; - s.LongField <<= 5; - s.LongProp <<= 5; - customClassField.LongField <<= 5; - customClassField.LongProp <<= 5; - otherCustomStructField.LongField <<= 5; - otherCustomStructField.LongProp <<= 5; - CustomClassProp.LongField <<= 5; - CustomClassProp.LongProp <<= 5; - GetClass().LongField <<= 5; - GetClass().LongProp <<= 5; -#if CS70 - GetRefStruct().LongField <<= 5; - GetRefStruct().LongProp <<= 5; - GetRefLong() <<= 5; + public static void LongLeftShiftTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + p <<= 5; + num <<= 5; + Use(ref num); + longField <<= 5; + LongProp <<= 5; + c.LongField <<= 5; + c.LongProp <<= 5; + s.LongField <<= 5; + s.LongProp <<= 5; + customClassField.LongField <<= 5; + customClassField.LongProp <<= 5; + otherCustomStructField.LongField <<= 5; + otherCustomStructField.LongProp <<= 5; + CustomClassProp.LongField <<= 5; + CustomClassProp.LongProp <<= 5; + GetClass().LongField <<= 5; + GetClass().LongProp <<= 5; +#if CS70 + GetRefStruct().LongField <<= 5; + GetRefStruct().LongProp <<= 5; + GetRefLong() <<= 5; #endif - } + } - public static void LongRightShiftTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - p >>= 5; - num >>= 5; - Use(ref num); - longField >>= 5; - LongProp >>= 5; - c.LongField >>= 5; - c.LongProp >>= 5; - s.LongField >>= 5; - s.LongProp >>= 5; - customClassField.LongField >>= 5; - customClassField.LongProp >>= 5; - otherCustomStructField.LongField >>= 5; - otherCustomStructField.LongProp >>= 5; - CustomClassProp.LongField >>= 5; - CustomClassProp.LongProp >>= 5; - GetClass().LongField >>= 5; - GetClass().LongProp >>= 5; -#if CS70 - GetRefStruct().LongField >>= 5; - GetRefStruct().LongProp >>= 5; - GetRefLong() >>= 5; + public static void LongRightShiftTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + p >>= 5; + num >>= 5; + Use(ref num); + longField >>= 5; + LongProp >>= 5; + c.LongField >>= 5; + c.LongProp >>= 5; + s.LongField >>= 5; + s.LongProp >>= 5; + customClassField.LongField >>= 5; + customClassField.LongProp >>= 5; + otherCustomStructField.LongField >>= 5; + otherCustomStructField.LongProp >>= 5; + CustomClassProp.LongField >>= 5; + CustomClassProp.LongProp >>= 5; + GetClass().LongField >>= 5; + GetClass().LongProp >>= 5; +#if CS70 + GetRefStruct().LongField >>= 5; + GetRefStruct().LongProp >>= 5; + GetRefLong() >>= 5; #endif - } + } - public static void LongBitAndTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - p &= 5; - num &= 5; - Use(ref num); - longField &= 5L; - LongProp &= 5L; - c.LongField &= 5L; - c.LongProp &= 5L; - s.LongField &= 5L; - s.LongProp &= 5L; - customClassField.LongField &= 5L; - customClassField.LongProp &= 5L; - otherCustomStructField.LongField &= 5L; - otherCustomStructField.LongProp &= 5L; - CustomClassProp.LongField &= 5L; - CustomClassProp.LongProp &= 5L; - GetClass().LongField &= 5L; - GetClass().LongProp &= 5L; -#if CS70 - GetRefStruct().LongField &= 5L; - GetRefStruct().LongProp &= 5L; - GetRefLong() &= 5L; + public static void LongBitAndTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + p &= 5; + num &= 5; + Use(ref num); + longField &= 5L; + LongProp &= 5L; + c.LongField &= 5L; + c.LongProp &= 5L; + s.LongField &= 5L; + s.LongProp &= 5L; + customClassField.LongField &= 5L; + customClassField.LongProp &= 5L; + otherCustomStructField.LongField &= 5L; + otherCustomStructField.LongProp &= 5L; + CustomClassProp.LongField &= 5L; + CustomClassProp.LongProp &= 5L; + GetClass().LongField &= 5L; + GetClass().LongProp &= 5L; +#if CS70 + GetRefStruct().LongField &= 5L; + GetRefStruct().LongProp &= 5L; + GetRefLong() &= 5L; #endif - } + } - public static void LongBitOrTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - p |= 5; - num |= 5; - Use(ref num); - longField |= 5L; - LongProp |= 5L; - c.LongField |= 5L; - c.LongProp |= 5L; - s.LongField |= 5L; - s.LongProp |= 5L; - customClassField.LongField |= 5L; - customClassField.LongProp |= 5L; - otherCustomStructField.LongField |= 5L; - otherCustomStructField.LongProp |= 5L; - CustomClassProp.LongField |= 5L; - CustomClassProp.LongProp |= 5L; - GetClass().LongField |= 5L; - GetClass().LongProp |= 5L; -#if CS70 - GetRefStruct().LongField |= 5L; - GetRefStruct().LongProp |= 5L; - GetRefLong() |= 5L; + public static void LongBitOrTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + p |= 5; + num |= 5; + Use(ref num); + longField |= 5L; + LongProp |= 5L; + c.LongField |= 5L; + c.LongProp |= 5L; + s.LongField |= 5L; + s.LongProp |= 5L; + customClassField.LongField |= 5L; + customClassField.LongProp |= 5L; + otherCustomStructField.LongField |= 5L; + otherCustomStructField.LongProp |= 5L; + CustomClassProp.LongField |= 5L; + CustomClassProp.LongProp |= 5L; + GetClass().LongField |= 5L; + GetClass().LongProp |= 5L; +#if CS70 + GetRefStruct().LongField |= 5L; + GetRefStruct().LongProp |= 5L; + GetRefLong() |= 5L; #endif - } + } - public static void LongBitXorTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - p ^= 5; - num ^= 5; - Use(ref num); - longField ^= 5L; - LongProp ^= 5L; - c.LongField ^= 5L; - c.LongProp ^= 5L; - s.LongField ^= 5L; - s.LongProp ^= 5L; - customClassField.LongField ^= 5L; - customClassField.LongProp ^= 5L; - otherCustomStructField.LongField ^= 5L; - otherCustomStructField.LongProp ^= 5L; - CustomClassProp.LongField ^= 5L; - CustomClassProp.LongProp ^= 5L; - GetClass().LongField ^= 5L; - GetClass().LongProp ^= 5L; -#if CS70 - GetRefStruct().LongField ^= 5L; - GetRefStruct().LongProp ^= 5L; - GetRefLong() ^= 5L; + public static void LongBitXorTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + p ^= 5; + num ^= 5; + Use(ref num); + longField ^= 5L; + LongProp ^= 5L; + c.LongField ^= 5L; + c.LongProp ^= 5L; + s.LongField ^= 5L; + s.LongProp ^= 5L; + customClassField.LongField ^= 5L; + customClassField.LongProp ^= 5L; + otherCustomStructField.LongField ^= 5L; + otherCustomStructField.LongProp ^= 5L; + CustomClassProp.LongField ^= 5L; + CustomClassProp.LongProp ^= 5L; + GetClass().LongField ^= 5L; + GetClass().LongProp ^= 5L; +#if CS70 + GetRefStruct().LongField ^= 5L; + GetRefStruct().LongProp ^= 5L; + GetRefLong() ^= 5L; #endif - } + } - public static void LongPostIncTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - X(p++); - X(num++); - Use(ref num); - X(longField++); - X(LongProp++); - X(c.LongField++); - X(c.LongProp++); - X(s.LongField++); - X(s.LongProp++); - X(customClassField.LongField++); - X(customClassField.LongProp++); - X(otherCustomStructField.LongField++); - X(otherCustomStructField.LongProp++); - X(CustomClassProp.LongField++); - X(CustomClassProp.LongProp++); - X(GetClass().LongField++); - X(GetClass().LongProp++); -#if CS70 - X(GetRefStruct().LongField++); - X(GetRefStruct().LongProp++); - X(GetRefLong()++); + public static void LongPostIncTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + X(p++); + X(num++); + Use(ref num); + X(longField++); + X(LongProp++); + X(c.LongField++); + X(c.LongProp++); + X(s.LongField++); + X(s.LongProp++); + X(customClassField.LongField++); + X(customClassField.LongProp++); + X(otherCustomStructField.LongField++); + X(otherCustomStructField.LongProp++); + X(CustomClassProp.LongField++); + X(CustomClassProp.LongProp++); + X(GetClass().LongField++); + X(GetClass().LongProp++); +#if CS70 + X(GetRefStruct().LongField++); + X(GetRefStruct().LongProp++); + X(GetRefLong()++); #endif - } + } - public static void LongPreIncTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - X(++p); - X(++num); - Use(ref num); - X(++longField); - X(++LongProp); - X(++c.LongField); - X(++c.LongProp); - X(++s.LongField); - X(++s.LongProp); - X(++customClassField.LongField); - X(++customClassField.LongProp); - X(++otherCustomStructField.LongField); - X(++otherCustomStructField.LongProp); - X(++CustomClassProp.LongField); - X(++CustomClassProp.LongProp); - X(++GetClass().LongField); - X(++GetClass().LongProp); -#if CS70 - X(++GetRefStruct().LongField); - X(++GetRefStruct().LongProp); - X(++GetRefLong()); + public static void LongPreIncTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + X(++p); + X(++num); + Use(ref num); + X(++longField); + X(++LongProp); + X(++c.LongField); + X(++c.LongProp); + X(++s.LongField); + X(++s.LongProp); + X(++customClassField.LongField); + X(++customClassField.LongProp); + X(++otherCustomStructField.LongField); + X(++otherCustomStructField.LongProp); + X(++CustomClassProp.LongField); + X(++CustomClassProp.LongProp); + X(++GetClass().LongField); + X(++GetClass().LongProp); +#if CS70 + X(++GetRefStruct().LongField); + X(++GetRefStruct().LongProp); + X(++GetRefLong()); #endif - } - public static void LongPostDecTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - X(p--); - X(num--); - Use(ref num); - X(longField--); - X(LongProp--); - X(c.LongField--); - X(c.LongProp--); - X(s.LongField--); - X(s.LongProp--); - X(customClassField.LongField--); - X(customClassField.LongProp--); - X(otherCustomStructField.LongField--); - X(otherCustomStructField.LongProp--); - X(CustomClassProp.LongField--); - X(CustomClassProp.LongProp--); - X(GetClass().LongField--); - X(GetClass().LongProp--); -#if CS70 - X(GetRefStruct().LongField--); - X(GetRefStruct().LongProp--); - X(GetRefLong()--); + } + public static void LongPostDecTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + X(p--); + X(num--); + Use(ref num); + X(longField--); + X(LongProp--); + X(c.LongField--); + X(c.LongProp--); + X(s.LongField--); + X(s.LongProp--); + X(customClassField.LongField--); + X(customClassField.LongProp--); + X(otherCustomStructField.LongField--); + X(otherCustomStructField.LongProp--); + X(CustomClassProp.LongField--); + X(CustomClassProp.LongProp--); + X(GetClass().LongField--); + X(GetClass().LongProp--); +#if CS70 + X(GetRefStruct().LongField--); + X(GetRefStruct().LongProp--); + X(GetRefLong()--); #endif - } + } - public static void LongPreDecTest(long p, CustomClass c, CustomStruct2 s) - { - long num = 0L; - X(--p); - X(--num); - Use(ref num); - X(--longField); - X(--LongProp); - X(--c.LongField); - X(--c.LongProp); - X(--s.LongField); - X(--s.LongProp); - X(--customClassField.LongField); - X(--customClassField.LongProp); - X(--otherCustomStructField.LongField); - X(--otherCustomStructField.LongProp); - X(--CustomClassProp.LongField); - X(--CustomClassProp.LongProp); - X(--GetClass().LongField); - X(--GetClass().LongProp); -#if CS70 - X(--GetRefStruct().LongField); - X(--GetRefStruct().LongProp); - X(--GetRefLong()); + public static void LongPreDecTest(long p, CustomClass c, CustomStruct2 s) + { + long num = 0L; + X(--p); + X(--num); + Use(ref num); + X(--longField); + X(--LongProp); + X(--c.LongField); + X(--c.LongProp); + X(--s.LongField); + X(--s.LongProp); + X(--customClassField.LongField); + X(--customClassField.LongProp); + X(--otherCustomStructField.LongField); + X(--otherCustomStructField.LongProp); + X(--CustomClassProp.LongField); + X(--CustomClassProp.LongProp); + X(--GetClass().LongField); + X(--GetClass().LongProp); +#if CS70 + X(--GetRefStruct().LongField); + X(--GetRefStruct().LongProp); + X(--GetRefLong()); #endif - } - public static void UlongAddTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - p += 5; - num += 5; - Use(ref num); - ulongField += 5uL; - UlongProp += 5uL; - c.UlongField += 5uL; - c.UlongProp += 5uL; - s.UlongField += 5uL; - s.UlongProp += 5uL; - customClassField.UlongField += 5uL; - customClassField.UlongProp += 5uL; - otherCustomStructField.UlongField += 5uL; - otherCustomStructField.UlongProp += 5uL; - CustomClassProp.UlongField += 5uL; - CustomClassProp.UlongProp += 5uL; - GetClass().UlongField += 5uL; - GetClass().UlongProp += 5uL; -#if CS70 - GetRefStruct().UlongField += 5uL; - GetRefStruct().UlongProp += 5uL; - GetRefUlong() += 5uL; + } + public static void UlongAddTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + p += 5; + num += 5; + Use(ref num); + ulongField += 5uL; + UlongProp += 5uL; + c.UlongField += 5uL; + c.UlongProp += 5uL; + s.UlongField += 5uL; + s.UlongProp += 5uL; + customClassField.UlongField += 5uL; + customClassField.UlongProp += 5uL; + otherCustomStructField.UlongField += 5uL; + otherCustomStructField.UlongProp += 5uL; + CustomClassProp.UlongField += 5uL; + CustomClassProp.UlongProp += 5uL; + GetClass().UlongField += 5uL; + GetClass().UlongProp += 5uL; +#if CS70 + GetRefStruct().UlongField += 5uL; + GetRefStruct().UlongProp += 5uL; + GetRefUlong() += 5uL; #endif - } + } - public static void UlongSubtractTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - p -= 5; - num -= 5; - Use(ref num); - ulongField -= 5uL; - UlongProp -= 5uL; - c.UlongField -= 5uL; - c.UlongProp -= 5uL; - s.UlongField -= 5uL; - s.UlongProp -= 5uL; - customClassField.UlongField -= 5uL; - customClassField.UlongProp -= 5uL; - otherCustomStructField.UlongField -= 5uL; - otherCustomStructField.UlongProp -= 5uL; - CustomClassProp.UlongField -= 5uL; - CustomClassProp.UlongProp -= 5uL; - GetClass().UlongField -= 5uL; - GetClass().UlongProp -= 5uL; -#if CS70 - GetRefStruct().UlongField -= 5uL; - GetRefStruct().UlongProp -= 5uL; - GetRefUlong() -= 5uL; + public static void UlongSubtractTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + p -= 5; + num -= 5; + Use(ref num); + ulongField -= 5uL; + UlongProp -= 5uL; + c.UlongField -= 5uL; + c.UlongProp -= 5uL; + s.UlongField -= 5uL; + s.UlongProp -= 5uL; + customClassField.UlongField -= 5uL; + customClassField.UlongProp -= 5uL; + otherCustomStructField.UlongField -= 5uL; + otherCustomStructField.UlongProp -= 5uL; + CustomClassProp.UlongField -= 5uL; + CustomClassProp.UlongProp -= 5uL; + GetClass().UlongField -= 5uL; + GetClass().UlongProp -= 5uL; +#if CS70 + GetRefStruct().UlongField -= 5uL; + GetRefStruct().UlongProp -= 5uL; + GetRefUlong() -= 5uL; #endif - } + } - public static void UlongMultiplyTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - p *= 5; - num *= 5; - Use(ref num); - ulongField *= 5uL; - UlongProp *= 5uL; - c.UlongField *= 5uL; - c.UlongProp *= 5uL; - s.UlongField *= 5uL; - s.UlongProp *= 5uL; - customClassField.UlongField *= 5uL; - customClassField.UlongProp *= 5uL; - otherCustomStructField.UlongField *= 5uL; - otherCustomStructField.UlongProp *= 5uL; - CustomClassProp.UlongField *= 5uL; - CustomClassProp.UlongProp *= 5uL; - GetClass().UlongField *= 5uL; - GetClass().UlongProp *= 5uL; -#if CS70 - GetRefStruct().UlongField *= 5uL; - GetRefStruct().UlongProp *= 5uL; - GetRefUlong() *= 5uL; + public static void UlongMultiplyTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + p *= 5; + num *= 5; + Use(ref num); + ulongField *= 5uL; + UlongProp *= 5uL; + c.UlongField *= 5uL; + c.UlongProp *= 5uL; + s.UlongField *= 5uL; + s.UlongProp *= 5uL; + customClassField.UlongField *= 5uL; + customClassField.UlongProp *= 5uL; + otherCustomStructField.UlongField *= 5uL; + otherCustomStructField.UlongProp *= 5uL; + CustomClassProp.UlongField *= 5uL; + CustomClassProp.UlongProp *= 5uL; + GetClass().UlongField *= 5uL; + GetClass().UlongProp *= 5uL; +#if CS70 + GetRefStruct().UlongField *= 5uL; + GetRefStruct().UlongProp *= 5uL; + GetRefUlong() *= 5uL; #endif - } + } - public static void UlongDivideTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - p /= 5; - num /= 5; - Use(ref num); - ulongField /= 5uL; - UlongProp /= 5uL; - c.UlongField /= 5uL; - c.UlongProp /= 5uL; - s.UlongField /= 5uL; - s.UlongProp /= 5uL; - customClassField.UlongField /= 5uL; - customClassField.UlongProp /= 5uL; - otherCustomStructField.UlongField /= 5uL; - otherCustomStructField.UlongProp /= 5uL; - CustomClassProp.UlongField /= 5uL; - CustomClassProp.UlongProp /= 5uL; - GetClass().UlongField /= 5uL; - GetClass().UlongProp /= 5uL; -#if CS70 - GetRefStruct().UlongField /= 5uL; - GetRefStruct().UlongProp /= 5uL; - GetRefUlong() /= 5uL; + public static void UlongDivideTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + p /= 5; + num /= 5; + Use(ref num); + ulongField /= 5uL; + UlongProp /= 5uL; + c.UlongField /= 5uL; + c.UlongProp /= 5uL; + s.UlongField /= 5uL; + s.UlongProp /= 5uL; + customClassField.UlongField /= 5uL; + customClassField.UlongProp /= 5uL; + otherCustomStructField.UlongField /= 5uL; + otherCustomStructField.UlongProp /= 5uL; + CustomClassProp.UlongField /= 5uL; + CustomClassProp.UlongProp /= 5uL; + GetClass().UlongField /= 5uL; + GetClass().UlongProp /= 5uL; +#if CS70 + GetRefStruct().UlongField /= 5uL; + GetRefStruct().UlongProp /= 5uL; + GetRefUlong() /= 5uL; #endif - } + } - public static void UlongModulusTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - p %= 5; - num %= 5; - Use(ref num); - ulongField %= 5uL; - UlongProp %= 5uL; - c.UlongField %= 5uL; - c.UlongProp %= 5uL; - s.UlongField %= 5uL; - s.UlongProp %= 5uL; - customClassField.UlongField %= 5uL; - customClassField.UlongProp %= 5uL; - otherCustomStructField.UlongField %= 5uL; - otherCustomStructField.UlongProp %= 5uL; - CustomClassProp.UlongField %= 5uL; - CustomClassProp.UlongProp %= 5uL; - GetClass().UlongField %= 5uL; - GetClass().UlongProp %= 5uL; -#if CS70 - GetRefStruct().UlongField %= 5uL; - GetRefStruct().UlongProp %= 5uL; - GetRefUlong() %= 5uL; + public static void UlongModulusTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + p %= 5; + num %= 5; + Use(ref num); + ulongField %= 5uL; + UlongProp %= 5uL; + c.UlongField %= 5uL; + c.UlongProp %= 5uL; + s.UlongField %= 5uL; + s.UlongProp %= 5uL; + customClassField.UlongField %= 5uL; + customClassField.UlongProp %= 5uL; + otherCustomStructField.UlongField %= 5uL; + otherCustomStructField.UlongProp %= 5uL; + CustomClassProp.UlongField %= 5uL; + CustomClassProp.UlongProp %= 5uL; + GetClass().UlongField %= 5uL; + GetClass().UlongProp %= 5uL; +#if CS70 + GetRefStruct().UlongField %= 5uL; + GetRefStruct().UlongProp %= 5uL; + GetRefUlong() %= 5uL; #endif - } + } - public static void UlongLeftShiftTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - p <<= 5; - num <<= 5; - Use(ref num); - ulongField <<= 5; - UlongProp <<= 5; - c.UlongField <<= 5; - c.UlongProp <<= 5; - s.UlongField <<= 5; - s.UlongProp <<= 5; - customClassField.UlongField <<= 5; - customClassField.UlongProp <<= 5; - otherCustomStructField.UlongField <<= 5; - otherCustomStructField.UlongProp <<= 5; - CustomClassProp.UlongField <<= 5; - CustomClassProp.UlongProp <<= 5; - GetClass().UlongField <<= 5; - GetClass().UlongProp <<= 5; -#if CS70 - GetRefStruct().UlongField <<= 5; - GetRefStruct().UlongProp <<= 5; - GetRefUlong() <<= 5; + public static void UlongLeftShiftTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + p <<= 5; + num <<= 5; + Use(ref num); + ulongField <<= 5; + UlongProp <<= 5; + c.UlongField <<= 5; + c.UlongProp <<= 5; + s.UlongField <<= 5; + s.UlongProp <<= 5; + customClassField.UlongField <<= 5; + customClassField.UlongProp <<= 5; + otherCustomStructField.UlongField <<= 5; + otherCustomStructField.UlongProp <<= 5; + CustomClassProp.UlongField <<= 5; + CustomClassProp.UlongProp <<= 5; + GetClass().UlongField <<= 5; + GetClass().UlongProp <<= 5; +#if CS70 + GetRefStruct().UlongField <<= 5; + GetRefStruct().UlongProp <<= 5; + GetRefUlong() <<= 5; #endif - } + } - public static void UlongRightShiftTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - p >>= 5; - num >>= 5; - Use(ref num); - ulongField >>= 5; - UlongProp >>= 5; - c.UlongField >>= 5; - c.UlongProp >>= 5; - s.UlongField >>= 5; - s.UlongProp >>= 5; - customClassField.UlongField >>= 5; - customClassField.UlongProp >>= 5; - otherCustomStructField.UlongField >>= 5; - otherCustomStructField.UlongProp >>= 5; - CustomClassProp.UlongField >>= 5; - CustomClassProp.UlongProp >>= 5; - GetClass().UlongField >>= 5; - GetClass().UlongProp >>= 5; -#if CS70 - GetRefStruct().UlongField >>= 5; - GetRefStruct().UlongProp >>= 5; - GetRefUlong() >>= 5; + public static void UlongRightShiftTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + p >>= 5; + num >>= 5; + Use(ref num); + ulongField >>= 5; + UlongProp >>= 5; + c.UlongField >>= 5; + c.UlongProp >>= 5; + s.UlongField >>= 5; + s.UlongProp >>= 5; + customClassField.UlongField >>= 5; + customClassField.UlongProp >>= 5; + otherCustomStructField.UlongField >>= 5; + otherCustomStructField.UlongProp >>= 5; + CustomClassProp.UlongField >>= 5; + CustomClassProp.UlongProp >>= 5; + GetClass().UlongField >>= 5; + GetClass().UlongProp >>= 5; +#if CS70 + GetRefStruct().UlongField >>= 5; + GetRefStruct().UlongProp >>= 5; + GetRefUlong() >>= 5; #endif - } + } - public static void UlongBitAndTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - p &= 5; - num &= 5; - Use(ref num); - ulongField &= 5uL; - UlongProp &= 5uL; - c.UlongField &= 5uL; - c.UlongProp &= 5uL; - s.UlongField &= 5uL; - s.UlongProp &= 5uL; - customClassField.UlongField &= 5uL; - customClassField.UlongProp &= 5uL; - otherCustomStructField.UlongField &= 5uL; - otherCustomStructField.UlongProp &= 5uL; - CustomClassProp.UlongField &= 5uL; - CustomClassProp.UlongProp &= 5uL; - GetClass().UlongField &= 5uL; - GetClass().UlongProp &= 5uL; -#if CS70 - GetRefStruct().UlongField &= 5uL; - GetRefStruct().UlongProp &= 5uL; - GetRefUlong() &= 5uL; + public static void UlongBitAndTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + p &= 5; + num &= 5; + Use(ref num); + ulongField &= 5uL; + UlongProp &= 5uL; + c.UlongField &= 5uL; + c.UlongProp &= 5uL; + s.UlongField &= 5uL; + s.UlongProp &= 5uL; + customClassField.UlongField &= 5uL; + customClassField.UlongProp &= 5uL; + otherCustomStructField.UlongField &= 5uL; + otherCustomStructField.UlongProp &= 5uL; + CustomClassProp.UlongField &= 5uL; + CustomClassProp.UlongProp &= 5uL; + GetClass().UlongField &= 5uL; + GetClass().UlongProp &= 5uL; +#if CS70 + GetRefStruct().UlongField &= 5uL; + GetRefStruct().UlongProp &= 5uL; + GetRefUlong() &= 5uL; #endif - } + } - public static void UlongBitOrTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - p |= 5; - num |= 5; - Use(ref num); - ulongField |= 5uL; - UlongProp |= 5uL; - c.UlongField |= 5uL; - c.UlongProp |= 5uL; - s.UlongField |= 5uL; - s.UlongProp |= 5uL; - customClassField.UlongField |= 5uL; - customClassField.UlongProp |= 5uL; - otherCustomStructField.UlongField |= 5uL; - otherCustomStructField.UlongProp |= 5uL; - CustomClassProp.UlongField |= 5uL; - CustomClassProp.UlongProp |= 5uL; - GetClass().UlongField |= 5uL; - GetClass().UlongProp |= 5uL; -#if CS70 - GetRefStruct().UlongField |= 5uL; - GetRefStruct().UlongProp |= 5uL; - GetRefUlong() |= 5uL; + public static void UlongBitOrTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + p |= 5; + num |= 5; + Use(ref num); + ulongField |= 5uL; + UlongProp |= 5uL; + c.UlongField |= 5uL; + c.UlongProp |= 5uL; + s.UlongField |= 5uL; + s.UlongProp |= 5uL; + customClassField.UlongField |= 5uL; + customClassField.UlongProp |= 5uL; + otherCustomStructField.UlongField |= 5uL; + otherCustomStructField.UlongProp |= 5uL; + CustomClassProp.UlongField |= 5uL; + CustomClassProp.UlongProp |= 5uL; + GetClass().UlongField |= 5uL; + GetClass().UlongProp |= 5uL; +#if CS70 + GetRefStruct().UlongField |= 5uL; + GetRefStruct().UlongProp |= 5uL; + GetRefUlong() |= 5uL; #endif - } + } - public static void UlongBitXorTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - p ^= 5; - num ^= 5; - Use(ref num); - ulongField ^= 5uL; - UlongProp ^= 5uL; - c.UlongField ^= 5uL; - c.UlongProp ^= 5uL; - s.UlongField ^= 5uL; - s.UlongProp ^= 5uL; - customClassField.UlongField ^= 5uL; - customClassField.UlongProp ^= 5uL; - otherCustomStructField.UlongField ^= 5uL; - otherCustomStructField.UlongProp ^= 5uL; - CustomClassProp.UlongField ^= 5uL; - CustomClassProp.UlongProp ^= 5uL; - GetClass().UlongField ^= 5uL; - GetClass().UlongProp ^= 5uL; -#if CS70 - GetRefStruct().UlongField ^= 5uL; - GetRefStruct().UlongProp ^= 5uL; - GetRefUlong() ^= 5uL; + public static void UlongBitXorTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + p ^= 5; + num ^= 5; + Use(ref num); + ulongField ^= 5uL; + UlongProp ^= 5uL; + c.UlongField ^= 5uL; + c.UlongProp ^= 5uL; + s.UlongField ^= 5uL; + s.UlongProp ^= 5uL; + customClassField.UlongField ^= 5uL; + customClassField.UlongProp ^= 5uL; + otherCustomStructField.UlongField ^= 5uL; + otherCustomStructField.UlongProp ^= 5uL; + CustomClassProp.UlongField ^= 5uL; + CustomClassProp.UlongProp ^= 5uL; + GetClass().UlongField ^= 5uL; + GetClass().UlongProp ^= 5uL; +#if CS70 + GetRefStruct().UlongField ^= 5uL; + GetRefStruct().UlongProp ^= 5uL; + GetRefUlong() ^= 5uL; #endif - } + } - public static void UlongPostIncTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - X(p++); - X(num++); - Use(ref num); - X(ulongField++); - X(UlongProp++); - X(c.UlongField++); - X(c.UlongProp++); - X(s.UlongField++); - X(s.UlongProp++); - X(customClassField.UlongField++); - X(customClassField.UlongProp++); - X(otherCustomStructField.UlongField++); - X(otherCustomStructField.UlongProp++); - X(CustomClassProp.UlongField++); - X(CustomClassProp.UlongProp++); - X(GetClass().UlongField++); - X(GetClass().UlongProp++); -#if CS70 - X(GetRefStruct().UlongField++); - X(GetRefStruct().UlongProp++); - X(GetRefUlong()++); + public static void UlongPostIncTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + X(p++); + X(num++); + Use(ref num); + X(ulongField++); + X(UlongProp++); + X(c.UlongField++); + X(c.UlongProp++); + X(s.UlongField++); + X(s.UlongProp++); + X(customClassField.UlongField++); + X(customClassField.UlongProp++); + X(otherCustomStructField.UlongField++); + X(otherCustomStructField.UlongProp++); + X(CustomClassProp.UlongField++); + X(CustomClassProp.UlongProp++); + X(GetClass().UlongField++); + X(GetClass().UlongProp++); +#if CS70 + X(GetRefStruct().UlongField++); + X(GetRefStruct().UlongProp++); + X(GetRefUlong()++); #endif - } + } - public static void UlongPreIncTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - X(++p); - X(++num); - Use(ref num); - X(++ulongField); - X(++UlongProp); - X(++c.UlongField); - X(++c.UlongProp); - X(++s.UlongField); - X(++s.UlongProp); - X(++customClassField.UlongField); - X(++customClassField.UlongProp); - X(++otherCustomStructField.UlongField); - X(++otherCustomStructField.UlongProp); - X(++CustomClassProp.UlongField); - X(++CustomClassProp.UlongProp); - X(++GetClass().UlongField); - X(++GetClass().UlongProp); -#if CS70 - X(++GetRefStruct().UlongField); - X(++GetRefStruct().UlongProp); - X(++GetRefUlong()); + public static void UlongPreIncTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + X(++p); + X(++num); + Use(ref num); + X(++ulongField); + X(++UlongProp); + X(++c.UlongField); + X(++c.UlongProp); + X(++s.UlongField); + X(++s.UlongProp); + X(++customClassField.UlongField); + X(++customClassField.UlongProp); + X(++otherCustomStructField.UlongField); + X(++otherCustomStructField.UlongProp); + X(++CustomClassProp.UlongField); + X(++CustomClassProp.UlongProp); + X(++GetClass().UlongField); + X(++GetClass().UlongProp); +#if CS70 + X(++GetRefStruct().UlongField); + X(++GetRefStruct().UlongProp); + X(++GetRefUlong()); #endif - } - public static void UlongPostDecTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - X(p--); - X(num--); - Use(ref num); - X(ulongField--); - X(UlongProp--); - X(c.UlongField--); - X(c.UlongProp--); - X(s.UlongField--); - X(s.UlongProp--); - X(customClassField.UlongField--); - X(customClassField.UlongProp--); - X(otherCustomStructField.UlongField--); - X(otherCustomStructField.UlongProp--); - X(CustomClassProp.UlongField--); - X(CustomClassProp.UlongProp--); - X(GetClass().UlongField--); - X(GetClass().UlongProp--); -#if CS70 - X(GetRefStruct().UlongField--); - X(GetRefStruct().UlongProp--); - X(GetRefUlong()--); + } + public static void UlongPostDecTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + X(p--); + X(num--); + Use(ref num); + X(ulongField--); + X(UlongProp--); + X(c.UlongField--); + X(c.UlongProp--); + X(s.UlongField--); + X(s.UlongProp--); + X(customClassField.UlongField--); + X(customClassField.UlongProp--); + X(otherCustomStructField.UlongField--); + X(otherCustomStructField.UlongProp--); + X(CustomClassProp.UlongField--); + X(CustomClassProp.UlongProp--); + X(GetClass().UlongField--); + X(GetClass().UlongProp--); +#if CS70 + X(GetRefStruct().UlongField--); + X(GetRefStruct().UlongProp--); + X(GetRefUlong()--); #endif - } + } - public static void UlongPreDecTest(ulong p, CustomClass c, CustomStruct2 s) - { - ulong num = 0uL; - X(--p); - X(--num); - Use(ref num); - X(--ulongField); - X(--UlongProp); - X(--c.UlongField); - X(--c.UlongProp); - X(--s.UlongField); - X(--s.UlongProp); - X(--customClassField.UlongField); - X(--customClassField.UlongProp); - X(--otherCustomStructField.UlongField); - X(--otherCustomStructField.UlongProp); - X(--CustomClassProp.UlongField); - X(--CustomClassProp.UlongProp); - X(--GetClass().UlongField); - X(--GetClass().UlongProp); -#if CS70 - X(--GetRefStruct().UlongField); - X(--GetRefStruct().UlongProp); - X(--GetRefUlong()); + public static void UlongPreDecTest(ulong p, CustomClass c, CustomStruct2 s) + { + ulong num = 0uL; + X(--p); + X(--num); + Use(ref num); + X(--ulongField); + X(--UlongProp); + X(--c.UlongField); + X(--c.UlongProp); + X(--s.UlongField); + X(--s.UlongProp); + X(--customClassField.UlongField); + X(--customClassField.UlongProp); + X(--otherCustomStructField.UlongField); + X(--otherCustomStructField.UlongProp); + X(--CustomClassProp.UlongField); + X(--CustomClassProp.UlongProp); + X(--GetClass().UlongField); + X(--GetClass().UlongProp); +#if CS70 + X(--GetRefStruct().UlongField); + X(--GetRefStruct().UlongProp); + X(--GetRefUlong()); #endif - } - public static void CustomClassAddTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - p += (CustomClass)null; - num += (CustomClass)null; - Use(ref num); - customClassField += (CustomClass)null; - CustomClassProp += (CustomClass)null; - c.CustomClassField += (CustomClass)null; - c.CustomClassProp += (CustomClass)null; - s.CustomClassField += (CustomClass)null; - s.CustomClassProp += (CustomClass)null; - customClassField.CustomClassField += (CustomClass)null; - customClassField.CustomClassProp += (CustomClass)null; - otherCustomStructField.CustomClassField += (CustomClass)null; - otherCustomStructField.CustomClassProp += (CustomClass)null; - CustomClassProp.CustomClassField += (CustomClass)null; - CustomClassProp.CustomClassProp += (CustomClass)null; - GetClass().CustomClassField += (CustomClass)null; - GetClass().CustomClassProp += (CustomClass)null; -#if CS70 - GetRefStruct().CustomClassField += (CustomClass)null; - GetRefStruct().CustomClassProp += (CustomClass)null; - GetRefCustomClass() += (CustomClass)null; + } + public static void CustomClassAddTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + p += (CustomClass)null; + num += (CustomClass)null; + Use(ref num); + customClassField += (CustomClass)null; + CustomClassProp += (CustomClass)null; + c.CustomClassField += (CustomClass)null; + c.CustomClassProp += (CustomClass)null; + s.CustomClassField += (CustomClass)null; + s.CustomClassProp += (CustomClass)null; + customClassField.CustomClassField += (CustomClass)null; + customClassField.CustomClassProp += (CustomClass)null; + otherCustomStructField.CustomClassField += (CustomClass)null; + otherCustomStructField.CustomClassProp += (CustomClass)null; + CustomClassProp.CustomClassField += (CustomClass)null; + CustomClassProp.CustomClassProp += (CustomClass)null; + GetClass().CustomClassField += (CustomClass)null; + GetClass().CustomClassProp += (CustomClass)null; +#if CS70 + GetRefStruct().CustomClassField += (CustomClass)null; + GetRefStruct().CustomClassProp += (CustomClass)null; + GetRefCustomClass() += (CustomClass)null; #endif - } + } - public static void CustomClassSubtractTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - p -= (CustomClass)null; - num -= (CustomClass)null; - Use(ref num); - customClassField -= (CustomClass)null; - CustomClassProp -= (CustomClass)null; - c.CustomClassField -= (CustomClass)null; - c.CustomClassProp -= (CustomClass)null; - s.CustomClassField -= (CustomClass)null; - s.CustomClassProp -= (CustomClass)null; - customClassField.CustomClassField -= (CustomClass)null; - customClassField.CustomClassProp -= (CustomClass)null; - otherCustomStructField.CustomClassField -= (CustomClass)null; - otherCustomStructField.CustomClassProp -= (CustomClass)null; - CustomClassProp.CustomClassField -= (CustomClass)null; - CustomClassProp.CustomClassProp -= (CustomClass)null; - GetClass().CustomClassField -= (CustomClass)null; - GetClass().CustomClassProp -= (CustomClass)null; -#if CS70 - GetRefStruct().CustomClassField -= (CustomClass)null; - GetRefStruct().CustomClassProp -= (CustomClass)null; - GetRefCustomClass() -= (CustomClass)null; + public static void CustomClassSubtractTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + p -= (CustomClass)null; + num -= (CustomClass)null; + Use(ref num); + customClassField -= (CustomClass)null; + CustomClassProp -= (CustomClass)null; + c.CustomClassField -= (CustomClass)null; + c.CustomClassProp -= (CustomClass)null; + s.CustomClassField -= (CustomClass)null; + s.CustomClassProp -= (CustomClass)null; + customClassField.CustomClassField -= (CustomClass)null; + customClassField.CustomClassProp -= (CustomClass)null; + otherCustomStructField.CustomClassField -= (CustomClass)null; + otherCustomStructField.CustomClassProp -= (CustomClass)null; + CustomClassProp.CustomClassField -= (CustomClass)null; + CustomClassProp.CustomClassProp -= (CustomClass)null; + GetClass().CustomClassField -= (CustomClass)null; + GetClass().CustomClassProp -= (CustomClass)null; +#if CS70 + GetRefStruct().CustomClassField -= (CustomClass)null; + GetRefStruct().CustomClassProp -= (CustomClass)null; + GetRefCustomClass() -= (CustomClass)null; #endif - } + } - public static void CustomClassMultiplyTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - p *= (CustomClass)null; - num *= (CustomClass)null; - Use(ref num); - customClassField *= (CustomClass)null; - CustomClassProp *= (CustomClass)null; - c.CustomClassField *= (CustomClass)null; - c.CustomClassProp *= (CustomClass)null; - s.CustomClassField *= (CustomClass)null; - s.CustomClassProp *= (CustomClass)null; - customClassField.CustomClassField *= (CustomClass)null; - customClassField.CustomClassProp *= (CustomClass)null; - otherCustomStructField.CustomClassField *= (CustomClass)null; - otherCustomStructField.CustomClassProp *= (CustomClass)null; - CustomClassProp.CustomClassField *= (CustomClass)null; - CustomClassProp.CustomClassProp *= (CustomClass)null; - GetClass().CustomClassField *= (CustomClass)null; - GetClass().CustomClassProp *= (CustomClass)null; -#if CS70 - GetRefStruct().CustomClassField *= (CustomClass)null; - GetRefStruct().CustomClassProp *= (CustomClass)null; - GetRefCustomClass() *= (CustomClass)null; + public static void CustomClassMultiplyTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + p *= (CustomClass)null; + num *= (CustomClass)null; + Use(ref num); + customClassField *= (CustomClass)null; + CustomClassProp *= (CustomClass)null; + c.CustomClassField *= (CustomClass)null; + c.CustomClassProp *= (CustomClass)null; + s.CustomClassField *= (CustomClass)null; + s.CustomClassProp *= (CustomClass)null; + customClassField.CustomClassField *= (CustomClass)null; + customClassField.CustomClassProp *= (CustomClass)null; + otherCustomStructField.CustomClassField *= (CustomClass)null; + otherCustomStructField.CustomClassProp *= (CustomClass)null; + CustomClassProp.CustomClassField *= (CustomClass)null; + CustomClassProp.CustomClassProp *= (CustomClass)null; + GetClass().CustomClassField *= (CustomClass)null; + GetClass().CustomClassProp *= (CustomClass)null; +#if CS70 + GetRefStruct().CustomClassField *= (CustomClass)null; + GetRefStruct().CustomClassProp *= (CustomClass)null; + GetRefCustomClass() *= (CustomClass)null; #endif - } + } - public static void CustomClassDivideTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - p /= (CustomClass)null; - num /= (CustomClass)null; - Use(ref num); - customClassField /= (CustomClass)null; - CustomClassProp /= (CustomClass)null; - c.CustomClassField /= (CustomClass)null; - c.CustomClassProp /= (CustomClass)null; - s.CustomClassField /= (CustomClass)null; - s.CustomClassProp /= (CustomClass)null; - customClassField.CustomClassField /= (CustomClass)null; - customClassField.CustomClassProp /= (CustomClass)null; - otherCustomStructField.CustomClassField /= (CustomClass)null; - otherCustomStructField.CustomClassProp /= (CustomClass)null; - CustomClassProp.CustomClassField /= (CustomClass)null; - CustomClassProp.CustomClassProp /= (CustomClass)null; - GetClass().CustomClassField /= (CustomClass)null; - GetClass().CustomClassProp /= (CustomClass)null; -#if CS70 - GetRefStruct().CustomClassField /= (CustomClass)null; - GetRefStruct().CustomClassProp /= (CustomClass)null; - GetRefCustomClass() /= (CustomClass)null; + public static void CustomClassDivideTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + p /= (CustomClass)null; + num /= (CustomClass)null; + Use(ref num); + customClassField /= (CustomClass)null; + CustomClassProp /= (CustomClass)null; + c.CustomClassField /= (CustomClass)null; + c.CustomClassProp /= (CustomClass)null; + s.CustomClassField /= (CustomClass)null; + s.CustomClassProp /= (CustomClass)null; + customClassField.CustomClassField /= (CustomClass)null; + customClassField.CustomClassProp /= (CustomClass)null; + otherCustomStructField.CustomClassField /= (CustomClass)null; + otherCustomStructField.CustomClassProp /= (CustomClass)null; + CustomClassProp.CustomClassField /= (CustomClass)null; + CustomClassProp.CustomClassProp /= (CustomClass)null; + GetClass().CustomClassField /= (CustomClass)null; + GetClass().CustomClassProp /= (CustomClass)null; +#if CS70 + GetRefStruct().CustomClassField /= (CustomClass)null; + GetRefStruct().CustomClassProp /= (CustomClass)null; + GetRefCustomClass() /= (CustomClass)null; #endif - } + } - public static void CustomClassModulusTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - p %= (CustomClass)null; - num %= (CustomClass)null; - Use(ref num); - customClassField %= (CustomClass)null; - CustomClassProp %= (CustomClass)null; - c.CustomClassField %= (CustomClass)null; - c.CustomClassProp %= (CustomClass)null; - s.CustomClassField %= (CustomClass)null; - s.CustomClassProp %= (CustomClass)null; - customClassField.CustomClassField %= (CustomClass)null; - customClassField.CustomClassProp %= (CustomClass)null; - otherCustomStructField.CustomClassField %= (CustomClass)null; - otherCustomStructField.CustomClassProp %= (CustomClass)null; - CustomClassProp.CustomClassField %= (CustomClass)null; - CustomClassProp.CustomClassProp %= (CustomClass)null; - GetClass().CustomClassField %= (CustomClass)null; - GetClass().CustomClassProp %= (CustomClass)null; -#if CS70 - GetRefStruct().CustomClassField %= (CustomClass)null; - GetRefStruct().CustomClassProp %= (CustomClass)null; - GetRefCustomClass() %= (CustomClass)null; + public static void CustomClassModulusTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + p %= (CustomClass)null; + num %= (CustomClass)null; + Use(ref num); + customClassField %= (CustomClass)null; + CustomClassProp %= (CustomClass)null; + c.CustomClassField %= (CustomClass)null; + c.CustomClassProp %= (CustomClass)null; + s.CustomClassField %= (CustomClass)null; + s.CustomClassProp %= (CustomClass)null; + customClassField.CustomClassField %= (CustomClass)null; + customClassField.CustomClassProp %= (CustomClass)null; + otherCustomStructField.CustomClassField %= (CustomClass)null; + otherCustomStructField.CustomClassProp %= (CustomClass)null; + CustomClassProp.CustomClassField %= (CustomClass)null; + CustomClassProp.CustomClassProp %= (CustomClass)null; + GetClass().CustomClassField %= (CustomClass)null; + GetClass().CustomClassProp %= (CustomClass)null; +#if CS70 + GetRefStruct().CustomClassField %= (CustomClass)null; + GetRefStruct().CustomClassProp %= (CustomClass)null; + GetRefCustomClass() %= (CustomClass)null; #endif - } + } - public static void CustomClassLeftShiftTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - p <<= 5; - num <<= 5; - Use(ref num); - customClassField <<= 5; - CustomClassProp <<= 5; - c.CustomClassField <<= 5; - c.CustomClassProp <<= 5; - s.CustomClassField <<= 5; - s.CustomClassProp <<= 5; - customClassField.CustomClassField <<= 5; - customClassField.CustomClassProp <<= 5; - otherCustomStructField.CustomClassField <<= 5; - otherCustomStructField.CustomClassProp <<= 5; - CustomClassProp.CustomClassField <<= 5; - CustomClassProp.CustomClassProp <<= 5; - GetClass().CustomClassField <<= 5; - GetClass().CustomClassProp <<= 5; -#if CS70 - GetRefStruct().CustomClassField <<= 5; - GetRefStruct().CustomClassProp <<= 5; - GetRefCustomClass() <<= 5; + public static void CustomClassLeftShiftTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + p <<= 5; + num <<= 5; + Use(ref num); + customClassField <<= 5; + CustomClassProp <<= 5; + c.CustomClassField <<= 5; + c.CustomClassProp <<= 5; + s.CustomClassField <<= 5; + s.CustomClassProp <<= 5; + customClassField.CustomClassField <<= 5; + customClassField.CustomClassProp <<= 5; + otherCustomStructField.CustomClassField <<= 5; + otherCustomStructField.CustomClassProp <<= 5; + CustomClassProp.CustomClassField <<= 5; + CustomClassProp.CustomClassProp <<= 5; + GetClass().CustomClassField <<= 5; + GetClass().CustomClassProp <<= 5; +#if CS70 + GetRefStruct().CustomClassField <<= 5; + GetRefStruct().CustomClassProp <<= 5; + GetRefCustomClass() <<= 5; #endif - } + } - public static void CustomClassRightShiftTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - p >>= 5; - num >>= 5; - Use(ref num); - customClassField >>= 5; - CustomClassProp >>= 5; - c.CustomClassField >>= 5; - c.CustomClassProp >>= 5; - s.CustomClassField >>= 5; - s.CustomClassProp >>= 5; - customClassField.CustomClassField >>= 5; - customClassField.CustomClassProp >>= 5; - otherCustomStructField.CustomClassField >>= 5; - otherCustomStructField.CustomClassProp >>= 5; - CustomClassProp.CustomClassField >>= 5; - CustomClassProp.CustomClassProp >>= 5; - GetClass().CustomClassField >>= 5; - GetClass().CustomClassProp >>= 5; -#if CS70 - GetRefStruct().CustomClassField >>= 5; - GetRefStruct().CustomClassProp >>= 5; - GetRefCustomClass() >>= 5; + public static void CustomClassRightShiftTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + p >>= 5; + num >>= 5; + Use(ref num); + customClassField >>= 5; + CustomClassProp >>= 5; + c.CustomClassField >>= 5; + c.CustomClassProp >>= 5; + s.CustomClassField >>= 5; + s.CustomClassProp >>= 5; + customClassField.CustomClassField >>= 5; + customClassField.CustomClassProp >>= 5; + otherCustomStructField.CustomClassField >>= 5; + otherCustomStructField.CustomClassProp >>= 5; + CustomClassProp.CustomClassField >>= 5; + CustomClassProp.CustomClassProp >>= 5; + GetClass().CustomClassField >>= 5; + GetClass().CustomClassProp >>= 5; +#if CS70 + GetRefStruct().CustomClassField >>= 5; + GetRefStruct().CustomClassProp >>= 5; + GetRefCustomClass() >>= 5; #endif - } + } - public static void CustomClassBitAndTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - p &= (CustomClass)null; - num &= (CustomClass)null; - Use(ref num); - customClassField &= (CustomClass)null; - CustomClassProp &= (CustomClass)null; - c.CustomClassField &= (CustomClass)null; - c.CustomClassProp &= (CustomClass)null; - s.CustomClassField &= (CustomClass)null; - s.CustomClassProp &= (CustomClass)null; - customClassField.CustomClassField &= (CustomClass)null; - customClassField.CustomClassProp &= (CustomClass)null; - otherCustomStructField.CustomClassField &= (CustomClass)null; - otherCustomStructField.CustomClassProp &= (CustomClass)null; - CustomClassProp.CustomClassField &= (CustomClass)null; - CustomClassProp.CustomClassProp &= (CustomClass)null; - GetClass().CustomClassField &= (CustomClass)null; - GetClass().CustomClassProp &= (CustomClass)null; -#if CS70 - GetRefStruct().CustomClassField &= (CustomClass)null; - GetRefStruct().CustomClassProp &= (CustomClass)null; - GetRefCustomClass() &= (CustomClass)null; + public static void CustomClassBitAndTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + p &= (CustomClass)null; + num &= (CustomClass)null; + Use(ref num); + customClassField &= (CustomClass)null; + CustomClassProp &= (CustomClass)null; + c.CustomClassField &= (CustomClass)null; + c.CustomClassProp &= (CustomClass)null; + s.CustomClassField &= (CustomClass)null; + s.CustomClassProp &= (CustomClass)null; + customClassField.CustomClassField &= (CustomClass)null; + customClassField.CustomClassProp &= (CustomClass)null; + otherCustomStructField.CustomClassField &= (CustomClass)null; + otherCustomStructField.CustomClassProp &= (CustomClass)null; + CustomClassProp.CustomClassField &= (CustomClass)null; + CustomClassProp.CustomClassProp &= (CustomClass)null; + GetClass().CustomClassField &= (CustomClass)null; + GetClass().CustomClassProp &= (CustomClass)null; +#if CS70 + GetRefStruct().CustomClassField &= (CustomClass)null; + GetRefStruct().CustomClassProp &= (CustomClass)null; + GetRefCustomClass() &= (CustomClass)null; #endif - } + } - public static void CustomClassBitOrTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - p |= (CustomClass)null; - num |= (CustomClass)null; - Use(ref num); - customClassField |= (CustomClass)null; - CustomClassProp |= (CustomClass)null; - c.CustomClassField |= (CustomClass)null; - c.CustomClassProp |= (CustomClass)null; - s.CustomClassField |= (CustomClass)null; - s.CustomClassProp |= (CustomClass)null; - customClassField.CustomClassField |= (CustomClass)null; - customClassField.CustomClassProp |= (CustomClass)null; - otherCustomStructField.CustomClassField |= (CustomClass)null; - otherCustomStructField.CustomClassProp |= (CustomClass)null; - CustomClassProp.CustomClassField |= (CustomClass)null; - CustomClassProp.CustomClassProp |= (CustomClass)null; - GetClass().CustomClassField |= (CustomClass)null; - GetClass().CustomClassProp |= (CustomClass)null; -#if CS70 - GetRefStruct().CustomClassField |= (CustomClass)null; - GetRefStruct().CustomClassProp |= (CustomClass)null; - GetRefCustomClass() |= (CustomClass)null; + public static void CustomClassBitOrTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + p |= (CustomClass)null; + num |= (CustomClass)null; + Use(ref num); + customClassField |= (CustomClass)null; + CustomClassProp |= (CustomClass)null; + c.CustomClassField |= (CustomClass)null; + c.CustomClassProp |= (CustomClass)null; + s.CustomClassField |= (CustomClass)null; + s.CustomClassProp |= (CustomClass)null; + customClassField.CustomClassField |= (CustomClass)null; + customClassField.CustomClassProp |= (CustomClass)null; + otherCustomStructField.CustomClassField |= (CustomClass)null; + otherCustomStructField.CustomClassProp |= (CustomClass)null; + CustomClassProp.CustomClassField |= (CustomClass)null; + CustomClassProp.CustomClassProp |= (CustomClass)null; + GetClass().CustomClassField |= (CustomClass)null; + GetClass().CustomClassProp |= (CustomClass)null; +#if CS70 + GetRefStruct().CustomClassField |= (CustomClass)null; + GetRefStruct().CustomClassProp |= (CustomClass)null; + GetRefCustomClass() |= (CustomClass)null; #endif - } + } - public static void CustomClassBitXorTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - p ^= (CustomClass)null; - num ^= (CustomClass)null; - Use(ref num); - customClassField ^= (CustomClass)null; - CustomClassProp ^= (CustomClass)null; - c.CustomClassField ^= (CustomClass)null; - c.CustomClassProp ^= (CustomClass)null; - s.CustomClassField ^= (CustomClass)null; - s.CustomClassProp ^= (CustomClass)null; - customClassField.CustomClassField ^= (CustomClass)null; - customClassField.CustomClassProp ^= (CustomClass)null; - otherCustomStructField.CustomClassField ^= (CustomClass)null; - otherCustomStructField.CustomClassProp ^= (CustomClass)null; - CustomClassProp.CustomClassField ^= (CustomClass)null; - CustomClassProp.CustomClassProp ^= (CustomClass)null; - GetClass().CustomClassField ^= (CustomClass)null; - GetClass().CustomClassProp ^= (CustomClass)null; -#if CS70 - GetRefStruct().CustomClassField ^= (CustomClass)null; - GetRefStruct().CustomClassProp ^= (CustomClass)null; - GetRefCustomClass() ^= (CustomClass)null; + public static void CustomClassBitXorTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + p ^= (CustomClass)null; + num ^= (CustomClass)null; + Use(ref num); + customClassField ^= (CustomClass)null; + CustomClassProp ^= (CustomClass)null; + c.CustomClassField ^= (CustomClass)null; + c.CustomClassProp ^= (CustomClass)null; + s.CustomClassField ^= (CustomClass)null; + s.CustomClassProp ^= (CustomClass)null; + customClassField.CustomClassField ^= (CustomClass)null; + customClassField.CustomClassProp ^= (CustomClass)null; + otherCustomStructField.CustomClassField ^= (CustomClass)null; + otherCustomStructField.CustomClassProp ^= (CustomClass)null; + CustomClassProp.CustomClassField ^= (CustomClass)null; + CustomClassProp.CustomClassProp ^= (CustomClass)null; + GetClass().CustomClassField ^= (CustomClass)null; + GetClass().CustomClassProp ^= (CustomClass)null; +#if CS70 + GetRefStruct().CustomClassField ^= (CustomClass)null; + GetRefStruct().CustomClassProp ^= (CustomClass)null; + GetRefCustomClass() ^= (CustomClass)null; #endif - } + } - public static void CustomClassPostIncTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - X(p++); - X(num++); - Use(ref num); - X(customClassField++); - X(CustomClassProp++); - X(c.CustomClassField++); - X(c.CustomClassProp++); - X(s.CustomClassField++); - X(s.CustomClassProp++); - X(customClassField.CustomClassField++); - X(customClassField.CustomClassProp++); - X(otherCustomStructField.CustomClassField++); - X(otherCustomStructField.CustomClassProp++); - X(CustomClassProp.CustomClassField++); - X(CustomClassProp.CustomClassProp++); - X(GetClass().CustomClassField++); - X(GetClass().CustomClassProp++); -#if CS70 - X(GetRefStruct().CustomClassField++); - X(GetRefStruct().CustomClassProp++); - X(GetRefCustomClass()++); + public static void CustomClassPostIncTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + X(p++); + X(num++); + Use(ref num); + X(customClassField++); + X(CustomClassProp++); + X(c.CustomClassField++); + X(c.CustomClassProp++); + X(s.CustomClassField++); + X(s.CustomClassProp++); + X(customClassField.CustomClassField++); + X(customClassField.CustomClassProp++); + X(otherCustomStructField.CustomClassField++); + X(otherCustomStructField.CustomClassProp++); + X(CustomClassProp.CustomClassField++); + X(CustomClassProp.CustomClassProp++); + X(GetClass().CustomClassField++); + X(GetClass().CustomClassProp++); +#if CS70 + X(GetRefStruct().CustomClassField++); + X(GetRefStruct().CustomClassProp++); + X(GetRefCustomClass()++); #endif - } + } - public static void CustomClassPreIncTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - X(++p); - X(++num); - Use(ref num); - X(++customClassField); - X(++CustomClassProp); - X(++c.CustomClassField); - X(++c.CustomClassProp); - X(++s.CustomClassField); - X(++s.CustomClassProp); - X(++customClassField.CustomClassField); - X(++customClassField.CustomClassProp); - X(++otherCustomStructField.CustomClassField); - X(++otherCustomStructField.CustomClassProp); - X(++CustomClassProp.CustomClassField); - X(++CustomClassProp.CustomClassProp); - X(++GetClass().CustomClassField); - X(++GetClass().CustomClassProp); -#if CS70 - X(++GetRefStruct().CustomClassField); - X(++GetRefStruct().CustomClassProp); - X(++GetRefCustomClass()); + public static void CustomClassPreIncTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + X(++p); + X(++num); + Use(ref num); + X(++customClassField); + X(++CustomClassProp); + X(++c.CustomClassField); + X(++c.CustomClassProp); + X(++s.CustomClassField); + X(++s.CustomClassProp); + X(++customClassField.CustomClassField); + X(++customClassField.CustomClassProp); + X(++otherCustomStructField.CustomClassField); + X(++otherCustomStructField.CustomClassProp); + X(++CustomClassProp.CustomClassField); + X(++CustomClassProp.CustomClassProp); + X(++GetClass().CustomClassField); + X(++GetClass().CustomClassProp); +#if CS70 + X(++GetRefStruct().CustomClassField); + X(++GetRefStruct().CustomClassProp); + X(++GetRefCustomClass()); #endif - } - public static void CustomClassPostDecTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - X(p--); - X(num--); - Use(ref num); - X(customClassField--); - X(CustomClassProp--); - X(c.CustomClassField--); - X(c.CustomClassProp--); - X(s.CustomClassField--); - X(s.CustomClassProp--); - X(customClassField.CustomClassField--); - X(customClassField.CustomClassProp--); - X(otherCustomStructField.CustomClassField--); - X(otherCustomStructField.CustomClassProp--); - X(CustomClassProp.CustomClassField--); - X(CustomClassProp.CustomClassProp--); - X(GetClass().CustomClassField--); - X(GetClass().CustomClassProp--); -#if CS70 - X(GetRefStruct().CustomClassField--); - X(GetRefStruct().CustomClassProp--); - X(GetRefCustomClass()--); + } + public static void CustomClassPostDecTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + X(p--); + X(num--); + Use(ref num); + X(customClassField--); + X(CustomClassProp--); + X(c.CustomClassField--); + X(c.CustomClassProp--); + X(s.CustomClassField--); + X(s.CustomClassProp--); + X(customClassField.CustomClassField--); + X(customClassField.CustomClassProp--); + X(otherCustomStructField.CustomClassField--); + X(otherCustomStructField.CustomClassProp--); + X(CustomClassProp.CustomClassField--); + X(CustomClassProp.CustomClassProp--); + X(GetClass().CustomClassField--); + X(GetClass().CustomClassProp--); +#if CS70 + X(GetRefStruct().CustomClassField--); + X(GetRefStruct().CustomClassProp--); + X(GetRefCustomClass()--); #endif - } + } - public static void CustomClassPreDecTest(CustomClass p, CustomClass c, CustomStruct2 s) - { - CustomClass num = null; - X(--p); - X(--num); - Use(ref num); - X(--customClassField); - X(--CustomClassProp); - X(--c.CustomClassField); - X(--c.CustomClassProp); - X(--s.CustomClassField); - X(--s.CustomClassProp); - X(--customClassField.CustomClassField); - X(--customClassField.CustomClassProp); - X(--otherCustomStructField.CustomClassField); - X(--otherCustomStructField.CustomClassProp); - X(--CustomClassProp.CustomClassField); - X(--CustomClassProp.CustomClassProp); - X(--GetClass().CustomClassField); - X(--GetClass().CustomClassProp); -#if CS70 - X(--GetRefStruct().CustomClassField); - X(--GetRefStruct().CustomClassProp); - X(--GetRefCustomClass()); + public static void CustomClassPreDecTest(CustomClass p, CustomClass c, CustomStruct2 s) + { + CustomClass num = null; + X(--p); + X(--num); + Use(ref num); + X(--customClassField); + X(--CustomClassProp); + X(--c.CustomClassField); + X(--c.CustomClassProp); + X(--s.CustomClassField); + X(--s.CustomClassProp); + X(--customClassField.CustomClassField); + X(--customClassField.CustomClassProp); + X(--otherCustomStructField.CustomClassField); + X(--otherCustomStructField.CustomClassProp); + X(--CustomClassProp.CustomClassField); + X(--CustomClassProp.CustomClassProp); + X(--GetClass().CustomClassField); + X(--GetClass().CustomClassProp); +#if CS70 + X(--GetRefStruct().CustomClassField); + X(--GetRefStruct().CustomClassProp); + X(--GetRefCustomClass()); #endif - } - public static void CustomStructAddTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - p += default(CustomStruct); - num += default(CustomStruct); - Use(ref num); - customStructField += default(CustomStruct); - CustomStructProp += default(CustomStruct); - c.CustomStructField += default(CustomStruct); - c.CustomStructProp += default(CustomStruct); - s.CustomStructField += default(CustomStruct); - s.CustomStructProp += default(CustomStruct); - customClassField.CustomStructField += default(CustomStruct); - customClassField.CustomStructProp += default(CustomStruct); - otherCustomStructField.CustomStructField += default(CustomStruct); - otherCustomStructField.CustomStructProp += default(CustomStruct); - CustomClassProp.CustomStructField += default(CustomStruct); - CustomClassProp.CustomStructProp += default(CustomStruct); - GetClass().CustomStructField += default(CustomStruct); - GetClass().CustomStructProp += default(CustomStruct); -#if CS70 - GetRefStruct().CustomStructField += default(CustomStruct); - GetRefStruct().CustomStructProp += default(CustomStruct); - GetRefCustomStruct() += default(CustomStruct); + } + public static void CustomStructAddTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + p += default(CustomStruct); + num += default(CustomStruct); + Use(ref num); + customStructField += default(CustomStruct); + CustomStructProp += default(CustomStruct); + c.CustomStructField += default(CustomStruct); + c.CustomStructProp += default(CustomStruct); + s.CustomStructField += default(CustomStruct); + s.CustomStructProp += default(CustomStruct); + customClassField.CustomStructField += default(CustomStruct); + customClassField.CustomStructProp += default(CustomStruct); + otherCustomStructField.CustomStructField += default(CustomStruct); + otherCustomStructField.CustomStructProp += default(CustomStruct); + CustomClassProp.CustomStructField += default(CustomStruct); + CustomClassProp.CustomStructProp += default(CustomStruct); + GetClass().CustomStructField += default(CustomStruct); + GetClass().CustomStructProp += default(CustomStruct); +#if CS70 + GetRefStruct().CustomStructField += default(CustomStruct); + GetRefStruct().CustomStructProp += default(CustomStruct); + GetRefCustomStruct() += default(CustomStruct); #endif - } + } - public static void CustomStructSubtractTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - p -= default(CustomStruct); - num -= default(CustomStruct); - Use(ref num); - customStructField -= default(CustomStruct); - CustomStructProp -= default(CustomStruct); - c.CustomStructField -= default(CustomStruct); - c.CustomStructProp -= default(CustomStruct); - s.CustomStructField -= default(CustomStruct); - s.CustomStructProp -= default(CustomStruct); - customClassField.CustomStructField -= default(CustomStruct); - customClassField.CustomStructProp -= default(CustomStruct); - otherCustomStructField.CustomStructField -= default(CustomStruct); - otherCustomStructField.CustomStructProp -= default(CustomStruct); - CustomClassProp.CustomStructField -= default(CustomStruct); - CustomClassProp.CustomStructProp -= default(CustomStruct); - GetClass().CustomStructField -= default(CustomStruct); - GetClass().CustomStructProp -= default(CustomStruct); -#if CS70 - GetRefStruct().CustomStructField -= default(CustomStruct); - GetRefStruct().CustomStructProp -= default(CustomStruct); - GetRefCustomStruct() -= default(CustomStruct); + public static void CustomStructSubtractTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + p -= default(CustomStruct); + num -= default(CustomStruct); + Use(ref num); + customStructField -= default(CustomStruct); + CustomStructProp -= default(CustomStruct); + c.CustomStructField -= default(CustomStruct); + c.CustomStructProp -= default(CustomStruct); + s.CustomStructField -= default(CustomStruct); + s.CustomStructProp -= default(CustomStruct); + customClassField.CustomStructField -= default(CustomStruct); + customClassField.CustomStructProp -= default(CustomStruct); + otherCustomStructField.CustomStructField -= default(CustomStruct); + otherCustomStructField.CustomStructProp -= default(CustomStruct); + CustomClassProp.CustomStructField -= default(CustomStruct); + CustomClassProp.CustomStructProp -= default(CustomStruct); + GetClass().CustomStructField -= default(CustomStruct); + GetClass().CustomStructProp -= default(CustomStruct); +#if CS70 + GetRefStruct().CustomStructField -= default(CustomStruct); + GetRefStruct().CustomStructProp -= default(CustomStruct); + GetRefCustomStruct() -= default(CustomStruct); #endif - } + } - public static void CustomStructMultiplyTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - p *= default(CustomStruct); - num *= default(CustomStruct); - Use(ref num); - customStructField *= default(CustomStruct); - CustomStructProp *= default(CustomStruct); - c.CustomStructField *= default(CustomStruct); - c.CustomStructProp *= default(CustomStruct); - s.CustomStructField *= default(CustomStruct); - s.CustomStructProp *= default(CustomStruct); - customClassField.CustomStructField *= default(CustomStruct); - customClassField.CustomStructProp *= default(CustomStruct); - otherCustomStructField.CustomStructField *= default(CustomStruct); - otherCustomStructField.CustomStructProp *= default(CustomStruct); - CustomClassProp.CustomStructField *= default(CustomStruct); - CustomClassProp.CustomStructProp *= default(CustomStruct); - GetClass().CustomStructField *= default(CustomStruct); - GetClass().CustomStructProp *= default(CustomStruct); -#if CS70 - GetRefStruct().CustomStructField *= default(CustomStruct); - GetRefStruct().CustomStructProp *= default(CustomStruct); - GetRefCustomStruct() *= default(CustomStruct); + public static void CustomStructMultiplyTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + p *= default(CustomStruct); + num *= default(CustomStruct); + Use(ref num); + customStructField *= default(CustomStruct); + CustomStructProp *= default(CustomStruct); + c.CustomStructField *= default(CustomStruct); + c.CustomStructProp *= default(CustomStruct); + s.CustomStructField *= default(CustomStruct); + s.CustomStructProp *= default(CustomStruct); + customClassField.CustomStructField *= default(CustomStruct); + customClassField.CustomStructProp *= default(CustomStruct); + otherCustomStructField.CustomStructField *= default(CustomStruct); + otherCustomStructField.CustomStructProp *= default(CustomStruct); + CustomClassProp.CustomStructField *= default(CustomStruct); + CustomClassProp.CustomStructProp *= default(CustomStruct); + GetClass().CustomStructField *= default(CustomStruct); + GetClass().CustomStructProp *= default(CustomStruct); +#if CS70 + GetRefStruct().CustomStructField *= default(CustomStruct); + GetRefStruct().CustomStructProp *= default(CustomStruct); + GetRefCustomStruct() *= default(CustomStruct); #endif - } + } - public static void CustomStructDivideTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - p /= default(CustomStruct); - num /= default(CustomStruct); - Use(ref num); - customStructField /= default(CustomStruct); - CustomStructProp /= default(CustomStruct); - c.CustomStructField /= default(CustomStruct); - c.CustomStructProp /= default(CustomStruct); - s.CustomStructField /= default(CustomStruct); - s.CustomStructProp /= default(CustomStruct); - customClassField.CustomStructField /= default(CustomStruct); - customClassField.CustomStructProp /= default(CustomStruct); - otherCustomStructField.CustomStructField /= default(CustomStruct); - otherCustomStructField.CustomStructProp /= default(CustomStruct); - CustomClassProp.CustomStructField /= default(CustomStruct); - CustomClassProp.CustomStructProp /= default(CustomStruct); - GetClass().CustomStructField /= default(CustomStruct); - GetClass().CustomStructProp /= default(CustomStruct); -#if CS70 - GetRefStruct().CustomStructField /= default(CustomStruct); - GetRefStruct().CustomStructProp /= default(CustomStruct); - GetRefCustomStruct() /= default(CustomStruct); + public static void CustomStructDivideTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + p /= default(CustomStruct); + num /= default(CustomStruct); + Use(ref num); + customStructField /= default(CustomStruct); + CustomStructProp /= default(CustomStruct); + c.CustomStructField /= default(CustomStruct); + c.CustomStructProp /= default(CustomStruct); + s.CustomStructField /= default(CustomStruct); + s.CustomStructProp /= default(CustomStruct); + customClassField.CustomStructField /= default(CustomStruct); + customClassField.CustomStructProp /= default(CustomStruct); + otherCustomStructField.CustomStructField /= default(CustomStruct); + otherCustomStructField.CustomStructProp /= default(CustomStruct); + CustomClassProp.CustomStructField /= default(CustomStruct); + CustomClassProp.CustomStructProp /= default(CustomStruct); + GetClass().CustomStructField /= default(CustomStruct); + GetClass().CustomStructProp /= default(CustomStruct); +#if CS70 + GetRefStruct().CustomStructField /= default(CustomStruct); + GetRefStruct().CustomStructProp /= default(CustomStruct); + GetRefCustomStruct() /= default(CustomStruct); #endif - } + } - public static void CustomStructModulusTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - p %= default(CustomStruct); - num %= default(CustomStruct); - Use(ref num); - customStructField %= default(CustomStruct); - CustomStructProp %= default(CustomStruct); - c.CustomStructField %= default(CustomStruct); - c.CustomStructProp %= default(CustomStruct); - s.CustomStructField %= default(CustomStruct); - s.CustomStructProp %= default(CustomStruct); - customClassField.CustomStructField %= default(CustomStruct); - customClassField.CustomStructProp %= default(CustomStruct); - otherCustomStructField.CustomStructField %= default(CustomStruct); - otherCustomStructField.CustomStructProp %= default(CustomStruct); - CustomClassProp.CustomStructField %= default(CustomStruct); - CustomClassProp.CustomStructProp %= default(CustomStruct); - GetClass().CustomStructField %= default(CustomStruct); - GetClass().CustomStructProp %= default(CustomStruct); -#if CS70 - GetRefStruct().CustomStructField %= default(CustomStruct); - GetRefStruct().CustomStructProp %= default(CustomStruct); - GetRefCustomStruct() %= default(CustomStruct); + public static void CustomStructModulusTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + p %= default(CustomStruct); + num %= default(CustomStruct); + Use(ref num); + customStructField %= default(CustomStruct); + CustomStructProp %= default(CustomStruct); + c.CustomStructField %= default(CustomStruct); + c.CustomStructProp %= default(CustomStruct); + s.CustomStructField %= default(CustomStruct); + s.CustomStructProp %= default(CustomStruct); + customClassField.CustomStructField %= default(CustomStruct); + customClassField.CustomStructProp %= default(CustomStruct); + otherCustomStructField.CustomStructField %= default(CustomStruct); + otherCustomStructField.CustomStructProp %= default(CustomStruct); + CustomClassProp.CustomStructField %= default(CustomStruct); + CustomClassProp.CustomStructProp %= default(CustomStruct); + GetClass().CustomStructField %= default(CustomStruct); + GetClass().CustomStructProp %= default(CustomStruct); +#if CS70 + GetRefStruct().CustomStructField %= default(CustomStruct); + GetRefStruct().CustomStructProp %= default(CustomStruct); + GetRefCustomStruct() %= default(CustomStruct); #endif - } + } - public static void CustomStructLeftShiftTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - p <<= 5; - num <<= 5; - Use(ref num); - customStructField <<= 5; - CustomStructProp <<= 5; - c.CustomStructField <<= 5; - c.CustomStructProp <<= 5; - s.CustomStructField <<= 5; - s.CustomStructProp <<= 5; - customClassField.CustomStructField <<= 5; - customClassField.CustomStructProp <<= 5; - otherCustomStructField.CustomStructField <<= 5; - otherCustomStructField.CustomStructProp <<= 5; - CustomClassProp.CustomStructField <<= 5; - CustomClassProp.CustomStructProp <<= 5; - GetClass().CustomStructField <<= 5; - GetClass().CustomStructProp <<= 5; -#if CS70 - GetRefStruct().CustomStructField <<= 5; - GetRefStruct().CustomStructProp <<= 5; - GetRefCustomStruct() <<= 5; + public static void CustomStructLeftShiftTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + p <<= 5; + num <<= 5; + Use(ref num); + customStructField <<= 5; + CustomStructProp <<= 5; + c.CustomStructField <<= 5; + c.CustomStructProp <<= 5; + s.CustomStructField <<= 5; + s.CustomStructProp <<= 5; + customClassField.CustomStructField <<= 5; + customClassField.CustomStructProp <<= 5; + otherCustomStructField.CustomStructField <<= 5; + otherCustomStructField.CustomStructProp <<= 5; + CustomClassProp.CustomStructField <<= 5; + CustomClassProp.CustomStructProp <<= 5; + GetClass().CustomStructField <<= 5; + GetClass().CustomStructProp <<= 5; +#if CS70 + GetRefStruct().CustomStructField <<= 5; + GetRefStruct().CustomStructProp <<= 5; + GetRefCustomStruct() <<= 5; #endif - } + } - public static void CustomStructRightShiftTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - p >>= 5; - num >>= 5; - Use(ref num); - customStructField >>= 5; - CustomStructProp >>= 5; - c.CustomStructField >>= 5; - c.CustomStructProp >>= 5; - s.CustomStructField >>= 5; - s.CustomStructProp >>= 5; - customClassField.CustomStructField >>= 5; - customClassField.CustomStructProp >>= 5; - otherCustomStructField.CustomStructField >>= 5; - otherCustomStructField.CustomStructProp >>= 5; - CustomClassProp.CustomStructField >>= 5; - CustomClassProp.CustomStructProp >>= 5; - GetClass().CustomStructField >>= 5; - GetClass().CustomStructProp >>= 5; -#if CS70 - GetRefStruct().CustomStructField >>= 5; - GetRefStruct().CustomStructProp >>= 5; - GetRefCustomStruct() >>= 5; + public static void CustomStructRightShiftTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + p >>= 5; + num >>= 5; + Use(ref num); + customStructField >>= 5; + CustomStructProp >>= 5; + c.CustomStructField >>= 5; + c.CustomStructProp >>= 5; + s.CustomStructField >>= 5; + s.CustomStructProp >>= 5; + customClassField.CustomStructField >>= 5; + customClassField.CustomStructProp >>= 5; + otherCustomStructField.CustomStructField >>= 5; + otherCustomStructField.CustomStructProp >>= 5; + CustomClassProp.CustomStructField >>= 5; + CustomClassProp.CustomStructProp >>= 5; + GetClass().CustomStructField >>= 5; + GetClass().CustomStructProp >>= 5; +#if CS70 + GetRefStruct().CustomStructField >>= 5; + GetRefStruct().CustomStructProp >>= 5; + GetRefCustomStruct() >>= 5; #endif - } + } #if CS110 - public static void CustomStructUnsignedRightShiftTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - //CustomStruct l = default(CustomStruct); - //p >>>= 5; - //l >>>= 5; - customStructField >>>= 5; - CustomStructProp >>>= 5; - c.CustomStructField >>>= 5; - c.CustomStructProp >>>= 5; - s.CustomStructField >>>= 5; - s.CustomStructProp >>>= 5; - customClassField.CustomStructField >>>= 5; - customClassField.CustomStructProp >>>= 5; - otherCustomStructField.CustomStructField >>>= 5; - otherCustomStructField.CustomStructProp >>>= 5; - CustomClassProp.CustomStructField >>>= 5; - CustomClassProp.CustomStructProp >>>= 5; - GetClass().CustomStructField >>>= 5; - GetClass().CustomStructProp >>>= 5; - GetRefStruct().CustomStructField >>>= 5; - GetRefStruct().CustomStructProp >>>= 5; - GetRefCustomStruct() >>>= 5; - } + public static void CustomStructUnsignedRightShiftTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + //CustomStruct l = default(CustomStruct); + //p >>>= 5; + //l >>>= 5; + customStructField >>>= 5; + CustomStructProp >>>= 5; + c.CustomStructField >>>= 5; + c.CustomStructProp >>>= 5; + s.CustomStructField >>>= 5; + s.CustomStructProp >>>= 5; + customClassField.CustomStructField >>>= 5; + customClassField.CustomStructProp >>>= 5; + otherCustomStructField.CustomStructField >>>= 5; + otherCustomStructField.CustomStructProp >>>= 5; + CustomClassProp.CustomStructField >>>= 5; + CustomClassProp.CustomStructProp >>>= 5; + GetClass().CustomStructField >>>= 5; + GetClass().CustomStructProp >>>= 5; + GetRefStruct().CustomStructField >>>= 5; + GetRefStruct().CustomStructProp >>>= 5; + GetRefCustomStruct() >>>= 5; + } #endif - public static void CustomStructBitAndTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - p &= default(CustomStruct); - num &= default(CustomStruct); - Use(ref num); - customStructField &= default(CustomStruct); - CustomStructProp &= default(CustomStruct); - c.CustomStructField &= default(CustomStruct); - c.CustomStructProp &= default(CustomStruct); - s.CustomStructField &= default(CustomStruct); - s.CustomStructProp &= default(CustomStruct); - customClassField.CustomStructField &= default(CustomStruct); - customClassField.CustomStructProp &= default(CustomStruct); - otherCustomStructField.CustomStructField &= default(CustomStruct); - otherCustomStructField.CustomStructProp &= default(CustomStruct); - CustomClassProp.CustomStructField &= default(CustomStruct); - CustomClassProp.CustomStructProp &= default(CustomStruct); - GetClass().CustomStructField &= default(CustomStruct); - GetClass().CustomStructProp &= default(CustomStruct); -#if CS70 - GetRefStruct().CustomStructField &= default(CustomStruct); - GetRefStruct().CustomStructProp &= default(CustomStruct); - GetRefCustomStruct() &= default(CustomStruct); + public static void CustomStructBitAndTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + p &= default(CustomStruct); + num &= default(CustomStruct); + Use(ref num); + customStructField &= default(CustomStruct); + CustomStructProp &= default(CustomStruct); + c.CustomStructField &= default(CustomStruct); + c.CustomStructProp &= default(CustomStruct); + s.CustomStructField &= default(CustomStruct); + s.CustomStructProp &= default(CustomStruct); + customClassField.CustomStructField &= default(CustomStruct); + customClassField.CustomStructProp &= default(CustomStruct); + otherCustomStructField.CustomStructField &= default(CustomStruct); + otherCustomStructField.CustomStructProp &= default(CustomStruct); + CustomClassProp.CustomStructField &= default(CustomStruct); + CustomClassProp.CustomStructProp &= default(CustomStruct); + GetClass().CustomStructField &= default(CustomStruct); + GetClass().CustomStructProp &= default(CustomStruct); +#if CS70 + GetRefStruct().CustomStructField &= default(CustomStruct); + GetRefStruct().CustomStructProp &= default(CustomStruct); + GetRefCustomStruct() &= default(CustomStruct); #endif - } + } - public static void CustomStructBitOrTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - p |= default(CustomStruct); - num |= default(CustomStruct); - Use(ref num); - customStructField |= default(CustomStruct); - CustomStructProp |= default(CustomStruct); - c.CustomStructField |= default(CustomStruct); - c.CustomStructProp |= default(CustomStruct); - s.CustomStructField |= default(CustomStruct); - s.CustomStructProp |= default(CustomStruct); - customClassField.CustomStructField |= default(CustomStruct); - customClassField.CustomStructProp |= default(CustomStruct); - otherCustomStructField.CustomStructField |= default(CustomStruct); - otherCustomStructField.CustomStructProp |= default(CustomStruct); - CustomClassProp.CustomStructField |= default(CustomStruct); - CustomClassProp.CustomStructProp |= default(CustomStruct); - GetClass().CustomStructField |= default(CustomStruct); - GetClass().CustomStructProp |= default(CustomStruct); -#if CS70 - GetRefStruct().CustomStructField |= default(CustomStruct); - GetRefStruct().CustomStructProp |= default(CustomStruct); - GetRefCustomStruct() |= default(CustomStruct); + public static void CustomStructBitOrTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + p |= default(CustomStruct); + num |= default(CustomStruct); + Use(ref num); + customStructField |= default(CustomStruct); + CustomStructProp |= default(CustomStruct); + c.CustomStructField |= default(CustomStruct); + c.CustomStructProp |= default(CustomStruct); + s.CustomStructField |= default(CustomStruct); + s.CustomStructProp |= default(CustomStruct); + customClassField.CustomStructField |= default(CustomStruct); + customClassField.CustomStructProp |= default(CustomStruct); + otherCustomStructField.CustomStructField |= default(CustomStruct); + otherCustomStructField.CustomStructProp |= default(CustomStruct); + CustomClassProp.CustomStructField |= default(CustomStruct); + CustomClassProp.CustomStructProp |= default(CustomStruct); + GetClass().CustomStructField |= default(CustomStruct); + GetClass().CustomStructProp |= default(CustomStruct); +#if CS70 + GetRefStruct().CustomStructField |= default(CustomStruct); + GetRefStruct().CustomStructProp |= default(CustomStruct); + GetRefCustomStruct() |= default(CustomStruct); #endif - } + } - public static void CustomStructBitXorTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - p ^= default(CustomStruct); - num ^= default(CustomStruct); - Use(ref num); - customStructField ^= default(CustomStruct); - CustomStructProp ^= default(CustomStruct); - c.CustomStructField ^= default(CustomStruct); - c.CustomStructProp ^= default(CustomStruct); - s.CustomStructField ^= default(CustomStruct); - s.CustomStructProp ^= default(CustomStruct); - customClassField.CustomStructField ^= default(CustomStruct); - customClassField.CustomStructProp ^= default(CustomStruct); - otherCustomStructField.CustomStructField ^= default(CustomStruct); - otherCustomStructField.CustomStructProp ^= default(CustomStruct); - CustomClassProp.CustomStructField ^= default(CustomStruct); - CustomClassProp.CustomStructProp ^= default(CustomStruct); - GetClass().CustomStructField ^= default(CustomStruct); - GetClass().CustomStructProp ^= default(CustomStruct); -#if CS70 - GetRefStruct().CustomStructField ^= default(CustomStruct); - GetRefStruct().CustomStructProp ^= default(CustomStruct); - GetRefCustomStruct() ^= default(CustomStruct); + public static void CustomStructBitXorTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + p ^= default(CustomStruct); + num ^= default(CustomStruct); + Use(ref num); + customStructField ^= default(CustomStruct); + CustomStructProp ^= default(CustomStruct); + c.CustomStructField ^= default(CustomStruct); + c.CustomStructProp ^= default(CustomStruct); + s.CustomStructField ^= default(CustomStruct); + s.CustomStructProp ^= default(CustomStruct); + customClassField.CustomStructField ^= default(CustomStruct); + customClassField.CustomStructProp ^= default(CustomStruct); + otherCustomStructField.CustomStructField ^= default(CustomStruct); + otherCustomStructField.CustomStructProp ^= default(CustomStruct); + CustomClassProp.CustomStructField ^= default(CustomStruct); + CustomClassProp.CustomStructProp ^= default(CustomStruct); + GetClass().CustomStructField ^= default(CustomStruct); + GetClass().CustomStructProp ^= default(CustomStruct); +#if CS70 + GetRefStruct().CustomStructField ^= default(CustomStruct); + GetRefStruct().CustomStructProp ^= default(CustomStruct); + GetRefCustomStruct() ^= default(CustomStruct); #endif - } + } - public static void CustomStructPostIncTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - X(p++); - X(num++); - Use(ref num); - X(customStructField++); - X(CustomStructProp++); - X(c.CustomStructField++); - X(c.CustomStructProp++); - X(s.CustomStructField++); - X(s.CustomStructProp++); - X(customClassField.CustomStructField++); - X(customClassField.CustomStructProp++); - X(otherCustomStructField.CustomStructField++); - X(otherCustomStructField.CustomStructProp++); - X(CustomClassProp.CustomStructField++); - X(CustomClassProp.CustomStructProp++); - X(GetClass().CustomStructField++); - X(GetClass().CustomStructProp++); -#if CS70 - X(GetRefStruct().CustomStructField++); - X(GetRefStruct().CustomStructProp++); - X(GetRefCustomStruct()++); + public static void CustomStructPostIncTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + X(p++); + X(num++); + Use(ref num); + X(customStructField++); + X(CustomStructProp++); + X(c.CustomStructField++); + X(c.CustomStructProp++); + X(s.CustomStructField++); + X(s.CustomStructProp++); + X(customClassField.CustomStructField++); + X(customClassField.CustomStructProp++); + X(otherCustomStructField.CustomStructField++); + X(otherCustomStructField.CustomStructProp++); + X(CustomClassProp.CustomStructField++); + X(CustomClassProp.CustomStructProp++); + X(GetClass().CustomStructField++); + X(GetClass().CustomStructProp++); +#if CS70 + X(GetRefStruct().CustomStructField++); + X(GetRefStruct().CustomStructProp++); + X(GetRefCustomStruct()++); #endif - } + } - public static void CustomStructPreIncTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - X(++p); - X(++num); - Use(ref num); - X(++customStructField); - X(++CustomStructProp); - X(++c.CustomStructField); - X(++c.CustomStructProp); - X(++s.CustomStructField); - X(++s.CustomStructProp); - X(++customClassField.CustomStructField); - X(++customClassField.CustomStructProp); - X(++otherCustomStructField.CustomStructField); - X(++otherCustomStructField.CustomStructProp); - X(++CustomClassProp.CustomStructField); - X(++CustomClassProp.CustomStructProp); - X(++GetClass().CustomStructField); - X(++GetClass().CustomStructProp); -#if CS70 - X(++GetRefStruct().CustomStructField); - X(++GetRefStruct().CustomStructProp); - X(++GetRefCustomStruct()); + public static void CustomStructPreIncTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + X(++p); + X(++num); + Use(ref num); + X(++customStructField); + X(++CustomStructProp); + X(++c.CustomStructField); + X(++c.CustomStructProp); + X(++s.CustomStructField); + X(++s.CustomStructProp); + X(++customClassField.CustomStructField); + X(++customClassField.CustomStructProp); + X(++otherCustomStructField.CustomStructField); + X(++otherCustomStructField.CustomStructProp); + X(++CustomClassProp.CustomStructField); + X(++CustomClassProp.CustomStructProp); + X(++GetClass().CustomStructField); + X(++GetClass().CustomStructProp); +#if CS70 + X(++GetRefStruct().CustomStructField); + X(++GetRefStruct().CustomStructProp); + X(++GetRefCustomStruct()); #endif - } - public static void CustomStructPostDecTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - X(p--); - X(num--); - Use(ref num); - X(customStructField--); - X(CustomStructProp--); - X(c.CustomStructField--); - X(c.CustomStructProp--); - X(s.CustomStructField--); - X(s.CustomStructProp--); - X(customClassField.CustomStructField--); - X(customClassField.CustomStructProp--); - X(otherCustomStructField.CustomStructField--); - X(otherCustomStructField.CustomStructProp--); - X(CustomClassProp.CustomStructField--); - X(CustomClassProp.CustomStructProp--); - X(GetClass().CustomStructField--); - X(GetClass().CustomStructProp--); -#if CS70 - X(GetRefStruct().CustomStructField--); - X(GetRefStruct().CustomStructProp--); - X(GetRefCustomStruct()--); + } + public static void CustomStructPostDecTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + X(p--); + X(num--); + Use(ref num); + X(customStructField--); + X(CustomStructProp--); + X(c.CustomStructField--); + X(c.CustomStructProp--); + X(s.CustomStructField--); + X(s.CustomStructProp--); + X(customClassField.CustomStructField--); + X(customClassField.CustomStructProp--); + X(otherCustomStructField.CustomStructField--); + X(otherCustomStructField.CustomStructProp--); + X(CustomClassProp.CustomStructField--); + X(CustomClassProp.CustomStructProp--); + X(GetClass().CustomStructField--); + X(GetClass().CustomStructProp--); +#if CS70 + X(GetRefStruct().CustomStructField--); + X(GetRefStruct().CustomStructProp--); + X(GetRefCustomStruct()--); #endif - } + } - public static void CustomStructPreDecTest(CustomStruct p, CustomClass c, CustomStruct2 s) - { - CustomStruct num = default(CustomStruct); - X(--p); - X(--num); - Use(ref num); - X(--customStructField); - X(--CustomStructProp); - X(--c.CustomStructField); - X(--c.CustomStructProp); - X(--s.CustomStructField); - X(--s.CustomStructProp); - X(--customClassField.CustomStructField); - X(--customClassField.CustomStructProp); - X(--otherCustomStructField.CustomStructField); - X(--otherCustomStructField.CustomStructProp); - X(--CustomClassProp.CustomStructField); - X(--CustomClassProp.CustomStructProp); - X(--GetClass().CustomStructField); - X(--GetClass().CustomStructProp); -#if CS70 - X(--GetRefStruct().CustomStructField); - X(--GetRefStruct().CustomStructProp); - X(--GetRefCustomStruct()); + public static void CustomStructPreDecTest(CustomStruct p, CustomClass c, CustomStruct2 s) + { + CustomStruct num = default(CustomStruct); + X(--p); + X(--num); + Use(ref num); + X(--customStructField); + X(--CustomStructProp); + X(--c.CustomStructField); + X(--c.CustomStructProp); + X(--s.CustomStructField); + X(--s.CustomStructProp); + X(--customClassField.CustomStructField); + X(--customClassField.CustomStructProp); + X(--otherCustomStructField.CustomStructField); + X(--otherCustomStructField.CustomStructProp); + X(--CustomClassProp.CustomStructField); + X(--CustomClassProp.CustomStructProp); + X(--GetClass().CustomStructField); + X(--GetClass().CustomStructProp); +#if CS70 + X(--GetRefStruct().CustomStructField); + X(--GetRefStruct().CustomStructProp); + X(--GetRefCustomStruct()); #endif - } - #endregion + } + #endregion - public static void AddOneToCustomClass(ref CustomClass c) - { - // This should not be turned into post-increment: - c += 1; - c.CustomClassProp += 1; - } + public static void AddOneToCustomClass(ref CustomClass c) + { + // This should not be turned into post-increment: + c += 1; + c.CustomClassProp += 1; + } - private static Item GetItem(object obj) - { - return null; - } + private static Item GetItem(object obj) + { + return null; + } - private static void Issue882() - { - Item item = GetItem(null); - item.Self = item; - } + private static void Issue882() + { + Item item = GetItem(null); + item.Self = item; + } - private void Issue954(ref MyEnum a, MyEnum b) - { - // cannot decompile to: "a %= b;", because the % operator does not apply to enums - a = (MyEnum)((int)a % (int)b); - // same with enum field: - enumField = (MyEnum)((int)enumField % (int)b); - } + private void Issue954(ref MyEnum a, MyEnum b) + { + // cannot decompile to: "a %= b;", because the % operator does not apply to enums + a = (MyEnum)((int)a % (int)b); + // same with enum field: + enumField = (MyEnum)((int)enumField % (int)b); + } - private void Issue588(ushort val) - { - ushortDict.Add(ushortField++, val); - } + private void Issue588(ushort val) + { + ushortDict.Add(ushortField++, val); + } - private void Issue1007(TimeSpan[] items, int startIndex, TimeSpan item) - { - int num = startIndex; - items[num++] = item; - items[num++] = item; - } + private void Issue1007(TimeSpan[] items, int startIndex, TimeSpan item) + { + int num = startIndex; + items[num++] = item; + items[num++] = item; + } #if !LEGACY_CSC - // Legacy csc generates a slightly different pattern for string compound assignment - // as for all other compound assignments. We'll ignore that edge case. - // Note: it's possible that the pre-CopyPropagation run of TransformAssignments is causing trouble there, - // and that the compound assignment transform would be fine if it didn't get disrupted. + // Legacy csc generates a slightly different pattern for string compound assignment + // as for all other compound assignments. We'll ignore that edge case. + // Note: it's possible that the pre-CopyPropagation run of TransformAssignments is causing trouble there, + // and that the compound assignment transform would be fine if it didn't get disrupted. - private static void Issue1082(string[] strings, List chars, bool flag, int i) + private static void Issue1082(string[] strings, List chars, bool flag, int i) + { + // The 'chars[i]' result is stored in a temporary, and both branches use the + // same temporary. In order to inline the generated value-type temporary, we + // need to split it, even though it has the address taken for the ToString() call. + if (flag) { - // The 'chars[i]' result is stored in a temporary, and both branches use the - // same temporary. In order to inline the generated value-type temporary, we - // need to split it, even though it has the address taken for the ToString() call. - if (flag) - { - strings[1] += chars[i]; - } - else - { - strings[0] += chars[i]; - } + strings[1] += chars[i]; } -#endif - - private static void StringPropertyCompoundAssign(char c) + else { - StaticStringProperty += "a"; - StaticStringProperty += 1; - StaticStringProperty += c; - new CustomClass().StringProp += "a"; - new CustomClass().StringProp += 1; - new CustomClass().StringProp += c; + strings[0] += chars[i]; } + } +#endif - public uint PreIncrementIndexer(string name) - { - return ++M()[name]; - } + private static void StringPropertyCompoundAssign(char c) + { + StaticStringProperty += "a"; + StaticStringProperty += 1; + StaticStringProperty += c; + new CustomClass().StringProp += "a"; + new CustomClass().StringProp += 1; + new CustomClass().StringProp += c; + } - public int PreIncrementByRef(ref int i) - { - return ++i; - } + public uint PreIncrementIndexer(string name) + { + return ++M()[name]; + } - public unsafe int PreIncrementByPointer() - { - return ++(*GetPointer()); - } + public int PreIncrementByRef(ref int i) + { + return ++i; + } - public unsafe int PreIncrementOfPointer(int* ptr) - { - return *(++ptr); - } + public unsafe int PreIncrementByPointer() + { + return ++(*GetPointer()); + } - public int PreIncrement2DArray() - { - return ++Array()[1, 2]; - } + public unsafe int PreIncrementOfPointer(int* ptr) + { + return *(++ptr); + } - public int CompoundAssignInstanceField() - { - return M().Field *= 10; - } + public int PreIncrement2DArray() + { + return ++Array()[1, 2]; + } - public int CompoundAssignInstanceProperty() - { - return M().Property *= 10; - } + public int CompoundAssignInstanceField() + { + return M().Field *= 10; + } - public int CompoundAssignStaticField() - { - return StaticField ^= 100; - } + public int CompoundAssignInstanceProperty() + { + return M().Property *= 10; + } - public int CompoundAssignStaticProperty() - { - return StaticProperty &= 10; - } + public int CompoundAssignStaticField() + { + return StaticField ^= 100; + } - public int CompoundAssignArrayElement1(int[] array, int pos) - { - return array[pos] *= 10; - } + public int CompoundAssignStaticProperty() + { + return StaticProperty &= 10; + } - public int CompoundAssignArrayElement2(int[] array) - { - return array[Environment.TickCount] *= 10; - } + public int CompoundAssignArrayElement1(int[] array, int pos) + { + return array[pos] *= 10; + } - public uint CompoundAssignIndexer(string name) - { - return M()[name] -= 2u; - } + public int CompoundAssignArrayElement2(int[] array) + { + return array[Environment.TickCount] *= 10; + } - public uint CompoundAssignIndexerComplexIndex() - { - return M()[ToString()] -= 2u; - } + public uint CompoundAssignIndexer(string name) + { + return M()[name] -= 2u; + } - public int CompoundAssignIncrement2DArray() - { - return Array()[1, 2] %= 10; - } + public uint CompoundAssignIndexerComplexIndex() + { + return M()[ToString()] -= 2u; + } - public int CompoundAssignByRef(ref int i) - { - return i <<= 2; - } + public int CompoundAssignIncrement2DArray() + { + return Array()[1, 2] %= 10; + } - public unsafe int* CompoundAssignOfPointer(int* ptr) - { - return ptr += 10; - } + public int CompoundAssignByRef(ref int i) + { + return i <<= 2; + } - public unsafe double CompoundAssignByPointer(double* ptr) - { - return *ptr /= 1.5; - } + public unsafe int* CompoundAssignOfPointer(int* ptr) + { + return ptr += 10; + } - public void CompoundAssignEnum() - { - enumField |= MyEnum.Two; - enumField &= ~MyEnum.Four; - } + public unsafe double CompoundAssignByPointer(double* ptr) + { + return *ptr /= 1.5; + } - public int PostIncrementInAddition(int i, int j) - { - return i++ + j; - } + public void CompoundAssignEnum() + { + enumField |= MyEnum.Two; + enumField &= ~MyEnum.Four; + } - public void PostIncrementInlineLocalVariable(Func f) - { - int num = 0; - f(num++); - } + public int PostIncrementInAddition(int i, int j) + { + return i++ + j; + } - public int PostDecrementArrayElement(int[] array, int pos) - { - return array[pos]--; - } + public void PostIncrementInlineLocalVariable(Func f) + { + int num = 0; + f(num++); + } - public uint PostIncrementIndexer(string name) - { - return M()[name]++; - } + public int PostDecrementArrayElement(int[] array, int pos) + { + return array[pos]--; + } - public unsafe int PostIncrementOfPointer(int* ptr) - { - return *(ptr++); - } + public uint PostIncrementIndexer(string name) + { + return M()[name]++; + } - public unsafe int PostIncrementOfSmallIntegerPointerDereference(byte* ptr) - { - return (*ptr)++ * (*ptr)++; - } + public unsafe int PostIncrementOfPointer(int* ptr) + { + return *(ptr++); + } - public unsafe int PreIncrementOfSmallIntegerPointerDereference(byte* ptr) - { - return ++(*ptr) * ++(*ptr); - } + public unsafe int PostIncrementOfSmallIntegerPointerDereference(byte* ptr) + { + return (*ptr)++ * (*ptr)++; + } - public unsafe int CompoundAssignSmallIntegerPointerDereference(byte* ptr) - { - return (*ptr += 5) * (*ptr += 5); - } + public unsafe int PreIncrementOfSmallIntegerPointerDereference(byte* ptr) + { + return ++(*ptr) * ++(*ptr); + } - public int PostDecrementInstanceField() - { - return M().Field--; - } + public unsafe int CompoundAssignSmallIntegerPointerDereference(byte* ptr) + { + return (*ptr += 5) * (*ptr += 5); + } - public int PostDecrementInstanceProperty() - { - return M().Property--; - } + public int PostDecrementInstanceField() + { + return M().Field--; + } - public int PostIncrement2DArray() - { - return Array()[StaticField, StaticProperty]++; - } + public int PostDecrementInstanceProperty() + { + return M().Property--; + } - public int PostIncrementByRef(ref int i) - { - return i++; - } + public int PostIncrement2DArray() + { + return Array()[StaticField, StaticProperty]++; + } - public unsafe int PostIncrementByPointer() - { - return (*GetPointer())++; - } + public int PostIncrementByRef(ref int i) + { + return i++; + } - public float PostIncrementFloat(float f) - { - return f++; - } + public unsafe int PostIncrementByPointer() + { + return (*GetPointer())++; + } - public double PostIncrementDouble(double d) - { - return d++; - } + public float PostIncrementFloat(float f) + { + return f++; + } - public void Issue1552Pre(CustomStruct a, CustomStruct b) - { - CustomStruct customStruct = a + b; - Console.WriteLine(++customStruct); - } + public double PostIncrementDouble(double d) + { + return d++; + } - public void Issue1552Stmt(CustomStruct a, CustomStruct b) - { - CustomStruct customStruct = a + b; - ++customStruct; - } + public void Issue1552Pre(CustomStruct a, CustomStruct b) + { + CustomStruct customStruct = a + b; + Console.WriteLine(++customStruct); + } - public void Issue1552StmtUseLater(CustomStruct a, CustomStruct b) - { - CustomStruct customStruct = a + b; - ++customStruct; - Console.WriteLine(); - Console.WriteLine(customStruct * b); - } + public void Issue1552Stmt(CustomStruct a, CustomStruct b) + { + CustomStruct customStruct = a + b; + ++customStruct; + } - public void Issue1552Decimal(decimal a) - { - // Legacy csc compiles this using op_Increment, - // ensure we don't misdetect this as an invalid pre-increment "++(a * 10m)" - Console.WriteLine(a * 10m + 1m); - } + public void Issue1552StmtUseLater(CustomStruct a, CustomStruct b) + { + CustomStruct customStruct = a + b; + ++customStruct; + Console.WriteLine(); + Console.WriteLine(customStruct * b); + } + + public void Issue1552Decimal(decimal a) + { + // Legacy csc compiles this using op_Increment, + // ensure we don't misdetect this as an invalid pre-increment "++(a * 10m)" + Console.WriteLine(a * 10m + 1m); + } #if !(ROSLYN && OPT) - // Roslyn opt no longer has a detectable post-increment pattern - // due to optimizing out some of the stores. - // Our emitted code is valid but has some additional temporaries. - public void Issue1552Post(CustomStruct a, CustomStruct b) - { - CustomStruct customStruct = a + b; - Console.WriteLine(customStruct++); - } + // Roslyn opt no longer has a detectable post-increment pattern + // due to optimizing out some of the stores. + // Our emitted code is valid but has some additional temporaries. + public void Issue1552Post(CustomStruct a, CustomStruct b) + { + CustomStruct customStruct = a + b; + Console.WriteLine(customStruct++); + } - public void Issue1552StmtTwice(CustomStruct a, CustomStruct b) - { - CustomStruct customStruct = a + b; - ++customStruct; - ++customStruct; - } + public void Issue1552StmtTwice(CustomStruct a, CustomStruct b) + { + CustomStruct customStruct = a + b; + ++customStruct; + ++customStruct; + } #endif - public void Issue1779(int value) - { - CustomStruct2 @struct = GetStruct(); - @struct.IntProp += value; - } + public void Issue1779(int value) + { + CustomStruct2 @struct = GetStruct(); + @struct.IntProp += value; } } +} diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DynamicTests.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DynamicTests.cs index 7b90338f10..d933642b35 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DynamicTests.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/DynamicTests.cs @@ -83,171 +83,192 @@ private static void CallWithRefReadonly(ref readonly Dictionary } #endif - private static void CallWithRef(ref dynamic d) - { - } + private static void CallWithRef(ref dynamic d) + { + } - private static void RefCallSiteTests() - { + private static void RefCallSiteTests() + { #if CS70 - CallWithOut(out var d); - CallWithIn(in d); + CallWithOut(out var d); + CallWithIn(in d); #else dynamic d; CallWithOut(out d); #endif - CallWithRef(ref d); - d.SomeCall(); - } + CallWithRef(ref d); + d.SomeCall(); + } - private static void InvokeConstructor() - { - DynamicTests dynamicTests = new DynamicTests(); - dynamic val = new DynamicTests(); - val.Test(new UnauthorizedAccessException()); - dynamic val2 = new DynamicTests(val); - val2.Get(new DynamicTests((DynamicTests)val)); - val2.Call(new DynamicTests((dynamic)dynamicTests)); - } + private static void InvokeConstructor() + { + DynamicTests dynamicTests = new DynamicTests(); + dynamic val = new DynamicTests(); + val.Test(new UnauthorizedAccessException()); + dynamic val2 = new DynamicTests(val); + val2.Get(new DynamicTests((DynamicTests)val)); + val2.Call(new DynamicTests((dynamic)dynamicTests)); + } - private static dynamic InlineAssign(object a, out dynamic b) - { - return b = ((dynamic)a).Test; - } + private static dynamic InlineAssign(object a, out dynamic b) + { + return b = ((dynamic)a).Test; + } - private static dynamic SelfReference(dynamic d) - { - return d[d, d] = d; - } + private static dynamic SelfReference(dynamic d) + { + return d[d, d] = d; + } - private static dynamic LongArgumentListFunc(dynamic d) - { - // Func`13 - return d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - } + private static dynamic LongArgumentListFunc(dynamic d) + { + // Func`13 + return d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); + } - private static void LongArgumentListAction(dynamic d) - { - // Action`13 - d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - } + private static void LongArgumentListAction(dynamic d) + { + // Action`13 + d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); + } - private static void DynamicThrow() + private static void DynamicThrow() + { + try { - try - { - throw (Exception)field; - } - catch (Exception ex) - { - Console.WriteLine(ex.ToString()); - throw; - } + throw (Exception)field; } - - private static void MemberAccess(dynamic a) + catch (Exception ex) { - a.Test1(); - a.GenericTest(); - a.Test2(1); - a.Test3(a.InnerTest(1, 2, 3, 4, 5)); - a.Test4(2, null, a.Index[0]); - a.Test5(a, a.Number, a.String); - a[0] = 3; - a.Index[a.Number] = 5; - a.Index[a.Number] += 5; - a.Setter = new DynamicTests(); - a.Setter2 = 5; + Console.WriteLine(ex.ToString()); + throw; } + } - private static void StructMemberAccess(MyValueType valueType) - { - valueType.Field = 0; - valueType.Field += 5; - valueType.Field[1] = 5; - valueType.Field.CallMe(); - DynamicTests.Casts(valueType.GetOnlyProperty); - valueType.GetOnlyProperty.CallMe(); - valueType.Property = 0; - valueType.Property += 5; - valueType.Property[1] = 5; - valueType.Property.CallMe(5.ToDynamic((object)valueType.Property.Call())); - valueType.Method(valueType.GetOnlyProperty + valueType.Field); - } + private static void MemberAccess(dynamic a) + { + a.Test1(); + a.GenericTest(); + a.Test2(1); + a.Test3(a.InnerTest(1, 2, 3, 4, 5)); + a.Test4(2, null, a.Index[0]); + a.Test5(a, a.Number, a.String); + a[0] = 3; + a.Index[a.Number] = 5; + a.Index[a.Number] += 5; + a.Setter = new DynamicTests(); + a.Setter2 = 5; + } - private static void RequiredCasts() - { - ((dynamic)objectField).A = 5; - ((dynamic)objectField).B += 5; - ((dynamic)objectField).Call(); - ((object)field).ToString(); - field.Call("Hello World"); - field.Call((object)"Hello World"); - field.Call((dynamic)"Hello World"); - } + private static void StructMemberAccess(MyValueType valueType) + { + valueType.Field = 0; + valueType.Field += 5; + valueType.Field[1] = 5; + valueType.Field.CallMe(); + DynamicTests.Casts(valueType.GetOnlyProperty); + valueType.GetOnlyProperty.CallMe(); + valueType.Property = 0; + valueType.Property += 5; + valueType.Property[1] = 5; + valueType.Property.CallMe(5.ToDynamic((object)valueType.Property.Call())); + valueType.Method(valueType.GetOnlyProperty + valueType.Field); + } - private void StaticCallWithDynamicArgument(dynamic d) - { - M3(d + 5); - } + private static void RequiredCasts() + { + ((dynamic)objectField).A = 5; + ((dynamic)objectField).B += 5; + ((dynamic)objectField).Call(); + ((object)field).ToString(); + field.Call("Hello World"); + field.Call((object)"Hello World"); + field.Call((dynamic)"Hello World"); + } - private static void StaticCallWithDynamicArgumentInStaticContext(dynamic d) - { - DynamicTests.M3(d + 5); - } + private void StaticCallWithDynamicArgument(dynamic d) + { + M3(d + 5); + } - private static void DynamicCallWithString() - { - field.Call("Hello World"); - } + private static void StaticCallWithDynamicArgumentInStaticContext(dynamic d) + { + DynamicTests.M3(d + 5); + } - private static void DynamicCallWithNamedArgs() - { - field.Call(a: "Hello World"); - } + private static void DynamicCallWithString() + { + field.Call("Hello World"); + } - private static void DynamicCallWithRefOutArg(int a, out int b) - { - field.Call(ref a, out b); - } + private static void DynamicCallWithNamedArgs() + { + field.Call(a: "Hello World"); + } - private static void DynamicCallWithStringCastToObj() - { - field.Call((object)"Hello World"); - } + private static void DynamicCallWithRefOutArg(int a, out int b) + { + field.Call(ref a, out b); + } - private static void DynamicCallWithStringCastToDynamic() - { - field.Call((dynamic)"Hello World"); - } + private static void DynamicCallWithStringCastToObj() + { + field.Call((object)"Hello World"); + } - private static void DynamicCallWithStringCastToDynamic2() - { - field.Call((dynamic)"Hello World", 5, null); - } + private static void DynamicCallWithStringCastToDynamic() + { + field.Call((dynamic)"Hello World"); + } - private static void DynamicCallWithStringCastToDynamic3() - { - field.Call((dynamic)"Hello World", 5u, null); - } + private static void DynamicCallWithStringCastToDynamic2() + { + field.Call((dynamic)"Hello World", 5, null); + } - private static void Invocation(dynamic a, dynamic b) - { - a(null, b.Test()); - } + private static void DynamicCallWithStringCastToDynamic3() + { + field.Call((dynamic)"Hello World", 5u, null); + } - private static dynamic Test1(dynamic a) - { - dynamic val = a.IndexedProperty; - return val[0]; - } + private static void Invocation(dynamic a, dynamic b) + { + a(null, b.Test()); + } - private static dynamic Test2(dynamic a) - { - return a.IndexedProperty[0]; - } + private static dynamic Test1(dynamic a) + { + dynamic val = a.IndexedProperty; + return val[0]; + } - private static void ArithmeticBinaryOperators(dynamic a, dynamic b) + private static dynamic Test2(dynamic a) + { + return a.IndexedProperty[0]; + } + + private static void ArithmeticBinaryOperators(dynamic a, dynamic b) + { + DynamicTests.MemberAccess(a + b); + DynamicTests.MemberAccess(a + 1); + DynamicTests.MemberAccess(a + null); + DynamicTests.MemberAccess(a - b); + DynamicTests.MemberAccess(a - 1); + DynamicTests.MemberAccess(a - null); + DynamicTests.MemberAccess(a * b); + DynamicTests.MemberAccess(a * 1); + DynamicTests.MemberAccess(a * null); + DynamicTests.MemberAccess(a / b); + DynamicTests.MemberAccess(a / 1); + DynamicTests.MemberAccess(a / null); + DynamicTests.MemberAccess(a % b); + DynamicTests.MemberAccess(a % 1); + DynamicTests.MemberAccess(a % null); + } + + private static void CheckedArithmeticBinaryOperators(dynamic a, dynamic b) + { + checked { DynamicTests.MemberAccess(a + b); DynamicTests.MemberAccess(a + 1); @@ -265,185 +286,164 @@ private static void ArithmeticBinaryOperators(dynamic a, dynamic b) DynamicTests.MemberAccess(a % 1); DynamicTests.MemberAccess(a % null); } + } - private static void CheckedArithmeticBinaryOperators(dynamic a, dynamic b) + private static void UncheckedArithmeticBinaryOperators(dynamic a, dynamic b) + { + checked { - checked - { - DynamicTests.MemberAccess(a + b); - DynamicTests.MemberAccess(a + 1); - DynamicTests.MemberAccess(a + null); - DynamicTests.MemberAccess(a - b); - DynamicTests.MemberAccess(a - 1); - DynamicTests.MemberAccess(a - null); - DynamicTests.MemberAccess(a * b); - DynamicTests.MemberAccess(a * 1); - DynamicTests.MemberAccess(a * null); - DynamicTests.MemberAccess(a / b); - DynamicTests.MemberAccess(a / 1); - DynamicTests.MemberAccess(a / null); - DynamicTests.MemberAccess(a % b); - DynamicTests.MemberAccess(a % 1); - DynamicTests.MemberAccess(a % null); - } + DynamicTests.MemberAccess(a + b); + DynamicTests.MemberAccess(a + 1); + DynamicTests.MemberAccess(a + null); + DynamicTests.MemberAccess(unchecked(a - b)); + DynamicTests.MemberAccess(a - 1); + DynamicTests.MemberAccess(a - null); + DynamicTests.MemberAccess(unchecked(a * b)); + DynamicTests.MemberAccess(a * 1); + DynamicTests.MemberAccess(a * null); + DynamicTests.MemberAccess(a / b); + DynamicTests.MemberAccess(a / 1); + DynamicTests.MemberAccess(a / null); + DynamicTests.MemberAccess(a % b); + DynamicTests.MemberAccess(a % 1); + DynamicTests.MemberAccess(a % null); } + } - private static void UncheckedArithmeticBinaryOperators(dynamic a, dynamic b) - { - checked - { - DynamicTests.MemberAccess(a + b); - DynamicTests.MemberAccess(a + 1); - DynamicTests.MemberAccess(a + null); - DynamicTests.MemberAccess(unchecked(a - b)); - DynamicTests.MemberAccess(a - 1); - DynamicTests.MemberAccess(a - null); - DynamicTests.MemberAccess(unchecked(a * b)); - DynamicTests.MemberAccess(a * 1); - DynamicTests.MemberAccess(a * null); - DynamicTests.MemberAccess(a / b); - DynamicTests.MemberAccess(a / 1); - DynamicTests.MemberAccess(a / null); - DynamicTests.MemberAccess(a % b); - DynamicTests.MemberAccess(a % 1); - DynamicTests.MemberAccess(a % null); - } - } + private static void RelationalOperators(dynamic a, dynamic b) + { + DynamicTests.MemberAccess(a == b); + DynamicTests.MemberAccess(a == 1); + DynamicTests.MemberAccess(a == null); + DynamicTests.MemberAccess(a != b); + DynamicTests.MemberAccess(a != 1); + DynamicTests.MemberAccess(a != null); + DynamicTests.MemberAccess(a < b); + DynamicTests.MemberAccess(a < 1); + DynamicTests.MemberAccess(a < null); + DynamicTests.MemberAccess(a > b); + DynamicTests.MemberAccess(a > 1); + DynamicTests.MemberAccess(a > null); + DynamicTests.MemberAccess(a >= b); + DynamicTests.MemberAccess(a >= 1); + DynamicTests.MemberAccess(a >= null); + DynamicTests.MemberAccess(a <= b); + DynamicTests.MemberAccess(a <= 1); + DynamicTests.MemberAccess(a <= null); + } - private static void RelationalOperators(dynamic a, dynamic b) - { - DynamicTests.MemberAccess(a == b); - DynamicTests.MemberAccess(a == 1); - DynamicTests.MemberAccess(a == null); - DynamicTests.MemberAccess(a != b); - DynamicTests.MemberAccess(a != 1); - DynamicTests.MemberAccess(a != null); - DynamicTests.MemberAccess(a < b); - DynamicTests.MemberAccess(a < 1); - DynamicTests.MemberAccess(a < null); - DynamicTests.MemberAccess(a > b); - DynamicTests.MemberAccess(a > 1); - DynamicTests.MemberAccess(a > null); - DynamicTests.MemberAccess(a >= b); - DynamicTests.MemberAccess(a >= 1); - DynamicTests.MemberAccess(a >= null); - DynamicTests.MemberAccess(a <= b); - DynamicTests.MemberAccess(a <= 1); - DynamicTests.MemberAccess(a <= null); - } + private static void Casts(dynamic a) + { + Console.WriteLine(); + MemberAccess((int)a); + MemberAccess(checked((int)a)); + } - private static void Casts(dynamic a) - { - Console.WriteLine(); - MemberAccess((int)a); - MemberAccess(checked((int)a)); - } + private static void M(object o) + { + } - private static void M(object o) - { - } + private static void M2(dynamic d) + { + } - private static void M2(dynamic d) - { - } + private static void M3(int i) + { + } - private static void M3(int i) - { - } + private static void NotDynamicDispatch(dynamic d) + { + DynamicTests.M(d); + M((object)d); + DynamicTests.M2(d); + M2((object)d); + } - private static void NotDynamicDispatch(dynamic d) - { - DynamicTests.M(d); - M((object)d); - DynamicTests.M2(d); - M2((object)d); - } + private static void CompoundAssignment(dynamic a, dynamic b) + { + a.Setter2 += 5; + a.Setter2 -= 1; + a.Setter2 *= 2; + a.Setter2 /= 5; + a.Setter2 += b; + a.Setter2 -= b; + a.Setter2 *= b; + a.Setter2 /= b; + field.Setter += 5; + field.Setter -= 5; + } - private static void CompoundAssignment(dynamic a, dynamic b) - { - a.Setter2 += 5; - a.Setter2 -= 1; - a.Setter2 *= 2; - a.Setter2 /= 5; - a.Setter2 += b; - a.Setter2 -= b; - a.Setter2 *= b; - a.Setter2 /= b; - field.Setter += 5; - field.Setter -= 5; - } + private static void InlineCompoundAssignment(dynamic a, dynamic b) + { + Console.WriteLine(a.Setter2 += 5); + Console.WriteLine(a.Setter2 -= 1); + Console.WriteLine(a.Setter2 *= 2); + Console.WriteLine(a.Setter2 /= 5); + Console.WriteLine(a.Setter2 += b); + Console.WriteLine(a.Setter2 -= b); + Console.WriteLine(a.Setter2 *= b); + Console.WriteLine(a.Setter2 /= b); + } - private static void InlineCompoundAssignment(dynamic a, dynamic b) - { - Console.WriteLine(a.Setter2 += 5); - Console.WriteLine(a.Setter2 -= 1); - Console.WriteLine(a.Setter2 *= 2); - Console.WriteLine(a.Setter2 /= 5); - Console.WriteLine(a.Setter2 += b); - Console.WriteLine(a.Setter2 -= b); - Console.WriteLine(a.Setter2 *= b); - Console.WriteLine(a.Setter2 /= b); - } + private static void UnaryOperators(dynamic a) + { + // TODO : beautify inc/dec on locals and fields + //a--; + //a++; + //--a; + //++a; + DynamicTests.Casts(-a); + DynamicTests.Casts(+a); + } - private static void UnaryOperators(dynamic a) + private static void Loops(dynamic list) + { + foreach (dynamic item in list) { - // TODO : beautify inc/dec on locals and fields - //a--; - //a++; - //--a; - //++a; - DynamicTests.Casts(-a); - DynamicTests.Casts(+a); + DynamicTests.UnaryOperators(item); } + } - private static void Loops(dynamic list) + private static void If(dynamic a, dynamic b) + { + if (a == b) { - foreach (dynamic item in list) - { - DynamicTests.UnaryOperators(item); - } + Console.WriteLine("Equal"); } + } - private static void If(dynamic a, dynamic b) + private static void If2(dynamic a, dynamic b) + { + if (a == null || b == null) { - if (a == b) - { - Console.WriteLine("Equal"); - } + Console.WriteLine("One is null"); } + } - private static void If2(dynamic a, dynamic b) + private static void If3(dynamic a, dynamic b) + { + if (a == null && b == null) { - if (a == null || b == null) - { - Console.WriteLine("One is null"); - } + Console.WriteLine("Both are null"); } + } - private static void If3(dynamic a, dynamic b) + private static void If4(dynamic a, dynamic b) + { + if ((a == null || b == null) && GetDynamic(1) && !(GetDynamic(2) && GetDynamic(3))) { - if (a == null && b == null) - { - Console.WriteLine("Both are null"); - } + Console.WriteLine("then"); } - - private static void If4(dynamic a, dynamic b) + else { - if ((a == null || b == null) && GetDynamic(1) && !(GetDynamic(2) && GetDynamic(3))) - { - Console.WriteLine("then"); - } - else - { - Console.WriteLine("else"); - } + Console.WriteLine("else"); } + } - private static bool ConstantTarget(dynamic a) - { - return true.Equals(a); - } + private static bool ConstantTarget(dynamic a) + { + return true.Equals(a); + } #if CS110 && NET70 private static nint NewIntPtr(dynamic a) @@ -451,114 +451,114 @@ private static nint NewIntPtr(dynamic a) return new nint(a); } #else - private static IntPtr NewIntPtr(dynamic a) - { - return new IntPtr(a); - } + private static IntPtr NewIntPtr(dynamic a) + { + return new IntPtr(a); + } #endif - private static dynamic GetDynamic(int i) - { - return null; - } + private static dynamic GetDynamic(int i) + { + return null; + } - private static bool GetBool(int i) - { - return false; - } + private static bool GetBool(int i) + { + return false; + } - private static dynamic LogicAnd() - { - return GetDynamic(1) && GetDynamic(2); - } + private static dynamic LogicAnd() + { + return GetDynamic(1) && GetDynamic(2); + } - private static dynamic LogicAnd(dynamic a, dynamic b) - { - return a && b; - } + private static dynamic LogicAnd(dynamic a, dynamic b) + { + return a && b; + } - private static void LogicAndExtended(int i, dynamic d) - { - Console.WriteLine(GetDynamic(1) && GetDynamic(2)); - Console.WriteLine(GetDynamic(1) && GetBool(2)); - Console.WriteLine(GetBool(1) && GetDynamic(2)); - Console.WriteLine(i == 1 && d == null); - } + private static void LogicAndExtended(int i, dynamic d) + { + Console.WriteLine(GetDynamic(1) && GetDynamic(2)); + Console.WriteLine(GetDynamic(1) && GetBool(2)); + Console.WriteLine(GetBool(1) && GetDynamic(2)); + Console.WriteLine(i == 1 && d == null); + } - private static dynamic LogicOr() - { - return GetDynamic(1) || GetDynamic(2); - } + private static dynamic LogicOr() + { + return GetDynamic(1) || GetDynamic(2); + } - private static dynamic LogicOr(dynamic a, dynamic b) - { - return a || b; - } + private static dynamic LogicOr(dynamic a, dynamic b) + { + return a || b; + } - private static void LogicOrExtended(int i, dynamic d) - { - Console.WriteLine(GetDynamic(1) || GetDynamic(2)); - Console.WriteLine(GetDynamic(1) || GetBool(2)); - Console.WriteLine(GetBool(1) || GetDynamic(2)); - Console.WriteLine(i == 1 || d == null); - } + private static void LogicOrExtended(int i, dynamic d) + { + Console.WriteLine(GetDynamic(1) || GetDynamic(2)); + Console.WriteLine(GetDynamic(1) || GetBool(2)); + Console.WriteLine(GetBool(1) || GetDynamic(2)); + Console.WriteLine(i == 1 || d == null); + } - private static int ImplicitCast(object o) - { - return (dynamic)o; - } + private static int ImplicitCast(object o) + { + return (dynamic)o; + } - private static int ExplicitCast(object o) - { - return (int)(dynamic)o; - } + private static int ExplicitCast(object o) + { + return (int)(dynamic)o; + } - private static dynamic GetI() - { - return null; - } + private static dynamic GetI() + { + return null; + } - public I Test() - { - return GetI(); - } + public I Test() + { + return GetI(); + } - public I Test1() - { - return (I)GetI(); - } + public I Test1() + { + return (I)GetI(); + } - public I Test2() - { - return (I)(object)GetI(); - } + public I Test2() + { + return (I)(object)GetI(); + } #if CS72 - public void RefParams(ref object a, ref dynamic b, ref dynamic c) - { - } - public void RefParams2(in object a, ref dynamic b, out dynamic c) - { - c = null; - } + public void RefParams(ref object a, ref dynamic b, ref dynamic c) + { + } + public void RefParams2(in object a, ref dynamic b, out dynamic c) + { + c = null; + } - public ref dynamic RefReturn(ref object o) - { - return ref o; - } + public ref dynamic RefReturn(ref object o) + { + return ref o; + } - public ref readonly dynamic RefReadonlyReturn(in object o) - { - return ref o; - } -#endif + public ref readonly dynamic RefReadonlyReturn(in object o) + { + return ref o; } +#endif +} - internal static class Extension +internal static class Extension +{ + public static dynamic ToDynamic(this int i, dynamic info) { - public static dynamic ToDynamic(this int i, dynamic info) - { - throw null; - } + throw null; } } +} diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/RefLocalsAndReturns.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/RefLocalsAndReturns.cs index 7a65ff10ac..3b5dd6b579 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/RefLocalsAndReturns.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/RefLocalsAndReturns.cs @@ -332,12 +332,12 @@ public ref readonly int M2(ref readonly int x) return ref x; } - public void Test() - { - int x = 32; - M(in x); - M2(in x); - } -#endif + public void Test() + { + int x = 32; + M(in x); + M2(in x); } +#endif +} } diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/ValueTypes.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/ValueTypes.cs index 87f54d52f7..dbb17554c8 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/ValueTypes.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/ValueTypes.cs @@ -301,14 +301,14 @@ public static void AcceptRefReadOnly(ref readonly S o) { } - private static void Use(in S param) - { - AcceptIn(new S(5)); - S o = new S(10); - AcceptRefReadOnly(in o); - AcceptIn(in param); - AcceptRefReadOnly(in param); - } -#endif + private static void Use(in S param) + { + AcceptIn(new S(5)); + S o = new S(10); + AcceptRefReadOnly(in o); + AcceptIn(in param); + AcceptRefReadOnly(in param); } +#endif +} } \ No newline at end of file diff --git a/ICSharpCode.ILSpyX/Analyzers/AnalyzerContext.cs b/ICSharpCode.ILSpyX/Analyzers/AnalyzerContext.cs index 1c339ef0ae..09112056f4 100644 --- a/ICSharpCode.ILSpyX/Analyzers/AnalyzerContext.cs +++ b/ICSharpCode.ILSpyX/Analyzers/AnalyzerContext.cs @@ -34,49 +34,49 @@ public class AnalyzerContext { public required AssemblyList AssemblyList { get; init; } - /// - /// CancellationToken. Currently Analyzers do not support cancellation from the UI, but it should be checked nonetheless. - /// - public CancellationToken CancellationToken { get; init; } + /// + /// CancellationToken. Currently Analyzers do not support cancellation from the UI, but it should be checked nonetheless. + /// + public CancellationToken CancellationToken { get; init; } - /// - /// Currently used language. - /// - public required ILanguage Language { get; init; } + /// + /// Currently used language. + /// + public required ILanguage Language { get; init; } - /// - /// Allows the analyzer to control whether the tree nodes will be sorted. - /// Must be set within - /// before the results are enumerated. - /// - public bool SortResults { get; set; } +/// +/// Allows the analyzer to control whether the tree nodes will be sorted. +/// Must be set within +/// before the results are enumerated. +/// +public bool SortResults { get; set; } - public MethodBodyBlock? GetMethodBody(IMethod method) - { - if (!method.HasBody || method.MetadataToken.IsNil || method.ParentModule?.MetadataFile == null) - return null; - var module = method.ParentModule.MetadataFile; - var md = module.Metadata.GetMethodDefinition((MethodDefinitionHandle)method.MetadataToken); - try - { - return module.GetMethodBody(md.RelativeVirtualAddress); - } - catch (BadImageFormatException) - { - return null; - } - } +public MethodBodyBlock? GetMethodBody(IMethod method) +{ + if (!method.HasBody || method.MetadataToken.IsNil || method.ParentModule?.MetadataFile == null) + return null; + var module = method.ParentModule.MetadataFile; + var md = module.Metadata.GetMethodDefinition((MethodDefinitionHandle)method.MetadataToken); + try + { + return module.GetMethodBody(md.RelativeVirtualAddress); + } + catch (BadImageFormatException) + { + return null; + } +} - public AnalyzerScope GetScopeOf(IEntity entity) - { - return new AnalyzerScope(AssemblyList, entity); - } +public AnalyzerScope GetScopeOf(IEntity entity) +{ + return new AnalyzerScope(AssemblyList, entity); +} - readonly ConcurrentDictionary typeSystemCache = new(); +readonly ConcurrentDictionary typeSystemCache = new(); - public DecompilerTypeSystem GetOrCreateTypeSystem(MetadataFile module) - { - return typeSystemCache.GetOrAdd(module, m => new DecompilerTypeSystem(m, m.GetAssemblyResolver())); - } +public DecompilerTypeSystem GetOrCreateTypeSystem(MetadataFile module) +{ + return typeSystemCache.GetOrAdd(module, m => new DecompilerTypeSystem(m, m.GetAssemblyResolver())); +} } } diff --git a/ILSpy/Analyzers/AnalyzerEntityTreeNode.cs b/ILSpy/Analyzers/AnalyzerEntityTreeNode.cs index 38d94c1c59..6daa6448f1 100644 --- a/ILSpy/Analyzers/AnalyzerEntityTreeNode.cs +++ b/ILSpy/Analyzers/AnalyzerEntityTreeNode.cs @@ -23,6 +23,7 @@ using ICSharpCode.ILSpy.TreeNodes; using ICSharpCode.ILSpyX; using ICSharpCode.TreeView; +using ICSharpCode.TreeView.PlatformAbstractions; namespace ICSharpCode.ILSpy.Analyzers { @@ -33,7 +34,7 @@ public abstract class AnalyzerEntityTreeNode : AnalyzerTreeNode, IMemberTreeNode { public abstract IEntity Member { get; } - public override void ActivateItem(System.Windows.RoutedEventArgs e) + public override void ActivateItem(IPlatformRoutedEventArgs e) { e.Handled = true; if (this.Member == null || this.Member.MetadataToken.IsNil) diff --git a/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs b/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs index 9a8558e4cc..db2c105e08 100644 --- a/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs +++ b/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs @@ -22,6 +22,7 @@ using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.ILSpyX.Analyzers; +using ICSharpCode.TreeView.PlatformAbstractions; namespace ICSharpCode.ILSpy.Analyzers.TreeNodes { @@ -52,7 +53,7 @@ protected override void LoadChildren() } } - public override void ActivateItem(RoutedEventArgs e) + public override void ActivateItem(IPlatformRoutedEventArgs e) { e.Handled = true; if (analyzedModule.MetadataFile == null) diff --git a/ILSpy/TreeNodes/AssemblyListTreeNode.cs b/ILSpy/TreeNodes/AssemblyListTreeNode.cs index e5ba906586..e3c33beff7 100644 --- a/ILSpy/TreeNodes/AssemblyListTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyListTreeNode.cs @@ -27,6 +27,7 @@ using ICSharpCode.Decompiler.Util; using ICSharpCode.ILSpyX; using ICSharpCode.TreeView; +using ICSharpCode.TreeView.PlatformAbstractions; namespace ICSharpCode.ILSpy.TreeNodes { @@ -81,21 +82,21 @@ void BindToObservableCollection(AssemblyList collection) }; } - public override bool CanDrop(DragEventArgs e, int index) + public override bool CanDrop(IPlatformDragEventArgs e, int index) { - e.Effects = DragDropEffects.Move | DragDropEffects.Copy | DragDropEffects.Link; + e.Effects = XPlatDragDropEffects.Move | XPlatDragDropEffects.Copy | XPlatDragDropEffects.Link; if (e.Data.GetDataPresent(AssemblyTreeNode.DataFormat)) return true; else if (e.Data.GetDataPresent(DataFormats.FileDrop)) return true; else { - e.Effects = DragDropEffects.None; + e.Effects = XPlatDragDropEffects.None; return false; } } - public override void Drop(DragEventArgs e, int index) + public override void Drop(IPlatformDragEventArgs e, int index) { string[] files = e.Data.GetData(AssemblyTreeNode.DataFormat) as string[]; if (files == null) diff --git a/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs b/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs index 3db5f974ee..109a8004ab 100644 --- a/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs @@ -22,6 +22,7 @@ using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.Metadata; using ICSharpCode.Decompiler.TypeSystem; +using ICSharpCode.TreeView.PlatformAbstractions; namespace ICSharpCode.ILSpy.TreeNodes { @@ -66,7 +67,7 @@ public override bool ShowExpander { } } - public override void ActivateItem(System.Windows.RoutedEventArgs e) + public override void ActivateItem(IPlatformRoutedEventArgs e) { if (parentAssembly.Parent is AssemblyListTreeNode assemblyListNode) { diff --git a/ILSpy/TreeNodes/AssemblyTreeNode.cs b/ILSpy/TreeNodes/AssemblyTreeNode.cs index aec26fcc08..1ca7dd7ac3 100644 --- a/ILSpy/TreeNodes/AssemblyTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyTreeNode.cs @@ -36,6 +36,8 @@ using ICSharpCode.ILSpyX.FileLoaders; using ICSharpCode.ILSpyX.PdbProvider; using ICSharpCode.TreeView; +using ICSharpCode.TreeView.PlatformAbstractions; +using ICSharpCode.TreeView.PlatformAbstractions.WpfWindows; using Microsoft.Win32; @@ -410,9 +412,9 @@ public override bool CanDrag(SharpTreeNode[] nodes) return nodes.All(n => n is AssemblyTreeNode { PackageEntry: null }); } - public override void StartDrag(DependencyObject dragSource, SharpTreeNode[] nodes) + public override void StartDrag(object dragSource, SharpTreeNode[] nodes, IPlatformDragDrop dragdropManager) { - DragDrop.DoDragDrop(dragSource, Copy(nodes), DragDropEffects.All); + dragdropManager.DoDragDrop(dragSource, Copy(nodes), XPlatDragDropEffects.All); } public override bool CanDelete() @@ -433,9 +435,9 @@ public override void DeleteCore() internal const string DataFormat = "ILSpyAssemblies"; - public override IDataObject Copy(SharpTreeNode[] nodes) + public override IPlatformDataObject Copy(SharpTreeNode[] nodes) { - DataObject dataObject = new DataObject(); + var dataObject = new WpfWindowsDataObject(new DataObject()); dataObject.SetData(DataFormat, nodes.OfType().Select(n => n.LoadedAssembly.FileName).ToArray()); return dataObject; } diff --git a/ILSpy/TreeNodes/BaseTypesEntryNode.cs b/ILSpy/TreeNodes/BaseTypesEntryNode.cs index 138c86e52d..f0a28eb0cd 100644 --- a/ILSpy/TreeNodes/BaseTypesEntryNode.cs +++ b/ILSpy/TreeNodes/BaseTypesEntryNode.cs @@ -21,6 +21,7 @@ using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.TreeView; +using ICSharpCode.TreeView.PlatformAbstractions; namespace ICSharpCode.ILSpy.TreeNodes { @@ -37,7 +38,7 @@ public BaseTypesEntryNode(ITypeDefinition type) public override object Icon => type.Kind == TypeKind.Interface ? Images.Interface : Images.Class; - public override void ActivateItem(System.Windows.RoutedEventArgs e) + public override void ActivateItem(IPlatformRoutedEventArgs e) { e.Handled = ActivateItem(this, type); } diff --git a/ILSpy/TreeNodes/DerivedTypesEntryNode.cs b/ILSpy/TreeNodes/DerivedTypesEntryNode.cs index fa4fa0c9a7..224ba02611 100644 --- a/ILSpy/TreeNodes/DerivedTypesEntryNode.cs +++ b/ILSpy/TreeNodes/DerivedTypesEntryNode.cs @@ -26,6 +26,7 @@ namespace ICSharpCode.ILSpy.TreeNodes { using ICSharpCode.Decompiler.TypeSystem; + using ICSharpCode.TreeView.PlatformAbstractions; class DerivedTypesEntryNode : ILSpyTreeNode, IMemberTreeNode { @@ -89,7 +90,7 @@ IEnumerable FetchChildren(CancellationToken ct) return DerivedTypesTreeNode.FindDerivedTypes(list, type, ct); } - public override void ActivateItem(System.Windows.RoutedEventArgs e) + public override void ActivateItem(IPlatformRoutedEventArgs e) { e.Handled = BaseTypesEntryNode.ActivateItem(this, type); } diff --git a/ILSpy/TreeNodes/ILSpyTreeNode.cs b/ILSpy/TreeNodes/ILSpyTreeNode.cs index 079db2993e..16f1d48332 100644 --- a/ILSpy/TreeNodes/ILSpyTreeNode.cs +++ b/ILSpy/TreeNodes/ILSpyTreeNode.cs @@ -31,6 +31,7 @@ using ICSharpCode.ILSpy.Options; using ICSharpCode.ILSpyX.Abstractions; using ICSharpCode.TreeView; +using ICSharpCode.TreeView.PlatformAbstractions; namespace ICSharpCode.ILSpy.TreeNodes { @@ -77,7 +78,7 @@ public virtual bool View(ViewModels.TabPageModel tabPage) return false; } - public override void ActivateItemSecondary(RoutedEventArgs e) + public override void ActivateItemSecondary(IPlatformRoutedEventArgs e) { MainWindow.Instance.SelectNode(this, inNewTabPage: true); MainWindow.Instance.Dispatcher.BeginInvoke(DispatcherPriority.Background, (Action)MainWindow.Instance.RefreshDecompiledView); diff --git a/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs b/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs index e3c2481311..7b799af612 100644 --- a/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs +++ b/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs @@ -21,6 +21,7 @@ using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.Metadata; +using ICSharpCode.TreeView.PlatformAbstractions; namespace ICSharpCode.ILSpy.TreeNodes { @@ -69,7 +70,7 @@ public override object Text { public override object Icon => Images.Library; - public override void ActivateItem(System.Windows.RoutedEventArgs e) + public override void ActivateItem(IPlatformRoutedEventArgs e) { var assemblyListNode = parentAssembly.Parent as AssemblyListTreeNode; if (assemblyListNode != null && containsMetadata) diff --git a/SharpTreeView/PlatformAbstractions/IPlatformDataObject.cs b/SharpTreeView/PlatformAbstractions/IPlatformDataObject.cs new file mode 100644 index 0000000000..5834d7d3b1 --- /dev/null +++ b/SharpTreeView/PlatformAbstractions/IPlatformDataObject.cs @@ -0,0 +1,10 @@ +namespace ICSharpCode.TreeView.PlatformAbstractions +{ + public interface IPlatformDataObject + { + bool GetDataPresent(string format); + object GetData(string format); + + void SetData(string format, object data); + } +} diff --git a/SharpTreeView/PlatformAbstractions/IPlatformDragDrop.cs b/SharpTreeView/PlatformAbstractions/IPlatformDragDrop.cs new file mode 100644 index 0000000000..198c05be08 --- /dev/null +++ b/SharpTreeView/PlatformAbstractions/IPlatformDragDrop.cs @@ -0,0 +1,7 @@ +namespace ICSharpCode.TreeView.PlatformAbstractions +{ + public interface IPlatformDragDrop + { + XPlatDragDropEffects DoDragDrop(object dragSource, object data, XPlatDragDropEffects allowedEffects); + } +} diff --git a/SharpTreeView/PlatformAbstractions/IPlatformDragEventArgs.cs b/SharpTreeView/PlatformAbstractions/IPlatformDragEventArgs.cs new file mode 100644 index 0000000000..455ba3aea7 --- /dev/null +++ b/SharpTreeView/PlatformAbstractions/IPlatformDragEventArgs.cs @@ -0,0 +1,8 @@ +namespace ICSharpCode.TreeView.PlatformAbstractions +{ + public interface IPlatformDragEventArgs + { + XPlatDragDropEffects Effects { get; set; } + IPlatformDataObject Data { get; } + } +} diff --git a/SharpTreeView/PlatformAbstractions/IPlatformRoutedEventArgs.cs b/SharpTreeView/PlatformAbstractions/IPlatformRoutedEventArgs.cs new file mode 100644 index 0000000000..6f08d77d69 --- /dev/null +++ b/SharpTreeView/PlatformAbstractions/IPlatformRoutedEventArgs.cs @@ -0,0 +1,7 @@ +namespace ICSharpCode.TreeView.PlatformAbstractions +{ + public interface IPlatformRoutedEventArgs + { + bool Handled { get; set; } + } +} diff --git a/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDataObject.cs b/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDataObject.cs new file mode 100644 index 0000000000..3dfa20f755 --- /dev/null +++ b/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDataObject.cs @@ -0,0 +1,29 @@ +using System.Windows; + +namespace ICSharpCode.TreeView.PlatformAbstractions.WpfWindows +{ + public class WpfWindowsDataObject : IPlatformDataObject + { + private readonly IDataObject _dataObject; + + public WpfWindowsDataObject(IDataObject dataObject) + { + _dataObject = dataObject; + } + + public object GetData(string format) + { + return _dataObject.GetData(format); + } + + public bool GetDataPresent(string format) + { + return _dataObject.GetDataPresent(format); + } + + public void SetData(string format, object data) + { + _dataObject.SetData(format, data); + } + } +} diff --git a/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDragDropManager.cs b/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDragDropManager.cs new file mode 100644 index 0000000000..7b63ca89e6 --- /dev/null +++ b/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDragDropManager.cs @@ -0,0 +1,12 @@ +using System.Windows; + +namespace ICSharpCode.TreeView.PlatformAbstractions.WpfWindows +{ + public class WpfWindowsDragDropManager : IPlatformDragDrop + { + public XPlatDragDropEffects DoDragDrop(object dragSource, object data, XPlatDragDropEffects allowedEffects) + { + return (XPlatDragDropEffects)DragDrop.DoDragDrop(dragSource as DependencyObject, data, (DragDropEffects)allowedEffects); + } + } +} \ No newline at end of file diff --git a/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDragEventArgs.cs b/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDragEventArgs.cs new file mode 100644 index 0000000000..d1657e2e9b --- /dev/null +++ b/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsDragEventArgs.cs @@ -0,0 +1,18 @@ +using System.Windows; + +namespace ICSharpCode.TreeView.PlatformAbstractions.WpfWindows +{ + public class WpfWindowsDragEventArgs : IPlatformDragEventArgs + { + private readonly DragEventArgs _eventArgs; + + public WpfWindowsDragEventArgs(DragEventArgs eventArgs) + { + _eventArgs = eventArgs; + } + + public XPlatDragDropEffects Effects { get => (XPlatDragDropEffects)_eventArgs.Effects; set => _eventArgs.Effects = (DragDropEffects)value; } + + public IPlatformDataObject Data => new WpfWindowsDataObject(_eventArgs.Data); + } +} diff --git a/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsRoutedEventArgs.cs b/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsRoutedEventArgs.cs new file mode 100644 index 0000000000..fee88e451a --- /dev/null +++ b/SharpTreeView/PlatformAbstractions/WpfWindows/WpfWindowsRoutedEventArgs.cs @@ -0,0 +1,16 @@ +using System.Windows; + +namespace ICSharpCode.TreeView.PlatformAbstractions.WpfWindows +{ + public class WpfWindowsRoutedEventArgs : IPlatformRoutedEventArgs + { + private readonly RoutedEventArgs _eventArgs; + + public WpfWindowsRoutedEventArgs(RoutedEventArgs eventArgs) + { + _eventArgs = eventArgs; + } + + public bool Handled { get => _eventArgs.Handled; set => _eventArgs.Handled = value; } + } +} diff --git a/SharpTreeView/PlatformAbstractions/XPlatDragDropEffects.cs b/SharpTreeView/PlatformAbstractions/XPlatDragDropEffects.cs new file mode 100644 index 0000000000..637e613edc --- /dev/null +++ b/SharpTreeView/PlatformAbstractions/XPlatDragDropEffects.cs @@ -0,0 +1,36 @@ +using System; + +namespace ICSharpCode.TreeView.PlatformAbstractions +{ + // + // Summary: + // Specifies the effects of a drag-and-drop operation. + [Flags] + public enum XPlatDragDropEffects + { + // + // Summary: + // Scrolling is about to start or is currently occurring in the drop target. + Scroll = int.MinValue, + // + // Summary: + // The data is copied, removed from the drag source, and scrolled in the drop target. + All = -2147483645, + // + // Summary: + // The drop target does not accept the data. + None = 0, + // + // Summary: + // The data is copied to the drop target. + Copy = 1, + // + // Summary: + // The data from the drag source is moved to the drop target. + Move = 2, + // + // Summary: + // The data from the drag source is linked to the drop target. + Link = 4 + } +} diff --git a/SharpTreeView/SharpTreeNode.cs b/SharpTreeView/SharpTreeNode.cs index bf694c765d..30d61dce6a 100644 --- a/SharpTreeView/SharpTreeNode.cs +++ b/SharpTreeView/SharpTreeNode.cs @@ -22,9 +22,8 @@ using System.ComponentModel; using System.Diagnostics; using System.Linq; -using System.Windows; -using System.Windows.Input; -using System.Windows.Media; + +using ICSharpCode.TreeView.PlatformAbstractions; namespace ICSharpCode.TreeView { @@ -584,7 +583,7 @@ public virtual void DeleteCore() throw new NotSupportedException(GetType().Name + " does not support deletion"); } - public virtual IDataObject Copy(SharpTreeNode[] nodes) + public virtual IPlatformDataObject Copy(SharpTreeNode[] nodes) { throw new NotSupportedException(GetType().Name + " does not support copy/paste or drag'n'drop"); } @@ -614,25 +613,26 @@ public virtual bool CanDrag(SharpTreeNode[] nodes) return false; } - public virtual void StartDrag(DependencyObject dragSource, SharpTreeNode[] nodes) + public virtual void StartDrag(object dragSource, SharpTreeNode[] nodes, IPlatformDragDrop dragdropManager) { - DragDropEffects effects = DragDropEffects.All; + XPlatDragDropEffects effects = XPlatDragDropEffects.All; if (!nodes.All(n => n.CanDelete())) - effects &= ~DragDropEffects.Move; - DragDropEffects result = DragDrop.DoDragDrop(dragSource, Copy(nodes), effects); - if (result == DragDropEffects.Move) + effects &= ~XPlatDragDropEffects.Move; + + XPlatDragDropEffects result = dragdropManager.DoDragDrop(dragSource, Copy(nodes), effects); + if (result == XPlatDragDropEffects.Move) { foreach (SharpTreeNode node in nodes) node.DeleteCore(); } } - public virtual bool CanDrop(DragEventArgs e, int index) + public virtual bool CanDrop(IPlatformDragEventArgs e, int index) { return false; } - internal void InternalDrop(DragEventArgs e, int index) + internal void InternalDrop(IPlatformDragEventArgs e, int index) { if (LazyLoading) { @@ -643,7 +643,7 @@ internal void InternalDrop(DragEventArgs e, int index) Drop(e, index); } - public virtual void Drop(DragEventArgs e, int index) + public virtual void Drop(IPlatformDragEventArgs e, int index) { throw new NotSupportedException(GetType().Name + " does not support Drop()"); } @@ -703,14 +703,14 @@ public void RaisePropertyChanged(string name) /// /// Gets called when the item is double-clicked. /// - public virtual void ActivateItem(RoutedEventArgs e) + public virtual void ActivateItem(IPlatformRoutedEventArgs e) { } /// /// Gets called when the item is clicked with the middle mouse button. /// - public virtual void ActivateItemSecondary(RoutedEventArgs e) + public virtual void ActivateItemSecondary(IPlatformRoutedEventArgs e) { } diff --git a/SharpTreeView/SharpTreeView.cs b/SharpTreeView/SharpTreeView.cs index d4de0673da..92e969e46e 100644 --- a/SharpTreeView/SharpTreeView.cs +++ b/SharpTreeView/SharpTreeView.cs @@ -28,6 +28,8 @@ using System.Windows.Input; using System.Windows.Threading; +using ICSharpCode.TreeView.PlatformAbstractions.WpfWindows; + namespace ICSharpCode.TreeView { public class SharpTreeView : ListView @@ -303,7 +305,7 @@ protected override void OnKeyDown(KeyEventArgs e) if (container != null && Keyboard.Modifiers == ModifierKeys.None && this.SelectedItems.Count == 1 && this.SelectedItem == container.Node) { e.Handled = true; - container.Node.ActivateItem(e); + container.Node.ActivateItem(new WpfWindowsRoutedEventArgs(e)); } break; case Key.Space: @@ -319,7 +321,7 @@ protected override void OnKeyDown(KeyEventArgs e) } else { - container.Node.ActivateItem(e); + container.Node.ActivateItem(new WpfWindowsRoutedEventArgs(e)); } } break; @@ -462,7 +464,7 @@ protected override void OnDragOver(DragEventArgs e) if (Root != null && !ShowRoot) { e.Handled = true; - Root.CanDrop(e, Root.Children.Count); + Root.CanDrop(new WpfWindowsDragEventArgs(e), Root.Children.Count); } } @@ -473,7 +475,7 @@ protected override void OnDrop(DragEventArgs e) if (Root != null && !ShowRoot) { e.Handled = true; - Root.InternalDrop(e, Root.Children.Count); + Root.InternalDrop(new WpfWindowsDragEventArgs(e), Root.Children.Count); } } @@ -504,7 +506,7 @@ internal void HandleDrop(SharpTreeViewItem item, DragEventArgs e) if (target != null) { e.Handled = true; - target.Node.InternalDrop(e, target.Index); + target.Node.InternalDrop(new WpfWindowsDragEventArgs(e), target.Index); } } catch (Exception ex) @@ -612,7 +614,7 @@ void TryAddDropTarget(List targets, SharpTreeViewItem item, DropPlac if (node != null) { e.Effects = DragDropEffects.None; - if (node.CanDrop(e, index)) + if (node.CanDrop(new WpfWindowsDragEventArgs(e), index)) { DropTarget target = new DropTarget() { Item = item, diff --git a/SharpTreeView/SharpTreeViewItem.cs b/SharpTreeView/SharpTreeViewItem.cs index 6785b1f852..8814dc1154 100644 --- a/SharpTreeView/SharpTreeViewItem.cs +++ b/SharpTreeView/SharpTreeViewItem.cs @@ -22,6 +22,8 @@ using System.Windows.Controls; using System.Windows.Input; +using ICSharpCode.TreeView.PlatformAbstractions.WpfWindows; + namespace ICSharpCode.TreeView { public class SharpTreeViewItem : ListViewItem @@ -103,7 +105,7 @@ protected override void OnMouseMove(MouseEventArgs e) var selection = ParentTreeView.GetTopLevelSelection().ToArray(); if (Node.CanDrag(selection)) { - Node.StartDrag(this, selection); + Node.StartDrag(this, selection, new WpfWindowsDragDropManager()); } } } @@ -114,7 +116,7 @@ protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e) if (wasDoubleClick) { wasDoubleClick = false; - Node.ActivateItem(e); + Node.ActivateItem(new WpfWindowsRoutedEventArgs(e)); if (!e.Handled) { if (!Node.IsRoot || ParentTreeView.ShowRootExpander) @@ -135,7 +137,7 @@ protected override void OnMouseUp(MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Middle) { - Node.ActivateItemSecondary(e); + Node.ActivateItemSecondary(new WpfWindowsRoutedEventArgs(e)); } else {