WCF ServiceFilter,如ASP.NET MVC ActionFilter

时间:2011-07-31 07:25:35

标签: c# .net asp.net-mvc wcf

让我们假设下面的是我们的服务合同;

using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;

namespace WCFSimple.Contract
{
    [ServiceContract]
    public interface IService
    {
        [OperationContract]
        string Ping(string name);
    }
}

事情(我不知道它叫什么,但如果有人能告诉我的话,我会很感激),public interface IService [ServiceContract]正在给我一个想法。

我想在ASP.NET MVC上有一个简单的ActionFilter。

我可以在WCF上执行此操作吗?如果可以的话,它能让我控制那里吗?

1 个答案:

答案 0 :(得分:0)

你可以使用PostSharp在任何.NET程序中进行面向方面的编程,例如asp.net mvc中的ActionFilter(OnExecuting / OnBeforeExecuteing / OnExecuted / etc)

相关问题