Beispiel #1
0
 public static void PrintNumberSequential(NumberSequential str1, string name)
 {
     Console.WriteLine("\t{0}.i32 = {1}", name, str1.i32);
     Console.WriteLine("\t{0}.ui32 = {1}", name, str1.ui32);
     Console.WriteLine("\t{0}.s1 = {1}", name, str1.s1);
     Console.WriteLine("\t{0}.us1 = {1}", name, str1.us1);
     Console.WriteLine("\t{0}.b = {1}", name, str1.b);
     Console.WriteLine("\t{0}.sb = {1}", name, str1.sb);
     Console.WriteLine("\t{0}.i16 = {1}", name, str1.i16);
     Console.WriteLine("\t{0}.ui16 = {1}", name, str1.ui16);
     Console.WriteLine("\t{0}.i64 = {1}", name, str1.i64);
     Console.WriteLine("\t{0}.ui64 = {1}", name, str1.ui64);
     Console.WriteLine("\t{0}.sgl = {1}", name, str1.sgl);
     Console.WriteLine("\t{0}.d = {1}", name, str1.d);
 }
Beispiel #2
0
    public static NumberSequential NewNumberSequential(int i32, uint ui32, short s1, ushort us1, Byte b, SByte sb,
                                                       Int16 i16, UInt16 ui16, Int64 i64, UInt64 ui64, Single sgl, Double d)
    {
        NumberSequential str1 = new NumberSequential();

        str1.i32  = i32;
        str1.ui32 = ui32;
        str1.s1   = s1;
        str1.us1  = us1;
        str1.b    = b;
        str1.sb   = sb;
        str1.i16  = i16;
        str1.ui16 = ui16;
        str1.i64  = i64;
        str1.ui64 = ui64;
        str1.sgl  = sgl;
        str1.d    = d;
        return(str1);
    }
Beispiel #3
0
 public static bool ValidateNumberSequential(NumberSequential str1, NumberSequential str2, string methodName)
 {
     if (str1.i32 != str2.i32 || str1.ui32 != str2.ui32 || str1.s1 != str2.s1 ||
         str1.us1 != str2.us1 || str1.b != str2.b || str1.sb != str2.sb || str1.i16 != str2.i16 ||
         str1.ui16 != str2.ui16 || str1.i64 != str2.i64 || str1.ui64 != str2.ui64 ||
         str1.sgl != str2.sgl || str1.d != str2.d)
     {
         Console.WriteLine("\tFAILED! " + methodName + "did not receive result as expected.");
         Console.WriteLine("\tThe Actual is...");
         PrintNumberSequential(str1, str1.ToString());
         Console.WriteLine("\tThe Expected is...");
         PrintNumberSequential(str2, str2.ToString());
         return(false);
     }
     else
     {
         Console.WriteLine("\tPASSED!");
         return(true);
     }
 }
Beispiel #4
0
 public static bool ValidateNumberSequential(NumberSequential str1, NumberSequential str2, string methodName)
 {
     if (str1.i32 != str2.i32 || str1.ui32 != str2.ui32 || str1.s1 != str2.s1 ||
         str1.us1 != str2.us1 || str1.b != str2.b || str1.sb != str2.sb || str1.i16 != str2.i16 ||
         str1.ui16 != str2.ui16 || str1.i64 != str2.i64 || str1.ui64 != str2.ui64 ||
         str1.sgl != str2.sgl || str1.d != str2.d)
     {
         Console.WriteLine("\tFAILED! " + methodName + "did not recieve result as expected.");
         Console.WriteLine("\tThe Actual is...");
         PrintNumberSequential(str1, str1.ToString());
         Console.WriteLine("\tThe Expected is...");
         PrintNumberSequential(str2, str2.ToString());
         return false;
     }
     else
     {
         Console.WriteLine("\tPASSED!");
         return true;
     }
 }
Beispiel #5
0
 public static void PrintNumberSequential(NumberSequential str1, string name)
 {
     Console.WriteLine("\t{0}.i32 = {1}", name, str1.i32);
     Console.WriteLine("\t{0}.ui32 = {1}", name, str1.ui32);
     Console.WriteLine("\t{0}.s1 = {1}", name, str1.s1);
     Console.WriteLine("\t{0}.us1 = {1}", name, str1.us1);
     Console.WriteLine("\t{0}.b = {1}", name, str1.b);
     Console.WriteLine("\t{0}.sb = {1}", name, str1.sb);
     Console.WriteLine("\t{0}.i16 = {1}", name, str1.i16);
     Console.WriteLine("\t{0}.ui16 = {1}", name, str1.ui16);
     Console.WriteLine("\t{0}.i64 = {1}", name, str1.i64);
     Console.WriteLine("\t{0}.ui64 = {1}", name, str1.ui64);
     Console.WriteLine("\t{0}.sgl = {1}", name, str1.sgl);
     Console.WriteLine("\t{0}.d = {1}", name, str1.d);
 }
Beispiel #6
0
 public static NumberSequential NewNumberSequential(int i32, uint ui32, short s1, ushort us1, Byte b, SByte sb, 
     Int16 i16, UInt16 ui16, Int64 i64, UInt64 ui64, Single sgl, Double d)
 {
     NumberSequential str1 = new NumberSequential();
     str1.i32 = i32;
     str1.ui32 = ui32;
     str1.s1 = s1;
     str1.us1 = us1;
     str1.b = b;
     str1.sb = sb;
     str1.i16 = i16;
     str1.ui16 = ui16;
     str1.i64 = i64;
     str1.ui64 = ui64;
     str1.sgl = sgl;
     str1.d = d;
     return str1;
 }
 static extern bool MarshalStructAsParam_AsSeqByRefOut6(out NumberSequential str1);
 static extern bool MarshalStructAsParam_AsSeqByRef6(ref NumberSequential str1);
 static extern bool MarshalStructAsParam_AsSeqByVal6(NumberSequential str1);