Example #1
0
            private static void ReflectionCopy(object source, ref EventResults destination)
            {
                Type sourceType = source.GetType();

                destination.IsNonEvent         = (bool)GetReflectedFieldValue(sourceType, source, "IsNonEvent", false);
                destination.D_Frame            = (float)GetReflectedFieldValue(sourceType, source, "D_Frame", float.NaN);
                destination.R_Frame            = (float)GetReflectedFieldValue(sourceType, source, "R_Frame", float.NaN);
                destination.D_FrameUncertPlus  = (float)GetReflectedFieldValue(sourceType, source, "D_FrameUncertPlus", float.NaN);
                destination.D_FrameUncertMinus = (float)GetReflectedFieldValue(sourceType, source, "D_FrameUncertMinus", float.NaN);
                destination.R_FrameUncertPlus  = (float)GetReflectedFieldValue(sourceType, source, "R_FrameUncertPlus", float.NaN);
                destination.R_FrameUncertMinus = (float)GetReflectedFieldValue(sourceType, source, "R_FrameUncertMinus", float.NaN);
                destination.D_UTC            = (string)GetReflectedFieldValue(sourceType, source, "D_UTC", null);
                destination.R_UTC            = (string)GetReflectedFieldValue(sourceType, source, "R_UTC", null);
                destination.D_DurationFrames = (float)GetReflectedFieldValue(sourceType, source, "D_DurationFrames", float.NaN);
                destination.R_DurationFrames = (float)GetReflectedFieldValue(sourceType, source, "R_DurationFrames", float.NaN);
            }
Example #2
0
            private static void ReflectionCopy(object source, ref EventResults destination)
            {
                Type sourceType = source.GetType();

                destination.IsNonEvent = (bool)GetReflectedFieldValue(sourceType, source, "IsNonEvent", false);
                destination.D_Frame = (float)GetReflectedFieldValue(sourceType, source, "D_Frame", float.NaN);
                destination.R_Frame = (float)GetReflectedFieldValue(sourceType, source, "R_Frame", float.NaN);
                destination.D_FrameUncertPlus = (float)GetReflectedFieldValue(sourceType, source, "D_FrameUncertPlus", float.NaN);
                destination.D_FrameUncertMinus = (float)GetReflectedFieldValue(sourceType, source, "D_FrameUncertMinus", float.NaN);
                destination.R_FrameUncertPlus = (float)GetReflectedFieldValue(sourceType, source, "R_FrameUncertPlus", float.NaN);
                destination.R_FrameUncertMinus = (float)GetReflectedFieldValue(sourceType, source, "R_FrameUncertMinus", float.NaN);
                destination.D_UTC = (string)GetReflectedFieldValue(sourceType, source, "D_UTC", null);
                destination.R_UTC = (string)GetReflectedFieldValue(sourceType, source, "R_UTC", null);
                destination.D_DurationFrames = (float)GetReflectedFieldValue(sourceType, source, "D_DurationFrames", float.NaN);
                destination.R_DurationFrames = (float)GetReflectedFieldValue(sourceType, source, "R_DurationFrames", float.NaN);
            }