/// <summary> /// Returns true if UserRoleViewModel instances are equal /// </summary> /// <param name="other">Instance of UserRoleViewModel to be compared</param> /// <returns>Boolean</returns> public bool Equals(UserRoleViewModel other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( EffectiveDate == other.EffectiveDate || EffectiveDate.Equals(other.EffectiveDate) ) && ( UserId == other.UserId || UserId.Equals(other.UserId) ) && ( RoleId == other.RoleId || RoleId.Equals(other.RoleId) ) && ( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( ExpiryDate == other.ExpiryDate || ExpiryDate != null && ExpiryDate.Equals(other.ExpiryDate) )); }
// The following methods support the delta reports public bool Equals([AllowNull] UserRoleAllDTO other) { // Check whether the compared object is null. if (other is null) { return(false); } // Check whether the compared object references the same data. if (ReferenceEquals(this, other)) { return(true); } // Check whether the objects’ properties are equal. return(UserId.Equals(other.UserId) && UserFullName.Equals(other.UserFullName) && RoleId.Equals(other.RoleId) && RoleName.Equals(other.RoleName) && RoleDescription.Equals(other.RoleDescription) && RoleOwner_RoleId.Equals(other.RoleOwner_RoleId) && LastCertifiedBy.Equals(other.LastCertifiedBy) && LastCertifiedDate.Equals(other.LastCertifiedDate)); }
public void WithNull_False() { UserId vo = Freeze.GuidOne; var actually = vo.Equals(null); actually.Should().BeFalse(); }
public bool Equals(VoiceState other) { return(Nullable.Equals(GuildId, other.GuildId) && Nullable.Equals(ChannelId, other.ChannelId) && UserId.Equals(other.UserId) && Nullable.Equals(Member, other.Member) && SessionId == other.SessionId && Deaf == other.Deaf && Mute == other.Mute && SelfDeaf == other.SelfDeaf && SelfMute == other.SelfMute && SelfStream == other.SelfStream && Suppress == other.Suppress); }
public override bool Equals(object obj) { return(obj is AchievementEntity entity && UserId.Equals(entity.UserId) && Achievement == entity.Achievement && AchievedDate == entity.AchievedDate && AchievedTeam == entity.AchievedTeam); }
public void WithSomethingDifferent_False() { UserId vo = Freeze.GuidOne; // ReSharper disable once SuspiciousTypeConversion.Global var actually = vo.Equals(DateTime.UtcNow); actually.Should().BeFalse(); }
public void WithSameObject_True() { UserId vo = Freeze.GuidOne; var one = new UserId(Freeze.GuidOne); var actually = vo.Equals(one); actually.Should().BeTrue(); }
public void WithEmptyObject_False() { UserId vo = Freeze.GuidOne; var empty = new UserId(); var actually = vo.Equals(empty); actually.Should().BeFalse(); }
public async Task <IActionResult> Latest() { logger.LogInformation($"{nameof(Latest)}()"); IEnumerable <PhotoModel> latestPhotos = await photosService.GetLatestPhotos(GetCurrentUserId()); UserId userId = GetCurrentUserId(); return(View(latestPhotos.Select(x => photoModelConverter.ToPublic(x, userId.Equals(Guid.Empty) ? null : (Guid?)userId)))); }
public IActionResult fetchOrgList() { UserModule user = new UserModule(); string Admin = user.getAdminCode(); bool isAdmin = UserId.Equals(Admin); Dictionary <string, object> res = mm.fetchOrgList(isAdmin); return(Json(res)); }
/// <summary>Indicates whether the current object is equal to another object of the same type.</summary> /// <param name="other">An object to compare with this object.</param> /// <returns> /// <see langword="true" /> if the current object is equal to the <paramref name="other" /> parameter; otherwise, <see langword="false" />.</returns> public bool Equals(Cliente other) { return(Id.Equals(other.Id) && Nome.Equals(other.Nome) && Latitude.Equals(other.Latitude) && Longitude.Equals(other.Longitude) && UserId.Equals(other.UserId) && Password.Equals(other.Password)); }
public override bool Equals(object obj) { var i = obj as Identity; if (i == null) { return(false); } return(UserId.Equals(i.UserId) && Hash.Equals(i.Hash)); }
private async Task <GetTransactionsResult> PerformTest(UserId userId, DateTime startDate, DateTime endDate, GetTransactionsResult data) { var result = await this.target.ExecuteAsync(userId, startDate, endDate); if (userId != null) { var recordsInvolvingUser = data.Records.Where( v => userId.Equals(v.AccountOwnerId) || userId.Equals(v.CounterpartyId)); var recordsInRange = recordsInvolvingUser.Where(v => v.Timestamp >= startDate && v.Timestamp <= endDate); var transactionsInvolvingUser = recordsInRange.Select(v => v.TransactionReference).Distinct().ToList(); var expectedRecords = data.Records.Where( v => transactionsInvolvingUser.Contains(v.TransactionReference)).ToList(); CollectionAssert.AreEquivalent( expectedRecords, result.Records.ToList()); } else { var recordsInRange = data.Records.Where(v => v.Timestamp >= startDate && v.Timestamp <= endDate); var transactions = recordsInRange.Select(v => v.TransactionReference).Distinct().ToList(); var expectedRecords = data.Records.Where( v => transactions.Contains(v.TransactionReference)).ToList(); CollectionAssert.AreEquivalent( expectedRecords, result.Records.ToList()); } return(result); }
public bool Equals(UserDeleted other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(UserId.Equals(other.UserId)); }
public bool Equals(PlaylistAdded other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(UserId.Equals(other.UserId) && PlaylistId.Equals(other.PlaylistId) && string.Equals(Name, other.Name, StringComparison.InvariantCultureIgnoreCase)); }
public bool Equals(AccessTokenAdded other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(UserId.Equals(other.UserId)); }
public bool Equals(DepositWallet other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(UserId.Equals(other.UserId) && string.Equals(Address, other.Address) && string.Equals(CryptoCurrency, other.CryptoCurrency)); }
public bool Equals(AddUserResponse other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(UserId.Equals(other.UserId) && Name.Equals(other.Name) && Email.Equals(other.Email)); }
public bool Equals(GeneralReportDto other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(UserId.Equals(other.UserId)); }
public bool Equals(SongAdded other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(UserId.Equals(other.UserId) && PlaylistId.Equals(other.PlaylistId) && SongId.Equals(other.SongId) && string.Equals(Title, other.Title, StringComparison.InvariantCultureIgnoreCase) && string.Equals(Artist, other.Artist, StringComparison.InvariantCultureIgnoreCase)); }
public async Task <UserId> AuthenticateAsAsync(Requester requester, UserId userId) { requester.AssertNotNull("requester"); userId.AssertNotNull("userId"); var authenticatedUserId = await this.AuthenticateAsync(requester); if (!userId.Equals(authenticatedUserId)) { throw new UnauthorizedException("User '{0}' is could not be authenticated as '{1}'.", requester.UserId, userId); } return(authenticatedUserId); }
public override bool Equals(object obj) { AddRestaurantRequestModel model = obj as AddRestaurantRequestModel; if (model == null) { return(false); } else { return(UserId.Equals(model.UserId) && Name.Equals(model.Name, System.StringComparison.CurrentCultureIgnoreCase) && CuisineId.Equals(model.CuisineId)); } }
public override bool Equals(System.Object otherUser) { if (!(otherUser is User)) { return(false); } else { User newUser = (User)otherUser; bool IdEquality = UserId.Equals(newUser.UserId); bool UsernameEquality = Username.Equals(newUser.Username); bool PasswordEquality = Password.Equals(newUser.Password); return(IdEquality && UsernameEquality && PasswordEquality); } }
public override bool Equals(object obj) { if (obj == null || !(obj is ApplicationUserRole)) { return(false); } if (string.IsNullOrEmpty(UserId) || string.IsNullOrEmpty(RoleId)) { return(false); } return(UserId.Equals((obj as ApplicationUserRole).UserId) && RoleId.Equals((obj as ApplicationUserRole).RoleId)); }
/// <summary> /// Returns true if UserInfo instances are equal /// </summary> /// <param name="other">Instance of UserInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(UserInfo other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Email == other.Email || Email != null && Email.Equals(other.Email) ) && ( UserId == other.UserId || UserId != null && UserId.Equals(other.UserId) ) && ( TimeZone == other.TimeZone || TimeZone != null && TimeZone.Equals(other.TimeZone) ) && ( Activated == other.Activated || Activated != null && Activated.Equals(other.Activated) ) && ( CreationTime == other.CreationTime || CreationTime != null && CreationTime.Equals(other.CreationTime) ) && ( LastModifiedTime == other.LastModifiedTime || LastModifiedTime != null && LastModifiedTime.Equals(other.LastModifiedTime) ) && ( LastLoginTime == other.LastLoginTime || LastLoginTime != null && LastLoginTime.Equals(other.LastLoginTime) )); }
public bool ContainsUser(Guid userId) { if (UserId.Equals(userId)) { return(true); } foreach (var additionalUser in AdditionalUsers) { if (userId.Equals(userId)) { return(true); } } return(false); }
public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null || GetType() != obj.GetType()) { return(false); } Bill bill = (Bill)obj; return(BillId == bill.BillId && IsDeliveryPaid == bill.IsDeliveryPaid && CostInCents == bill.CostInCents && UserId.Equals(bill.UserId)); }
public override bool Equals(object obj) { if (obj == null || !(obj is ApplicationUserToken)) { return(false); } if (string.IsNullOrEmpty(LoginProvider) || string.IsNullOrEmpty(UserId) || string.IsNullOrEmpty(Value)) { return(false); } return(LoginProvider.Equals((obj as ApplicationUserToken).LoginProvider) && UserId.Equals((obj as ApplicationUserToken).UserId) && Value.Equals((obj as ApplicationUserToken).Value)); }
public bool Equals(UserAreaModel uowpm) { //Check whether the compared object is null. if (Object.ReferenceEquals(uowpm, null)) { return(false); } //Check whether the compared object references the same data. if (Object.ReferenceEquals(this, uowpm)) { return(true); } //Check whether the objects properties are equal. return(UserId.Equals(uowpm.UserId) && AreaId.Equals(uowpm.AreaId)); }
/// <summary> /// Override of the equality method. /// </summary> /// <param name="o"></param> /// <returns></returns> public bool Equals(WeekIngredients o) { //Check whether the compared object is null. if (ReferenceEquals(o, null)) { return(false); } //Check whether the compared object references the same data. if (ReferenceEquals(this, o)) { return(true); } //Check whether the WeekIngredients' properties are equal. return(_id.Equals(o._id) && UserId.Equals(o.UserId) && Tools.SequenceEqual(Ingredients, o.Ingredients)); }