나는 추적 메커니즘을 직접 구현하고있다. 이제 내가 알고 싶은 것은이 메커니즘을 구현하는 가장 좋은 방법이 무엇인지 (즉, 아키텍처)..net에서 추적을 구현하는 방법
class Tracer {
public void NewEventRegistered(etc) {...} //this is the method I use to send this class the events I want to register
event newEventRegistered(..) //this is the event the user is going to use to catch all the events in the application that have been sent to NewEventRegistered method.
}
을하지만 그때 나는 나를 쓰기를 WriteLine 메소드를 구현하자 TraceListener에서 클래스가 보았다 : 우선이 같은 클래스를 만드는 생각했다. 큰 단점은 두 가지 방법 모두 문자열을 인수로 허용하고 문자열보다 많은 정보를 보낼 수 있기를 원합니다. 어떻게해야합니까? 어쩌면 내 첫 번째 이데올로기가 최고일까요?
편집 : PostSharp와 같은 많은 추적 메커니즘이 있다는 것을 알고 있습니다. 학습 목적으로이 작업을 수행하고 있습니다!