Esempio n. 1
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.EndDeviceAsset == null))
                {
                    IEndDeviceAsset endDeviceAssetCasted = item.As <IEndDeviceAsset>();
                    if ((endDeviceAssetCasted != null))
                    {
                        this._parent.EndDeviceAsset = endDeviceAssetCasted;
                        return;
                    }
                }
                IReadingQuality readingQualitiesCasted = item.As <IReadingQuality>();

                if ((readingQualitiesCasted != null))
                {
                    this._parent.ReadingQualities.Add(readingQualitiesCasted);
                }
                IMeterReading meterReadingsCasted = item.As <IMeterReading>();

                if ((meterReadingsCasted != null))
                {
                    this._parent.MeterReadings.Add(meterReadingsCasted);
                }
                if ((this._parent.ReadingType == null))
                {
                    IReadingType readingTypeCasted = item.As <IReadingType>();
                    if ((readingTypeCasted != null))
                    {
                        this._parent.ReadingType = readingTypeCasted;
                        return;
                    }
                }
            }
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)
            {
                if ((this._parent.ReadingType == null))
                {
                    IReadingType readingTypeCasted = item.As <IReadingType>();
                    if ((readingTypeCasted != null))
                    {
                        this._parent.ReadingType = readingTypeCasted;
                        return;
                    }
                }
                IIntervalBlock intervalBlocksCasted = item.As <IIntervalBlock>();

                if ((intervalBlocksCasted != null))
                {
                    this._parent.IntervalBlocks.Add(intervalBlocksCasted);
                }
            }
Esempio n. 3
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.ReadingType == null))
     {
         IReadingType readingTypeCasted = item.As <IReadingType>();
         if ((readingTypeCasted != null))
         {
             this._parent.ReadingType = readingTypeCasted;
             return;
         }
     }
     if ((this._parent.DeviceFunction == null))
     {
         IDeviceFunction deviceFunctionCasted = item.As <IDeviceFunction>();
         if ((deviceFunctionCasted != null))
         {
             this._parent.DeviceFunction = deviceFunctionCasted;
             return;
         }
     }
 }
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)
            {
                if ((this._parent.MeterReading == null))
                {
                    IMeterReading meterReadingCasted = item.As <IMeterReading>();
                    if ((meterReadingCasted != null))
                    {
                        this._parent.MeterReading = meterReadingCasted;
                        return;
                    }
                }
                IIntervalReading intervalReadingsCasted = item.As <IIntervalReading>();

                if ((intervalReadingsCasted != null))
                {
                    this._parent.IntervalReadings.Add(intervalReadingsCasted);
                }
                if ((this._parent.Pending == null))
                {
                    IPending pendingCasted = item.As <IPending>();
                    if ((pendingCasted != null))
                    {
                        this._parent.Pending = pendingCasted;
                        return;
                    }
                }
                if ((this._parent.ReadingType == null))
                {
                    IReadingType readingTypeCasted = item.As <IReadingType>();
                    if ((readingTypeCasted != null))
                    {
                        this._parent.ReadingType = readingTypeCasted;
                        return;
                    }
                }
            }