아래의 내용이 우리의 서비스 계약이라고 가정 해 보겠습니다. [ServiceContract]
입니다 단지 public interface IService
위WCF ServiceFilter, ASP.NET MVC ActionFilter
using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
namespace WCFSimple.Contract
{
[ServiceContract]
public interface IService
{
[OperationContract]
string Ping(string name);
}
}
것은 (나는 그것이라고하지만 누군가가 말해 줄 수 있다면 감사하겠습니다 모르는) 나에게 아이디어를주고있다.
ASP.NET MVC에서 ActionFilter라는 간단한 것을 갖고 싶습니다.
WCF에서이를 수행 할 수 있습니까? 할 수 있다면, 거기에서 내가 통제 할 수있는 것이 무엇일까?
중복에 ActionFilter처럼, 모든 .NET 프로그램에서 aspect 지향 프로그래밍을 할 PostSharp을 사용할 수 있습니다 http://stackoverflow.com/questions/6812054/mvc-actionfilter-like-attributes-for-wcf) -이 질문에 대한 내 대답을보고 –