Example #1
0
        // Reads all flatlined measurements.
        private SerializableFlatlineTest ReadFlatlinedMeasurements()
        {
            SerializableFlatlineTest   serializableTest      = new SerializableFlatlineTest();
            ICollection <IMeasurement> flatlinedMeasurements = m_test.GetFlatlinedMeasurements();

            List <SerializableFlatlinedMeasurement> serializableFlatlinedMeasurements = new List <SerializableFlatlinedMeasurement>();

            foreach (IMeasurement measurement in flatlinedMeasurements)
            {
                SerializableFlatlinedMeasurement serializableFlatlinedMeasurement = CreateSerializableFlatlinedMeasurement(measurement);
                serializableFlatlinedMeasurements.Add(serializableFlatlinedMeasurement);
            }

            serializableTest.FlatlinedMeasurements = serializableFlatlinedMeasurements.ToArray();
            return(serializableTest);
        }
Example #2
0
        // Reads all flatlined measurements associated with a particular device.
        private SerializableFlatlineTest ReadFlatlinedMeasurements(string device)
        {
            SerializableFlatlineTest serializableTest = new SerializableFlatlineTest();
            ICollection<IMeasurement> flatlinedMeasurements = m_test.GetFlatlinedMeasurements();

            List<SerializableFlatlinedMeasurement> serializableFlatlinedMeasurements = new List<SerializableFlatlinedMeasurement>();
            foreach (IMeasurement measurement in flatlinedMeasurements)
            {
                SerializableFlatlinedMeasurement serializableFlatlinedMeasurement = CreateSerializableFlatlinedMeasurement(measurement);

                if (serializableFlatlinedMeasurement.Device == device)
                    serializableFlatlinedMeasurements.Add(serializableFlatlinedMeasurement);
            }

            serializableTest.FlatlinedMeasurements = serializableFlatlinedMeasurements.ToArray();
            return serializableTest;
        }