//******************************************************************************************************
// SerializableRangeTest.cs - Gbtc
//
// Copyright © 2012, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
// not use this file except in compliance with the License. You may obtain a copy of the License at:
//
// http://www.opensource.org/licenses/MIT
//
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
// License for the specific language governing permissions and limitations.
//
// Code Modification History:
// ----------------------------------------------------------------------------------------------------
// 12/16/2009 - Stephen C. Wills
// Generated original version of source code.
// 12/13/2012 - Starlynn Danyelle Gilliam
// MOdified Header.
//
//******************************************************************************************************
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using GSF.TimeSeries;
namespace DataQualityMonitoring.Services
{
///
/// Represents a container for s that can be serialized using or .
///
[XmlType("RangeTest"), DataContract(Name = "RangeTest", Namespace = "")]
public class SerializableRangeTest
{
#region [ Constructors ]
///
/// Initializes a new instance of the .
///
public SerializableRangeTest()
{
}
///
/// Initializes a new instance of the .
///
/// The acronym of the
public SerializableRangeTest(string acronym)
{
Acronym = acronym;
}
///
/// Initializes a new instance of the .
///
/// The collection of out-of-range measurements to be contained by this .
/// The lower boundary of the measurements' values.
/// The upper boundary of the measurements' values.
public SerializableRangeTest(ICollection outOfRangeMeasurements, double lowRange, double highRange)
{
List serializableOutOfRangeMeasurements = new List();
foreach (IMeasurement measurement in outOfRangeMeasurements)
{
serializableOutOfRangeMeasurements.Add(new SerializableOutOfRangeMeasurement(measurement, lowRange, highRange));
}
OutOfRangeMeasurements = serializableOutOfRangeMeasurements.ToArray();
}
#endregion
#region [ Properties ]
///
/// Gets or sets the index of the range test.
///
[XmlAttribute, DataMember(Order = 0)]
public string Acronym { get; set; }
///
/// Gets or sets the s contained in the .
///
[XmlArray, DataMember(Order = 1)]
public SerializableOutOfRangeMeasurement[] OutOfRangeMeasurements { get; set; }
#endregion
}
}