Files
BeWoPlaner/BeWo/ServiceProxy/ExceptionHandlingInterceptor.cs

32 lines
1.0 KiB
C#
Raw Permalink Normal View History

2016-06-27 01:45:38 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Windows;
using System.Reflection;
using Proxies;
namespace BeWo.ServiceProxy
{
public class ExceptionHandlingInterceptor : InvocationHandler
{
public void AfterMethodInvocation(MethodContextInfo CurrentMethod, ref object[] MethodArgs, ref object ReturnValue, ref bool BubbleException)
{
int i = 0;
}
public void AfterMethodInvocationWithException(MethodContextInfo CurrentMethod, Exception GeneratedException, ref bool BubbleGeneratedException, ref bool BubbleException)
{
//TODO: SERVICE EXCEPTION HANDLING
MessageBox.Show(GeneratedException.InnerException.Message);
BubbleException = false;
}
public void BeforeMethodInvocation(MethodContextInfo CurrentMethod, ref object[] MethodArgs, ref bool CallMethod, ref bool BubbleException)
{
int i = 0;
}
}
}