/// <summary> /// Creates a new instance. /// </summary> /// <param name="device">Gets the device the login or group has access to.</param> /// <param name="deviceModelDependency">Gets the application/device model the login has access to.</param> /// <param name="login"></param> public ApplicationAccess(Device device, DeviceModelDependency deviceModelDependency, StakeholderLogin login) { Guard.ArgumentNotNull(device, nameof(device)); Guard.ArgumentNotNull(deviceModelDependency, nameof(deviceModelDependency)); Guard.ArgumentNotNull(login, nameof(login)); this.DeviceId = device.Id; this.DeviceModelDependencyId = deviceModelDependency.Id; this.StakeholderLoginId = login.Id; this.DateLastModified = DateTime.UtcNow; this.UserName = ""; }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="device">Gets the device the login or group has access to.</param> /// <param name="deviceModelDependency">Gets the application/device model the login has access to.</param> /// <param name="group"></param> public ApplicationAccess(Device device, DeviceModelDependency deviceModelDependency, UserGroup group) { Guard.ArgumentNotNull(device, nameof(device)); Guard.ArgumentNotNull(deviceModelDependency, nameof(deviceModelDependency)); Guard.ArgumentNotNull(group, nameof(group)); this.DeviceId = device.Id; this.DeviceModelDependencyId = deviceModelDependency.Id; this.UserGroupId = group.Id; this.DateLastModified = DateTime.UtcNow; this.UserName = ""; this.Id = SeqGuid.Create(); }