Exemplo n.º 1
0
        public void CheckEnabled(IConnection connection, ITraceWatcher active)
        {
            if (connection == null)
            {
                IsEnabled = false;
                IsChecked = false;
                return;
            }
            if (!connection.IsConnected)
            {
                // if connection has been closed or broken then uncheck and disable
                IsEnabled = false;
                IsChecked = false;
                return;
            }

#if PREVIEW
            //HACK: Temporary hack to test Power BI XMLA Endpoint
            IsAdminConnection = true;
#else
            IsAdminConnection = connection.IsAdminConnection;
#endif
            //IsEnabled = (!_connection.IsPowerPivot && _connection.IsAdminConnection && _connection.IsConnected);
            if (active != null)
            {
                IsEnabled = (connection.IsAdminConnection && connection.IsConnected && FilterForCurrentSession == active.FilterForCurrentSession);
            }
            else
            {
                IsEnabled = (connection.IsAdminConnection && connection.IsConnected);
            }
        }
Exemplo n.º 2
0
 public void CheckEnabled(IConnection connection, ITraceWatcher active)
 {
     if (connection == null)
     {
         IsEnabled = false;
         IsChecked = false;
         return;
     }
     if (!connection.IsConnected)
     {
         // if connection has been closed or broken then uncheck and disable
         IsEnabled = false;
         IsChecked = false;
         return;
     }
     IsAdminConnection = connection.IsAdminConnection;
     //IsEnabled = (!_connection.IsPowerPivot && _connection.IsAdminConnection && _connection.IsConnected);
     if (active != null)
     {
         IsEnabled = (connection.IsAdminConnection && connection.IsConnected && FilterForCurrentSession == active.FilterForCurrentSession);
     }
     else
     {
         IsEnabled = (connection.IsAdminConnection && connection.IsConnected);
     }
 }
Exemplo n.º 3
0
 public void RegisterTraceWatcher(ITraceWatcher watcher)
 {
     if (!RegisteredTraceWatchers.Contains(watcher))
     {
         RegisteredTraceWatchers.Add(watcher);
     }
 }
Exemplo n.º 4
0
 public TraceWatcherToggleEvent(ITraceWatcher watcher, bool isActive)
 {
     TraceWatcher = watcher;
     IsActive     = isActive;
 }
Exemplo n.º 5
0
 public void UnRegisterTraceWatcher(ITraceWatcher watcher)
 {
     RegisteredTraceWatchers.Remove(watcher);
 }
Exemplo n.º 6
0
 public void RegisterTraceWatcher(ITraceWatcher watcher)
 {
     if (!RegisteredTraceWatchers.Contains(watcher))
         RegisteredTraceWatchers.Add(watcher);
 }
 public TraceWatcherToggleEvent(ITraceWatcher watcher, bool isActive)
 {
     TraceWatcher = watcher;
     IsActive = isActive;
 }
Exemplo n.º 8
0
 public CloseTraceWindowEvent(ITraceWatcher watcher)
 {
     TraceWatcher = watcher;
 }
Exemplo n.º 9
0
 public void UnRegisterTraceWatcher(ITraceWatcher watcher)
 {
     RegisteredTraceWatchers.Remove(watcher);
 }
 public DocumentConnectionUpdateEvent(IConnection connection, BindableCollection <string> databases, ITraceWatcher activeTrace)
 {
     Connection  = connection;
     Databases   = databases;
     ActiveTrace = activeTrace;
 }
Exemplo n.º 11
0
 public ShowTraceWindowEvent(ITraceWatcher watcher)
 {
     TraceWatcher = watcher;
 }
Exemplo n.º 12
0
 public ActivateTraceEvent(ITraceWatcher watcher)
 {
     Watcher = watcher;
 }
Exemplo n.º 13
0
 public ActivateTraceEvent(ITraceWatcher watcher)
 {
     Watcher = watcher;
 }