Beispiel #1
0
        public bool Remove(IGitAdapter adapter)
        {
            if (adapter == null)
            {
                return(false);
            }

            if (!GitAdapters.Contains(adapter))
            {
                return(false);
            }

            GitAdapters.Remove(adapter);
            return(true);
        }
Beispiel #2
0
        public bool Add(IGitAdapter adapter)
        {
            if (adapter == null)
            {
                return(false);
            }

            if (
                GitAdapters.Any(
                    g =>
                    g.GetLoginInfo().Username == adapter.GetLoginInfo().Username&&
                    g.GetLoginInfo().Provider == adapter.GetLoginInfo().Provider))
            {
                return(true);
            }

            GitAdapters.Add(adapter);
            return(true);
        }