public RepositoryEvent(RepositoryEventType type, string key = null, object entity = null, Type entityType = null) { this.Type = type; this.Key = key; this.Entity = entity; this.EntityType = entity?.GetType() ?? entityType; }
/// <summary> Create repo update event arguments </summary> /// <param name="repoLocation">Repo location</param> /// <param name="oldStatus">Status before event</param> /// <param name="newStatus">Status after event</param> /// <param name="name">Name of repo</param> /// <param name="eventType"> Event type (add/remove/update) </param> public RepositoryEventArgs(string repoLocation, RepoStatus oldStatus, RepoStatus newStatus, string name, RepositoryEventType eventType) { Location = repoLocation; OldStatus = oldStatus; NewStatus = newStatus; Name = name; EventType = eventType; }
private void Notify(TDomain domain, RepositoryEventType eventType) { var tEvent = new TEvent { Entity = domain, EventType = eventType }; _observable.OnNext(tEvent); }
/// <summary> /// Initializes a new instance of the <see cref="RepositoryEvent{T}"/> class. /// </summary> /// <param name="repositoryEventType"> /// The repository event type. /// </param> /// <param name="entityId"> /// The entity id. /// </param> /// <param name="entity"> /// The entity. /// </param> public RepositoryEvent(RepositoryEventType repositoryEventType, int?entityId, T entity = null) { this.RepositoryEventType = repositoryEventType; this.EntityId = entityId; this.Entity = entity; }
public RepositoryEvent(RepositoryEventType type, string key = null, object entity = null) { this.Type = type; this.Key = key; this.Entity = entity; }