/// <summary> /// .ctor /// </summary> /// <param name="id"></param> /// <param name="macAddress"></param> /// <param name="initializeTime"></param> /// <param name="name"></param> /// <param name="alias"></param> /// <param name="version"></param> /// <param name="batteryLevel"></param> /// <param name="passwordKeyboardVersion"></param> /// <param name="characteristicValue"></param> /// <param name="keyData"></param> /// <param name="ekeyValidityFlag"></param> /// <param name="adminPasscode"></param> /// <param name="superPasscode"></param> /// <param name="aesKey"></param> /// <param name="utcTimeZoneOffset"></param> /// <param name="productModel"></param> /// <param name="hardwareRevision"></param> /// <param name="firmwareRevision"></param> /// <exception cref="ArgumentNullException"> /// <paramref name="version"/> is null /// </exception> public LockFullInfo( int id, string macAddress, DateTime initializeTime, string name, string alias, LockVersion version, int batteryLevel, int passwordKeyboardVersion, int characteristicValue, string keyData, int ekeyValidityFlag, string adminPasscode, string superPasscode, string aesKey, long utcTimeZoneOffset, string productModel, string hardwareRevision, string firmwareRevision ) { Id = id; MacAddress = VerifyMacAddress(macAddress); InitializeTime = initializeTime; Name = name; Alias = alias; Version = version.IsNotNull(nameof(version)); BatteryLevel = batteryLevel; PasswordKeyboardVersion = passwordKeyboardVersion; CharacteristicValue = characteristicValue; KeyData = keyData; EKeyValidityFlag = ekeyValidityFlag; AdminPasscode = adminPasscode; SuperPasscode = superPasscode; AESKey = aesKey; UTCTimeZoneOffset = utcTimeZoneOffset; ProductModel = productModel; HardwareRevision = hardwareRevision; FirmwareRevision = firmwareRevision; }
public UserEKey( int id, UserType userType, EKeyStatus status, DateTime beginningTime, DateTime expirationTime, bool isAuthorized, bool isRemoteUnlockEnabled, int lockId, string lockData, string lockMacAddress, string lockName, string lockAlias, string lockSuperPasscode, int lockBatterLevel, LockVersion lockVersion, int lockPasscodeVersion, int lockCharacteristicValue, string remarks = null ) : base(id) { UserType = userType.IsExist(); Status = status.IsExist(); BeginningTime = beginningTime; ExpirationTime = expirationTime; IsAuthorized = isAuthorized; IsRemoteUnlockEnabled = isRemoteUnlockEnabled; LockId = lockId; LockData = VerifyLockData(lockData); LockMacAddress = VerifyMacAddress(lockMacAddress); LockName = lockName; LockAlias = lockAlias; LockSuperPasscode = VerifyPasscode(lockSuperPasscode); LockBatterLevel = lockBatterLevel; LockVersion = lockVersion.IsNotNull(nameof(LockVersion)); LockPasscodeVersion = lockPasscodeVersion; LockCharacteristicValue = lockCharacteristicValue; Remarks = remarks; }