Ejemplo n.º 1
0
        private int FireEvents(HashSet <EventType> events)
        {
            int eventsProcessed = 0;

            if (events.Contains(EventType.ConfigChanged))
            {
                //Logger.Trace("ConfigChanged");
                ConfigChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.Contains(EventType.HeadChanged))
            {
                //Logger.Trace("HeadChanged");
                HeadChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.Contains(EventType.LocalBranchesChanged))
            {
                //Logger.Trace("LocalBranchesChanged");
                LocalBranchesChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.Contains(EventType.RemoteBranchesChanged))
            {
                //Logger.Trace("RemoteBranchesChanged");
                RemoteBranchesChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.Contains(EventType.IndexChanged))
            {
                if (!events.Contains(EventType.RepositoryChanged))
                {
                    //Logger.Trace("IndexChanged");
                    IndexChanged?.Invoke();
                    eventsProcessed++;
                }
            }

            if (events.Contains(EventType.RepositoryChanged))
            {
                //Logger.Trace("RepositoryChanged");
                RepositoryChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.Contains(EventType.RepositoryCommitted))
            {
                //Logger.Trace("RepositoryCommitted");
                RepositoryCommitted?.Invoke();
                eventsProcessed++;
            }

            return(eventsProcessed);
        }
Ejemplo n.º 2
0
 public void Reset()
 {
     HeadChanged.Reset();
     ConfigChanged.Reset();
     RepositoryCommitted.Reset();
     IndexChanged.Reset();
     RepositoryChanged.Reset();
     LocalBranchesChanged.Reset();
     RemoteBranchesChanged.Reset();
 }
Ejemplo n.º 3
0
        private int FireEvents(Dictionary <EventType, List <EventData> > events)
        {
            int eventsProcessed = 0;

            if (events.ContainsKey(EventType.ConfigChanged))
            {
                Logger.Trace("ConfigChanged");
                ConfigChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.ContainsKey(EventType.HeadChanged))
            {
                Logger.Trace("HeadChanged");
                HeadChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.ContainsKey(EventType.LocalBranchesChanged))
            {
                Logger.Trace("LocalBranchesChanged");
                LocalBranchesChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.ContainsKey(EventType.RemoteBranchesChanged))
            {
                Logger.Trace("RemoteBranchesChanged");
                RemoteBranchesChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.ContainsKey(EventType.IndexChanged))
            {
                Logger.Trace("IndexChanged");
                IndexChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.ContainsKey(EventType.RepositoryChanged))
            {
                Logger.Trace("RepositoryChanged");
                RepositoryChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.ContainsKey(EventType.RepositoryCommitted))
            {
                Logger.Trace("RepositoryCommitted");
                RepositoryCommitted?.Invoke();
                eventsProcessed++;
            }

            return(eventsProcessed);
        }
Ejemplo n.º 4
0
        private int FireEvents(HashSet <EventType> events)
        {
            int eventsProcessed = 0;

            if (events.Contains(EventType.ConfigChanged))
            {
                ConfigChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.Contains(EventType.HeadChanged))
            {
                HeadChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.Contains(EventType.LocalBranchesChanged))
            {
                LocalBranchesChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.Contains(EventType.RemoteBranchesChanged))
            {
                RemoteBranchesChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.Contains(EventType.IndexChanged))
            {
                if (!events.Contains(EventType.RepositoryChanged))
                {
                    IndexChanged?.Invoke();
                    eventsProcessed++;
                }
            }

            if (events.Contains(EventType.RepositoryChanged))
            {
                RepositoryChanged?.Invoke();
                eventsProcessed++;
            }

            if (events.Contains(EventType.RepositoryCommitted))
            {
                RepositoryCommitted?.Invoke();
                eventsProcessed++;
            }

            return(eventsProcessed);
        }