Exemple #1
0
        internal static void BroadcastNewConnection(P4ScmProvider scm)
        {
            P4VsProvider.Instance.SccService.RefreshEventSubscriptions();
            CurrentScm = scm;

            P4VsProvider.Instance.ClientStream.clearClient();

            if (NewConnection != null)
            {
                foreach (Delegate d in NewConnection.GetInvocationList())
                {
                    try
                    {
                        NewConnectionDelegate nd = (NewConnectionDelegate)d;
                        nd.DynamicInvoke(scm);
                    }
                    catch
                    {
#if DEBUG
                        try
                        {
                            NewConnectionDelegate nd = (NewConnectionDelegate)d;
                            nd.DynamicInvoke(scm);
                        }
                        catch
                        {
                        }
#endif
                        NewConnection -= (NewConnectionDelegate)d;
                    }
                }
                if (scm == null)
                {
                    P4VsProvider.Instance.currentConnectionDropDownComboChoice = Resources.ConnectionDropDownCombo_NoConnection;
                }
            }
        }
Exemple #2
0
 public listener(NewConnectionDelegate connectionCallback)
 {
     mConnectionCallback = connectionCallback;
     this.StartListening();
 }