[Mono-dev] [Mono-list] Two questions about .net/mono internals
Robert Jordan
robertj at gmx.net
Fri Aug 4 03:27:06 EDT 2006
Hey,
L.G. Meredith wrote:
> Another quick follow up. Suppose that my incoming request were not SOAP --
> e.g. it was coming from the proprietary format stream, then implementing a
> SOAP extension will not do what i want. i know that there must be a way to
> get the current call, but the APIs seem a bit disjointed. i have looked at
>
> MethodInfo.GetCurrentMethod <--> returns a MethodInfo -- no information
> about the call
>
> i have looked at StackTrace and StackFrame, but cannot see a way to get the
> call information off of these classes easily.
>
> With a ContextBoundObject i can get hold of an instance implementing
>
> IMethodCallMessage <--> does have the call information
>
> But, in the latter case, ContextBoundObject must be in the inheritance
> chain. Unfortunately, in this case, c# does not allow multiple inheritance;
> so, an object cannot both be a Service (e.g. WebService) and a
> ContextBoundObject. In fact WebService and ContextBoundObject are at odds
> about marshaling policy. In short, the ContextBoundObject approach is not
> compositional -- it doesn't compose with other functionality.
A Web Service doesn't need to inherit from the WebService class.
The HTTP context information (a reason why the WebService class
exists) can be obtained from HttpContent.Current as well.
Robert
More information about the Mono-devel-list
mailing list