o fixes for windows build
[mono.git] / mcs / class / Microsoft.Web.Services / Microsoft.Web.Services.Configuration / WebServicesConfiguration.cs
1 //
2 // WebServicesConfiguration.cs: Web Services Configuration
3 //
4 // Author:
5 //      Sebastien Pouliot (spouliot@motus.com)
6 //
7 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
8 //
9
10 using System;
11 using System.Configuration;
12 using System.Xml;
13
14 namespace Microsoft.Web.Services.Configuration {
15
16         internal class WSEConfig {
17                 bool diagnosticsTraceEnabled;
18                 string diagnosticsTraceInputFilename;
19                 string diagnosticsTraceOutputFilename;
20
21                 public WSEConfig (XmlNode section) 
22                 {
23                         XmlNode trace = section.SelectSingleNode ("/diagnostics/trace");
24                         if (trace != null) {
25                                 diagnosticsTraceEnabled = (trace.Attributes ["enabled"].InnerText == "true");
26                                 diagnosticsTraceInputFilename = trace.Attributes ["input"].InnerText;
27                                 diagnosticsTraceOutputFilename = trace.Attributes ["output"].InnerText;
28                         }
29                 }
30
31                 public bool Trace {
32                         get { return diagnosticsTraceEnabled; }
33                 }
34
35                 public string TraceInput {
36                         get { return diagnosticsTraceInputFilename; }
37                 }
38
39                 public string TraceOutput {
40                         get { return diagnosticsTraceOutputFilename; }
41                 }
42         }
43
44         public sealed class WebServicesConfiguration : ConfigurationBase, IConfigurationSectionHandler {
45
46                 static WSEConfig config;
47
48                 static WebServicesConfiguration () 
49                 {
50                         config = (WSEConfig) ConfigurationSettings.GetConfig ("microsoft.web.services");
51                 }
52
53                 internal WebServicesConfiguration () {}
54
55                 internal static WSEConfig Config {
56                         get { return config; }
57                 }
58
59                 public static FilterConfiguration FilterConfiguration { 
60                         get { return new FilterConfiguration (); }
61                 }
62 /* FIXME: Classes are not stubbed yet, breaks a WSE2 build
63 #if WSE2
64                 [MonoTODO()]
65                 public static MessagingConfiguration MessagingConfiguration {
66                         get { return null; }
67                 }
68
69                 [MonoTODO()]
70                 public static TokenIssuerConfiguration TokenIssuerConfiguration {
71                         get { return null; }
72                 }
73 #endif */
74
75                 // from IConfigurationSectionHandler
76                 [MonoTODO()]
77                 object IConfigurationSectionHandler.Create (object parent, object configContext, XmlNode section) 
78                 {
79                         return new WSEConfig (section);
80                 }
81         }
82 }