Exemplo n.º 1
0
 /// <summary>
 /// Constructor to set the memebers.
 /// </summary>
 /// <param name="source">Source, selected in this zone.</param>
 /// <param name="powerStatus">Power Status, of this zone.</param>
 /// <param name="volume">Volume, of this zone.</param>
 /// <param name="zoneQuality">Zone Quality, of this zone.</param>
 public ZoneState(Address source, bool powerStatus, int volume, ZoneQuality zoneQuality) : this()
 {
     _source      = source;
     _powerStatus = powerStatus;
     Volume       = volume;
     ZoneQuality  = zoneQuality;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Copy Constructor for a zone state.
 /// It copies all memebers (incl. the Guid) to the new object.
 /// </summary>
 /// <param name="sourceZoneState">Source zone state.</param>
 public ZoneState(ZoneState sourceZoneState)
 {
     if (sourceZoneState == null)
     {
         _id          = SimpleId.NewGuid();
         _lastUpdate  = DateTime.Now;
         _zoneQuality = ZoneQuality.Offline;  // Default Value
     }
     else
     {
         _id                    = sourceZoneState._id;
         _lastUpdate            = sourceZoneState._lastUpdate;
         _zoneQuality           = sourceZoneState._zoneQuality;
         _source                = sourceZoneState._source;
         _powerStatus           = sourceZoneState._powerStatus;
         Volume                 = sourceZoneState._volume;
         _commandUnacknowledged = sourceZoneState._commandUnacknowledged;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Public constructor for the protocol device updates event argument.
 /// </summary>
 /// <param name="deviceId">Device Id, where the update belongs to.</param>
 /// <param name="deviceQuality">Device quality, of the device where the update belongs to.</param>
 /// <param name="innerEventArgs">Event argument, of the inner event.</param>
 public ProtocolDeviceUpdatedEventArgs(int deviceId, ZoneQuality deviceQuality, ConreteProtocolEventArgs innerEventArgs)
 {
     _deviceId       = deviceId;
     _deviceQuality  = deviceQuality;
     _innerEventArgs = innerEventArgs;
 }
Exemplo n.º 4
0
        private DateTime _lastUpdate = new DateTime(1970, 1, 1);    // set to a default time

        #endregion

        #region Constructors

        /// <summary>
        /// Default constructor, without any parameter.
        /// This is required to allow this object as command parameter via WCF framework.
        /// </summary>
        public ZoneState()
        {
            _id          = SimpleId.NewGuid();
            _lastUpdate  = DateTime.Now;
            _zoneQuality = ZoneQuality.Offline;  // Default Value
        }