예제 #1
0
        public void Start()
        {
            try
            {
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Starting");
                var stopWatch = new Stopwatch();
                stopWatch.Start();

                IsRunning = false;

                if (_business.GetAmsOverview().Count == 0)
                {
                    Logger.WriteError(MethodBase.GetCurrentMethod(), "No AMS configurated");
                    return;
                }

                registerEvents();

                IsRunning = true;

                stopWatch.Stop();
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"Started -> {stopWatch.Elapsed}");
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
        }
예제 #2
0
        public void Stop()
        {
            try
            {
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Stopping");
                var stopWatch = new Stopwatch();
                stopWatch.Start();

                unregisterEvents();

                stopWatch.Stop();
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"Stopped -> {stopWatch.Elapsed}");
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
            finally
            {
                IsRunning = false;
            }
        }
        private async Task <TransitionResult> ViewModelOnPageTransitionRequested(object sender,
                                                                                 [NotNull] TransitionRequest transitionRequest)
        {
            if (transitionRequest == null)
            {
                throw new ArgumentNullException(nameof(transitionRequest));
            }

            var tcs = new TaskCompletionSource <TransitionResult>();
            await Invoker.InvokeAsync(async() =>
            {
                try
                {
                    if (!(sender is IStoryboardPageViewModel viewModel))
                    {
                        throw new InvalidOperationException("Incorrect request of transition");
                    }

                    var result = await GoToPageAsync(
                        transitionRequest.DestinationPageId,
                        viewModel.StoryboardId,
                        transitionRequest.DestinationPageContext)
                                 .ConfigureAwait(true);
                    tcs.SetResult(result);
                }
                catch (Exception e)
                {
                    ExceptionOccured?.Invoke(this, e);
                    tcs.SetResult(TransitionResult.Failed);
                }
            }).ConfigureAwait(false);

            return(await tcs.Task.ConfigureAwait(true));
        }
예제 #4
0
        private void recordDevice_RecordingStopped(object sender, StoppedEventArgs e)
        {
            try
            {
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), "recordDevice -> Stopped");

                if (_einsatz != null)
                {
                    //Raise Event
                    EinsatzFinished.RaiseEvent(this, new EinsatzFinishedEventArgs(_einsatz));
                    //Reset Einsatz
                    _einsatz = null;
                    Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Reset einsatz -> finish");
                }

                _recordMp3Writer?.Dispose();
                _recordWaveStream?.Dispose();
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
            finally
            {
                _recordState      = RecordState.Stopped;
                _recordWaveStream = null;
                _recordMp3Writer  = null;
            }
        }
        private void ProviderOnClassListLoaded(object sender, ClassesListLoadedEventArgs args)
        {
            if (args.Cancelled)
            {
                IsClassListLoading = false;
                return;
            }
            if (args.Error != null)
            {
                ExceptionOccured?.Invoke(args.Error, Method.LoadClass);
                IsClassListLoading = false;
                return;
            }
            var classDict = new Dictionary <string, List <string> >();

            foreach (var @class in args.Classes)
            {
                var match  = _regex.Match(@class);
                var number = match.Groups[1].ToString();
                var liter  = match.Groups[2].ToString().ToUpper();
                if (!classDict.ContainsKey(number))
                {
                    classDict[number] = new List <string>();
                }
                classDict[number].Add(liter);
            }

            Classes            = classDict;
            IsClassListLoading = false;
        }
        private void client_DownloadDataCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
            try
            {
                if (e.Error != null)
                {
                    Logger.WriteError(MethodBase.GetCurrentMethod(), e.Error.Message);
                    return;
                }

                switch (Settings.Default.Riverlevel_Mode)
                {
                case RiverlevelMode.HndBayern:
                    parseHndBayern(e.Result);
                    break;
                }
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
        }
        private void decoderClient_MessageReceived_TETRACONTROL(MessageEventArgs e)
        {
            try
            {
                var _messageFields = e.Data.Split('\t');
                if (_messageFields == null || _messageFields.Count() <= 0)
                {
                    return;
                }

                switch (_messageFields[0])
                {
                case "FMS":
                    if (_messageFields.Count() != 3)
                    {
                        return;
                    }

                    fmsMessageReceived(_messageFields[1], _messageFields[2]);
                    break;
                }
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
        }
예제 #8
0
        private void startRecording()
        {
            try
            {
                if (_einsatz == null)
                {
                    return;
                }

                //Record Device
                _recordWaveStream = new WaveInEvent
                {
                    DeviceNumber = 0,
                    WaveFormat   = new WaveFormat(44100, 16, 2)
                };
                _recordWaveStream.DataAvailable    += recordDevice_DataAvailable;
                _recordWaveStream.RecordingStopped += recordDevice_RecordingStopped;
                _recordWaveStream.StartRecording();

                _recordMp3Writer = new LameMP3FileWriter(_einsatz.RecordPath, _recordWaveStream.WaveFormat, 32);
                _recordState     = RecordState.Recording;

                Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"recordDevice -> Started({_einsatz.RecordPath})");
            }
            catch (Exception)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Message = "recordDevice -> error on start"
                });
            }
        }
예제 #9
0
        private void stopRecording()
        {
            try
            {
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), "recordDevice -> StopRecording");

                if (_recordWaveStream != null)
                {
                    _recordState = RecordState.RequestedStop;
                    _recordWaveStream.StopRecording();
                }
                else
                {
                    Logger.WriteDebug(MethodBase.GetCurrentMethod(), "recordDevice -> already disposed");

                    recordDevice_RecordingStopped(this, null);
                }
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });

                recordDevice_RecordingStopped(this, null);
            }
        }
예제 #10
0
        public void Stop()
        {
            try
            {
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Stopping");
                var stopWatch = new Stopwatch();
                stopWatch.Start();

                unregisterEvents();

                stopRecording();
                _einsatz = null;

                //Stop all running timer without elapsed event
                _timerStatusEnd?.Stop();
                _timerAlarmEnd?.Stop();
                _timerRecordEnd?.Stop();

                stopWatch.Stop();
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"Stopped -> {stopWatch.Elapsed}");
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
            finally
            {
                IsRunning = false;
            }
        }
예제 #11
0
        private void decoderService_PagerMessageReceived(object sender, PagerMessageEventArgs e)
        {
            if (e == null || _recordState == RecordState.RequestedStop)
            {
                return;
            }

            try
            {
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"Pager-Message({e.Identifier})");

                if (_einsatz == null)
                {
                    _einsatz = new Einsatz(App.Path_Record);
                    Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Create new einsatz");

                    startRecording();
                }

                _einsatz.AddPager(e);

                timerAlarmEnd_Reset();
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
        }
        private void updateTimer_Elapsed(object source, ElapsedEventArgs e)
        {
            try
            {
                var _imageUrl = Settings.Default.Warnweather_Url;
                if (!_imageUrl.Contains("WIDTH") && !_imageUrl.Contains("HEIGHT"))
                {
                    _imageUrl += $"&WIDTH={Settings.Default.Warnweather_ImageSize.X}";
                    _imageUrl += $"&HEIGHT={Settings.Default.Warnweather_ImageSize.Y}";
                }

                ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); };
                ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls |
                                                       SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

                using (var _client = new WebClient())
                {
                    _client.DownloadDataCompleted += client_DownloadImageCompleted;
                    _client.DownloadDataAsync(new Uri(_imageUrl));
                }
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
            finally
            {
                //Restart timer
                _updateTimer.Start();
            }
        }
예제 #13
0
        private void faxService_EinsatzCreated(object sender, EinsatzCreatedEventArgs e)
        {
            if (e == null || e.Einsatz == null)
            {
                return;
            }

            if (_apiService == null)
            {
                return;
            }

            Task.Factory.StartNew(() =>
            {
                try
                {
                    Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Fax-Message");

                    _apiService.CreateAlarm(e.Einsatz);
                }
                catch (Exception ex)
                {
                    ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                    {
                        Methode = MethodBase.GetCurrentMethod(),
                        Error   = ex
                    });
                }
            });
        }
예제 #14
0
        private void decoderService_PagerMessageReceived(object sender, PagerMessageEventArgs e)
        {
            if (e == null || e.Pager == null)
            {
                return;
            }

            if (_apiService == null)
            {
                return;
            }

            Task.Factory.StartNew(() =>
            {
                try
                {
                    Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"Pager-Message({e.Identifier})");
                }
                catch (Exception ex)
                {
                    ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                    {
                        Methode = MethodBase.GetCurrentMethod(),
                        Error   = ex
                    });
                }
            });
        }
        public void Start()
        {
            try
            {
                if (string.IsNullOrEmpty(Settings.Default.Riverlevel_Messstelle))
                {
                    Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Riverlevel disabled in settings");
                    return;
                }

                Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Starting");
                var _stopWatch = new Stopwatch();
                _stopWatch.Start();

                IsRunning = false;

                //Query first time
                updateTimer_Elapsed(this, null);

                IsRunning = true;

                _stopWatch.Stop();
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"Started -> {_stopWatch.Elapsed}");
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
        }
예제 #16
0
        public void Start()
        {
            try
            {
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Starting");
                var stopWatch = new Stopwatch();
                stopWatch.Start();

                IsRunning   = false;
                _apiService = null;

                if (string.IsNullOrEmpty(Settings.Default.Alarmapp_ApiToken))
                {
                    Logger.WriteDebug(MethodBase.GetCurrentMethod(), "AuthToken not set");
                    return;
                }

                _apiService = new AlarmappApiService(Settings.Default.Alarmapp_ApiToken);
                timerAlarmEnd_Elapsed(this, null); // reset pagerlist & alarmId
                registerEvents();
                IsRunning = true;

                stopWatch.Stop();
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"Started -> {stopWatch.Elapsed}");
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
        }
        private void decoderClient_MessageReceived_OPERATOR2(MessageEventArgs e)
        {
            try
            {
                var _messageFields = e.Data.Split(';');
                if (_messageFields == null || _messageFields.Count() <= 0)
                {
                    return;
                }

                switch (_messageFields[0])
                {
                case "!FMS":
                    //!FMS;6703xxx;HEFW.xx#xx219MTW......1.;32772;02.08.2014 17:15:29
                    if (_messageFields.Count() != 5)
                    {
                        return;
                    }

                    fmsMessageReceived(_messageFields[1], convertTetraStatusToFms(_messageFields[3]));
                    break;

                case "!SDS":
                    //!SDS;6703xxx;HEFW.xx#xx219MTW......1.;S;Test;02.08.2014 17:15:29
                    if (_messageFields.Count() != 6)
                    {
                    }

                    break;

                case "!ZVEI":
                    //!ZVEI;20815;02.08.2014 17:15:29
                    if (_messageFields.Count() != 3)
                    {
                        return;
                    }

                    pagerMessageReceived(_messageFields[1], null);
                    break;

                case "!POCSAG":
                    //!POCSAG;1234567;1;Brand Wohnhaus;02.08.2014 17:15:29
                    if (_messageFields.Count() != 5)
                    {
                        return;
                    }

                    pagerMessageReceived(_messageFields[1] + _messageFields[2], _messageFields[3]);
                    break;
                }
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
        }
예제 #18
0
        public void Start()
        {
            try
            {
                IsRunning = false;

                Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Starting");
                var _stopWatch = new Stopwatch();
                _stopWatch.Start();

                StartReceiveMail();

                registerEvents();

                IsRunning = true;

                _stopWatch.Stop();
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"Started -> {_stopWatch.Elapsed}");
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
        }
예제 #19
0
 protected void OnExceptionOccured(Exception e)
 {
     ExceptionOccured?.Invoke(this, new ExceptionEventArgs()
     {
         Exception = e
     });
 }
예제 #20
0
        private void rebootTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            try
            {
                //Try to restart
                if (_monitorService.IsAlarmWindow() == false)
                {
                    Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Try to reboot system");

                    RebootSystem();
                }
                else
                {
                    Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Reboot not possible -> alarmwindow open");

                    //Restart timer
                    _rebootTimer.Interval = MsUntilMidnight();
                    _rebootTimer.Start();
                    Logger.WriteDebug(MethodBase.GetCurrentMethod(),
                                      string.Format("Time until reboot: " + TimeSpan.FromMilliseconds(_rebootTimer.Interval)
                                                    .ToString(@"hh\:mm\:ss", null)));
                }
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
        }
예제 #21
0
        public void Stop()
        {
            try
            {
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Stopping");
                var _stopWatch = new Stopwatch();
                _stopWatch.Start();

                unregisterEvents();

                _receiveMailTaskMonitorTimer?.Stop();
                _receiveMailTaskTokenSource?.Cancel();

                _stopWatch.Stop();
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"Stopped -> {_stopWatch.Elapsed}");
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
            finally
            {
                IsRunning = false;
            }
        }
예제 #22
0
        public void Start()
        {
            try
            {
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), "Starting");
                var _stopWatch = new Stopwatch();
                _stopWatch.Start();

                IsRunning    = false;
                _oldPosition = Cursor.Position;
                _refreshTimer.Start();
                IsRunning = true;

                _stopWatch.Stop();
                Logger.WriteDebug(MethodBase.GetCurrentMethod(), $"Started -> {_stopWatch.Elapsed}");
            }
            catch (Exception ex)
            {
                ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
                {
                    Methode = MethodBase.GetCurrentMethod(),
                    Error   = ex
                });
            }
        }
예제 #23
0
        private void Listen(ReceiveMode receiveMode)
        {
            var mr = _messagingFactory.CreateMessageReceiver(_subscription.FullPath, receiveMode);

            while (_isListening)
            {
                BrokeredMessage message = null;
                try
                {
                    message = mr.Receive();
                }
                catch (TimeoutException)
                {
                    ListeningTimedOut?.Invoke();
                    continue;
                }
                catch (OperationCanceledException) //When Cancel() is called on client or factory
                {
                    return;
                }
                catch (Exception ex)
                {
                    ExceptionOccured?.Invoke(message, ex);
                    return;
                }

                if (message == null)
                {
                    continue;
                }

                try
                {
                    var isMessageHandled = HandleMessage(message);
                    if (receiveMode == ReceiveMode.PeekLock)
                    {
                        if (isMessageHandled)
                        {
                            message.Complete();
                        }
                        else
                        {
                            message.Abandon();
                        }
                    }
                }
                catch (Exception ex)
                {
                    if (receiveMode == ReceiveMode.PeekLock)
                    {
                        message.Abandon();
                    }

                    ExceptionOccured?.Invoke(message, ex);
                }

                Thread.Sleep(50);
            }
        }
 private void OnExceptionOccured(Exception e)
 {
     cardQProcessor.StopServiceQProcess();
     ExceptionOccured?.Invoke(this, new ExceptionEventArgs()
     {
         Exception = e
     });
 }
예제 #25
0
 public void FireExceptionOccured(Exception ex)
 {
     if (null == ExceptionOccured)
     {
         return;
     }
     ExceptionOccured.Invoke(this, ex);
 }
예제 #26
0
        protected virtual void ExceptionFire(ExceptionOccured obj)
        {
            EventHandler <ExceptionOccured> handler = OnException;

            if (handler != null)
            {
                handler(this, obj);
            }
        }
        protected virtual async Task <TransitionResult> HandleViewModelTransitionsAsync(
            object sender,
            PageTransitionTrigger trigger,
            IStoryboardPageContext context = null)
        {
            var tcs = new TaskCompletionSource <TransitionResult>();
            await Invoker.InvokeAsync(async() =>
            {
                try
                {
                    if (!(sender is IStoryboardPageViewModel viewModel))
                    {
                        throw new InvalidOperationException("Incorrect request of transition");
                    }

                    // todo is it correct? different behaviour of transition
                    var removingResult = await RemoveOpennedPageAsync()
                                         .ConfigureAwait(true);
                    if (removingResult == null)
                    {
                        tcs.SetResult(TransitionResult.Unavailable);
                        return;
                    }

                    if (removingResult.Item2 != TransitionResult.Completed)
                    {
                        tcs.SetResult(removingResult.Item2);
                        return;
                    }

                    var storyboard = Storyboards.Values.FirstOrDefault(x => x.StoryboardId == viewModel.StoryboardId);
                    if (storyboard == null)
                    {
                        throw new InvalidOperationException("Storyboard not found");
                    }

                    var destinationPageId = storyboard.GetDestinationPage(viewModel.PageId, trigger);
                    var result            = await GoToPageAsync(destinationPageId, storyboard.StoryboardId, context)
                                            .ConfigureAwait(true);

                    tcs.SetResult(result);
                }
                catch (Exception e)
                {
                    ExceptionOccured?.Invoke(this, e);
                    tcs.SetResult(TransitionResult.Failed);
                }
            }).ConfigureAwait(false);

            return(await tcs.Task.ConfigureAwait(false));
        }
예제 #28
0
 /// <summary>
 /// Starts the server
 /// </summary>
 public void Start()
 {
     IsRunning = true;
     try
     {
         hl.Start();
         ServerStarted?.Invoke();
         hl.BeginGetContext(new AsyncCallback(ServerProc), hl);
     }
     catch (HttpListenerException ex)
     {
         ExceptionOccured?.Invoke(ex);
     }
 }
예제 #29
0
        /// <summary>
        /// Executes the workflow activity.
        /// </summary>
        /// <param name="executionContext">The execution context.</param>
        protected override void Execute(CodeActivityContext executionContext)
        {
            if (executionContext == null)
            {
                throw new ArgumentNullException("Code Activity Context is null");
            }

            ITracingService tracingService = executionContext.GetExtension <ITracingService>();

            DXTools.CRM.Solutions.CustomEmails.Common.TraceService.Initialise(tracingService);

            if (tracingService == null)
            {
                throw new InvalidPluginExecutionException("Failed to retrieve tracing service.");
            }

            IWorkflowContext context = executionContext.GetExtension <IWorkflowContext>();

            this.WorkflowContext = context;

            if (context == null)
            {
                throw new InvalidPluginExecutionException("Failed to retrieve workflow context.");
            }

            IOrganizationServiceFactory serviceFactory = executionContext.GetExtension <IOrganizationServiceFactory>();
            IOrganizationService        service        = serviceFactory.CreateOrganizationService(context.UserId);

            OrganizationServiceFactory = serviceFactory;
            OrganizationService        = service;

            tracingService.Trace("Entered custom activity, Correlation Id: {0}, Initiating User: {1}", context.CorrelationId, context.InitiatingUserId);

            try
            {
                TraceService.Trace("Entering ExecuteActivity {0}. Correlation Id: {1}", this.GetType().FullName, context.CorrelationId);
                this.ExecuteActivity(executionContext);
                TraceService.Trace("Ending ExecuteActivity {0}.  Correlation Id: {1}", this.GetType().FullName, context.CorrelationId);
            }
            catch (Exception e)
            {
                ExceptionOccured.Set(executionContext, true);
                ExceptionMessage.Set(executionContext, e.Message);

                if (FailOnException.Get <bool>(executionContext))
                {
                    throw new InvalidPluginExecutionException(e.Message, e);
                }
            }
        }
예제 #30
0
 public void AddAlarmWindow(AlarmWindow _alarmWindow)
 {
     try
     {
         _alarmWindows.Add(_alarmWindow);
     }
     catch (Exception ex)
     {
         ExceptionOccured.RaiseEvent(this, new ExceptionEventArgs
         {
             Methode = MethodBase.GetCurrentMethod(),
             Error   = ex
         });
     }
 }