Пример #1
0
        /// <summary>
        /// Finds the sample matching the specified sample reference.
        /// </summary>
        /// <param name="sampleRef">The sample reference.</param>
        /// <returns>Matching sample</returns>
        public Sample Find(SampleReference sampleRef)
        {
            foreach (Sample sample in this.Sample)
            {
                if (String.Equals(sample.Id, sampleRef.IdRef))
                {
                    return(sample);
                }
            }

            return(null);
        }
Пример #2
0
        /// <summary>
        /// Finds the chain of custody sample that matches the requested sample reference.
        /// </summary>
        /// <param name="sampleRef">The sample ref.</param>
        /// <returns>matching chain of custody sample</returns>
        public ChainOfCustodySample Find(SampleReference sampleRef)
        {
            foreach (ChainOfCustodySample sample in this.SampleMaterial)
            {
                if (sample.Sample.Length != 1)
                {
                    continue;
                }
                if (sample.Sample == null)
                {
                    continue;
                }

                if (String.Equals(sample.Sample[0].IdRef, sampleRef.IdRef))
                {
                    return(sample);
                }
            }

            return(null);
        }
Пример #3
0
        /// <summary>
        /// Finds the chain of custody sample that matches the requested sample reference.
        /// </summary>
        /// <param name="sampleRef">The sample ref.</param>
        /// <returns>matching chain of custody sample</returns>
        public ChainOfCustodySample Find(SampleReference sampleRef)
        {
            foreach (ChainOfCustodySample sample in this.SampleMaterial)
            {
                if (sample.Sample.Length != 1)
                    continue;
                if (sample.Sample == null)
                    continue;

                if (String.Equals(sample.Sample[0].IdRef, sampleRef.IdRef))
                    return sample;
            }

            return null;
        }
Пример #4
0
        /// <summary>
        /// Finds the sample matching the specified sample reference.
        /// </summary>
        /// <param name="sampleRef">The sample reference.</param>
        /// <returns>Matching sample</returns>
        public Sample Find(SampleReference sampleRef)
        {
            foreach (Sample sample in this.Sample)
                if (String.Equals(sample.Id, sampleRef.IdRef))
                    return sample;

            return null;
        }