2 // Pipeline.cs: Soap Filter Pipeline
5 // Sebastien Pouliot (spouliot@motus.com)
7 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
11 using Microsoft
.Web
.Services
.Configuration
;
13 namespace Microsoft
.Web
.Services
{
16 // 1. Inside the Web Services Enhancements Pipeline
17 // http://msdn.microsoft.com/library/en-us/dnwebsrv/html/insidewsepipe.asp
19 public class Pipeline
{
21 private SoapInputFilterCollection input
;
22 private SoapOutputFilterCollection output
;
27 input
= (SoapInputFilterCollection
) WebServicesConfiguration
.FilterConfiguration
.InputFilters
.Clone ();
28 output
= (SoapOutputFilterCollection
) WebServicesConfiguration
.FilterConfiguration
.OutputFilters
.Clone ();
31 public Pipeline (Pipeline pipeline
)
34 throw new ArgumentNullException ("pipeline");
35 input
= (SoapInputFilterCollection
) pipeline
.InputFilters
.Clone ();
36 output
= (SoapOutputFilterCollection
) pipeline
.OutputFilters
.Clone ();
39 public Pipeline (SoapInputFilterCollection inputFilters
, SoapOutputFilterCollection outputFilters
)
41 if (inputFilters
== null)
42 throw new ArgumentNullException ("inputFilters");
43 if (outputFilters
== null)
44 throw new ArgumentNullException ("outputFilters");
45 input
= (SoapInputFilterCollection
) inputFilters
.Clone ();
46 output
= (SoapOutputFilterCollection
) outputFilters
.Clone ();
49 public SoapInputFilterCollection InputFilters
{
53 public SoapOutputFilterCollection OutputFilters
{
54 get { return output; }
57 public void ProcessInputMessage (SoapEnvelope envelope
)
60 for (int x
=0; x
< input
.Count
; x
++)
61 input
[x
].ProcessMessage (envelope
);
64 public void ProcessOutputMessage (SoapEnvelope envelope
)
66 // in reverse order - see reference [1]
67 for (int x
=output
.Count
- 1; x
>= 0; x
--)
68 output
[x
].ProcessMessage (envelope
);