Exemple #1
0
 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;
 }
Exemple #2
0
 /// <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;
 }
Exemple #3
0
        private void Notify(TDomain domain, RepositoryEventType eventType)
        {
            var tEvent = new TEvent
            {
                Entity    = domain,
                EventType = eventType
            };

            _observable.OnNext(tEvent);
        }
Exemple #4
0
 /// <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;
 }
Exemple #5
0
 public RepositoryEvent(RepositoryEventType type, string key = null, object entity = null)
 {
     this.Type   = type;
     this.Key    = key;
     this.Entity = entity;
 }