* ActivationServices.cs: Added the method Activate that performs the forwards the
[mono.git] / mcs / class / corlib / System.Runtime.Remoting.Activation / ConstructionLevelActivator.cs
1 //
2 // System.Runtime.Remoting.Activation.ConstructionLevelActivator.cs
3 //
4 // Author: Lluis Sanchez Gual (lluis@ideary.com)
5 //
6 // (C) 2003, Lluis Sanchez Gual
7 //
8
9 using System;
10 using System.Runtime.Remoting.Messaging;
11
12 namespace System.Runtime.Remoting.Activation
13 {
14         [Serializable]
15         public class ConstructionLevelActivator: IActivator
16         {
17                 IActivator _next;
18
19                 public ActivatorLevel Level 
20                 {
21                         get { return ActivatorLevel.Construction; }
22                 }
23
24                 public IActivator NextActivator 
25                 {
26                         get { return _next; }
27                         set { _next = value; }
28                 }
29
30                 public IConstructionReturnMessage Activate (IConstructionCallMessage msg)
31                 {
32                         // The StackBuilderSink at the end of the server context sink chain will do the job
33                         return (IConstructionReturnMessage) Threading.Thread.CurrentContext.GetServerContextSinkChain().SyncProcessMessage (msg);
34                 }
35         }
36 }