Code modernization

This commit is contained in:
2015-01-16 17:55:23 -05:00
parent 0b250cd7d3
commit 47db415506
15 changed files with 1097 additions and 1312 deletions

View File

@@ -1,41 +1,27 @@
using System;
namespace OneWireAPI
{
public class owDevice
public class owDevice
{
#region Member variables
protected owSession Session;
protected owIdentifier DeviceId;
protected owSession _session; // The current session
protected owIdentifier _deviceID; // The ID of this device
#endregion
#region Constructor
public owDevice(owSession session, short[] rawID)
public owDevice(owSession session, short[] rawId)
{
// Store the session
_session = session;
Session = session;
// Create a new identifier and give it the ID supplied
_deviceID = new owIdentifier(rawID);
DeviceId = new owIdentifier(rawId);
}
#endregion
#region Properties
public owIdentifier ID
public owIdentifier Id
{
get { return _deviceID; }
get { return DeviceId; }
}
public int Family
{
get { return _deviceID.Family; }
get { return DeviceId.Family; }
}
#endregion
}
}