Ejemplo n.º 1
0
        private void Trace_OnEvent(object sender, TOM.TraceEventArgs e)
        {
            if (e.Success != AS.TraceEventSuccess.Success)
            {
                return;
            }
            if (!IsChangeSubClass(e.EventSubclass))
            {
                return;
            }
            if (e.DatabaseName != databaseNameWhenTraceStarted)
            {
                return;
            }
            if (e.ApplicationName == this.applicationName)
            {
                return;
            }
            if (!(e.EventSubclass == AS.TraceEventSubclass.CommitTransaction || IsChangeXmla(e.TextData)))
            {
                return;
            }

            this.onExternalChangeCallback(e);
        }
Ejemplo n.º 2
0
        private void XEventCallback(TOM.TraceEventArgs eventArgs)
        {
            switch (eventArgs.EventClass)
            {
            case Microsoft.AnalysisServices.TraceEventClass.ProgressReportBegin:
            case Microsoft.AnalysisServices.TraceEventClass.ProgressReportCurrent:
            case Microsoft.AnalysisServices.TraceEventClass.ProgressReportEnd:
            case Microsoft.AnalysisServices.TraceEventClass.ProgressReportError:
                OnProgressReport?.Invoke(this, new ProgressReportEventArgs(eventArgs));
                break;

            case Microsoft.AnalysisServices.TraceEventClass.CommandEnd:
                if (!Settings.ChangeDetectionLocalServers)
                {
                    return;
                }

                if (skipEvent)
                {
                    break;
                }

                var ext = new ExternalChangeEventArgs(eventArgs);
                if (OnExternalChange != null)
                {
                    skipEvent = true;
                    OnExternalChange.BeginInvoke(this, ext, EndExternalChangeEvent, ext);
                }
                break;
            }
        }
        private void Trace_OnEvent(object sender, TOM.TraceEventArgs e)
        {
            if (e.Success != AS.TraceEventSuccess.Success)
            {
                return;
            }
            if (!changeSubClasses.Contains(e.EventSubclass))
            {
                return;
            }
            if (e.ApplicationName == this.applicationName)
            {
                return;
            }
            if (!IsChangeXmla(e.TextData))
            {
                return;
            }

            this.onExternalChangeCallback(e);
        }