Esempio n. 1
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IMeasurementValue measurementValueItem = item.As <IMeasurementValue>();

                if (((measurementValueItem != null) &&
                     this._parent.MeasurementValues.Remove(measurementValueItem)))
                {
                    return(true);
                }
                ITransformerObservation transformerObservationItem = item.As <ITransformerObservation>();

                if (((transformerObservationItem != null) &&
                     this._parent.TransformerObservations.Remove(transformerObservationItem)))
                {
                    return(true);
                }
                IUserAttribute userAttributeItem = item.As <IUserAttribute>();

                if (((userAttributeItem != null) &&
                     this._parent.Properties.Remove(userAttributeItem)))
                {
                    return(true);
                }
                if ((this._parent.Procedure == item))
                {
                    this._parent.Procedure = null;
                    return(true);
                }
                return(false);
            }
Esempio n. 2
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IMeasurementValue measurementValuesCasted = item.As <IMeasurementValue>();

                if ((measurementValuesCasted != null))
                {
                    this._parent.MeasurementValues.Add(measurementValuesCasted);
                }
                ITransformerObservation transformerObservationsCasted = item.As <ITransformerObservation>();

                if ((transformerObservationsCasted != null))
                {
                    this._parent.TransformerObservations.Add(transformerObservationsCasted);
                }
                IUserAttribute propertiesCasted = item.As <IUserAttribute>();

                if ((propertiesCasted != null))
                {
                    this._parent.Properties.Add(propertiesCasted);
                }
                if ((this._parent.Procedure == null))
                {
                    IProcedure procedureCasted = item.As <IProcedure>();
                    if ((procedureCasted != null))
                    {
                        this._parent.Procedure = procedureCasted;
                        return;
                    }
                }
            }
        public override IVerificationResult VerifyMeasurement(IMeasurementValue MeasurementValue)
        {
            if (MeasurementValue is IEMHMeasurementValue EMHMeasurementValue)
            {
                return(VerifyMeasurement(EMHMeasurementValue));
            }

            return(new CryptoResult(VerificationResult.UnknownCTRFormat));
        }
Esempio n. 4
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IMeasurementValue measurementValuesCasted = item.As <IMeasurementValue>();

                if ((measurementValuesCasted != null))
                {
                    this._parent.MeasurementValues.Add(measurementValuesCasted);
                }
            }
Esempio n. 5
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                IMeasurementValue measurementValueItem = item.As <IMeasurementValue>();

                if (((measurementValueItem != null) &&
                     this._parent.MeasurementValues.Remove(measurementValueItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 6
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.MeasurementValue == null))
     {
         IMeasurementValue measurementValueCasted = item.As <IMeasurementValue>();
         if ((measurementValueCasted != null))
         {
             this._parent.MeasurementValue = measurementValueCasted;
             return;
         }
     }
 }
Esempio n. 7
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.GmlObservation == null))
     {
         IGmlObservation gmlObservationCasted = item.As <IGmlObservation>();
         if ((gmlObservationCasted != null))
         {
             this._parent.GmlObservation = gmlObservationCasted;
             return;
         }
     }
     if ((this._parent.MeasurementValue == null))
     {
         IMeasurementValue measurementValueCasted = item.As <IMeasurementValue>();
         if ((measurementValueCasted != null))
         {
             this._parent.MeasurementValue = measurementValueCasted;
             return;
         }
     }
 }
Esempio n. 8
0
 public abstract IVerificationResult VerifyMeasurement(IMeasurementValue measurementValue);