//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Tango Observables Generator
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
//
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
using Newtonsoft.Json;
using System.Linq;
using Tango.DAL.Remote.DB;
using Tango.Core;
using System.ComponentModel;
using Tango.Core.CustomAttributes;
namespace Tango.BL.Entities
{
[Table("MACHINE_VERSIONS")]
public abstract class MachineVersionBase : ObservableEntity
{
public event EventHandler VersionChanged;
public event EventHandler NameChanged;
public event EventHandler PrototypeMachineDataChanged;
public event EventHandler> MachinesChanged;
public event EventHandler> TangoVersionsChanged;
protected Double _version;
///
/// Gets or sets the machineversionbase version.
///
[Column("VERSION")]
public Double Version
{
get
{
return _version;
}
set
{
if (_version != value)
{
_version = value;
OnVersionChanged(value);
}
}
}
protected String _name;
///
/// Gets or sets the machineversionbase name.
///
[Column("NAME")]
public String Name
{
get
{
return _name;
}
set
{
if (_name != value)
{
_name = value;
OnNameChanged(value);
}
}
}
protected String _prototypemachinedata;
///
/// Gets or sets the machineversionbase prototype machine data.
///
[Column("PROTOTYPE_MACHINE_DATA")]
public String PrototypeMachineData
{
get
{
return _prototypemachinedata;
}
set
{
if (_prototypemachinedata != value)
{
_prototypemachinedata = value;
OnPrototypeMachineDataChanged(value);
}
}
}
protected SynchronizedObservableCollection _machines;
///
/// Gets or sets the machineversionbase machines.
///
public virtual SynchronizedObservableCollection Machines
{
get
{
return _machines;
}
set
{
if (_machines != value)
{
_machines = value;
OnMachinesChanged(value);
}
}
}
protected SynchronizedObservableCollection _tangoversions;
///
/// Gets or sets the machineversionbase tango versions.
///
public virtual SynchronizedObservableCollection TangoVersions
{
get
{
return _tangoversions;
}
set
{
if (_tangoversions != value)
{
_tangoversions = value;
OnTangoVersionsChanged(value);
}
}
}
///
/// Called when the Version has changed.
///
protected virtual void OnVersionChanged(Double version)
{
VersionChanged?.Invoke(this, version);
RaisePropertyChanged(nameof(Version));
}
///
/// Called when the Name has changed.
///
protected virtual void OnNameChanged(String name)
{
NameChanged?.Invoke(this, name);
RaisePropertyChanged(nameof(Name));
}
///
/// Called when the PrototypeMachineData has changed.
///
protected virtual void OnPrototypeMachineDataChanged(String prototypemachinedata)
{
PrototypeMachineDataChanged?.Invoke(this, prototypemachinedata);
RaisePropertyChanged(nameof(PrototypeMachineData));
}
///
/// Called when the Machines has changed.
///
protected virtual void OnMachinesChanged(SynchronizedObservableCollection machines)
{
MachinesChanged?.Invoke(this, machines);
RaisePropertyChanged(nameof(Machines));
}
///
/// Called when the TangoVersions has changed.
///
protected virtual void OnTangoVersionsChanged(SynchronizedObservableCollection tangoversions)
{
TangoVersionsChanged?.Invoke(this, tangoversions);
RaisePropertyChanged(nameof(TangoVersions));
}
///
/// Initializes a new instance of the class.
///
public MachineVersionBase() : base()
{
Machines = new SynchronizedObservableCollection();
TangoVersions = new SynchronizedObservableCollection();
}
}
}