public virtual void RemoveAppNotificationActions(AppNotificationAction __item) { if (__item != null) { InternalRemoveAppNotificationActions(__item); } }
public virtual void AddAtIndexAppNotificationActions(int index, AppNotificationAction __item) { if (__item == null) { return; } appNotificationActions?.Insert(index, __item); }
public virtual void AddAppNotificationActions(AppNotificationAction __item) { if (__item == null) { return; } InternalAddAppNotificationActions(__item); }
public virtual void InternalRemoveAppNotificationActions(AppNotificationAction __item) { if (__item == null) { return; } appNotificationActions?.Remove(__item); }
public virtual void InternalAddAppNotificationActions(AppNotificationAction __item) { if (__item == null || disableInternalAdditions) { return; } appNotificationActions?.Add(__item); }
public virtual void SetAppNotificationActionsAt(AppNotificationAction __item, int __index) { if (__item == null) { appNotificationActions[__index] = null; } else { appNotificationActions[__index] = __item; } }
public void AppNotification_persistence_test() { DateTime now = DateTime.Now; // Get datetime without milliseconds now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind); var _appnotification_appnotificationactions_appnotification = new DSS1_RetailerDriverStockOptimisation.BO.AppNotificationAction { Link = "AppNotificationAction_Link", Type = "AppNotificationAction_Type", }; var _appnotification_appnotificationactions_appnotification2 = new DSS1_RetailerDriverStockOptimisation.BO.AppNotificationAction { Link = "AppNotificationAction_Link", Type = "AppNotificationAction_Type", }; var _appnotification_recipient_appnotifications = new DSS1_RetailerDriverStockOptimisation.BO.Contact { Id = 9771, UserName = "******", PasswordHash = "Contact_PasswordHash", SecurityStamp = "Contact_SecurityStamp", EmailConfirmed = true, LockoutEnabled = true, PhoneNumberConfirmed = true, TwoFactorEnabled = true, AccessFailedCount = 5914, Name = "Contact_Name", Email = "Contact_Email", PhoneNumber = "Contact_PhoneNumber", LockoutEndDate = now, }; new PersistenceSpecification <DSS1_RetailerDriverStockOptimisation.BO.AppNotification>(Session) .CheckProperty(p => p.Type, "AppNotification_Type") .CheckProperty(p => p.Reason, "AppNotification_Reason") .CheckProperty(p => p.DateCreated, now) .CheckProperty(p => p.IsRead, true) .CheckProperty(p => p.Item, "AppNotification_Item") .CheckProperty(p => p.Delta, 1582) .CheckBag(p => p.AppNotificationActions, (new List <DSS1_RetailerDriverStockOptimisation.BO.AppNotificationAction> { _appnotification_appnotificationactions_appnotification, _appnotification_appnotificationactions_appnotification2 })) .CheckReference(p => p.Recipient, _appnotification_recipient_appnotifications) .VerifyTheMappings(); }
/// <summary> /// Returns true if self and the provided entity have the same Id values /// and the Ids are not of the default Id value /// </summary> protected bool HasSameNonDefaultIdAs(AppNotificationAction compareTo) { return(!this.IsTransient() && !compareTo.IsTransient() && this.Id.Equals(compareTo.Id)); }
/// <summary> /// Copies the current object to a new instance /// </summary> /// <param name="deep">Copy members that refer to objects external to this class (not dependent)</param> /// <param name="copiedObjects">Objects that should be reused</param> /// <param name="asNew">Copy the current object as a new one, ready to be persisted, along all its members.</param> /// <param name="reuseNestedObjects">If asNew is true, this flag if set, forces the reuse of all external objects.</param> /// <param name="copy">Optional - An existing [AppNotificationAction] instance to use as the destination.</param> /// <returns>A copy of the object</returns> public virtual AppNotificationAction Copy(bool deep = false, Hashtable copiedObjects = null, bool asNew = false, bool reuseNestedObjects = false, AppNotificationAction copy = null) { if (copiedObjects == null) { copiedObjects = new Hashtable(); } if (copy == null && copiedObjects.Contains(this)) { return((AppNotificationAction)copiedObjects[this]); } copy = copy ?? new AppNotificationAction(); if (!asNew) { copy.TransientId = this.TransientId; copy.Id = this.Id; } copy.Link = this.Link; copy.Type = this.Type; if (!copiedObjects.Contains(this)) { copiedObjects.Add(this, copy); } return(copy); }