[tests] Remove double inclusion of source file
[mono.git] / mcs / class / System.ServiceModel / Dummy_2_1.cs
1 #if !XAMMAC_4_5
2 using System.Collections.Generic;
3 using System.Reflection;
4 using System.Runtime.Serialization;
5 using System.Runtime.CompilerServices;
6 using System.ServiceModel.Channels;
7 using System.ServiceModel.Dispatcher;
8 using System.Text;
9 using System.Xml;
10
11 namespace System.Runtime.CompilerServices
12 {
13         // introduced for silverlight sdk compatibility
14         internal class FriendAccessAllowedAttribute : Attribute
15         {
16                 public FriendAccessAllowedAttribute ()
17                 {
18                 }
19         }
20 }
21
22 namespace System.ServiceModel
23 {
24         public class EndpointIdentity {}
25         public class InstanceContext
26         {
27                 public InstanceContext (object dummy) {}
28         }
29         // introduced for silverlight sdk compatibility
30         internal class OperationFormatStyleHelper
31         {
32                 public static bool IsDefined (OperationFormatStyle style)
33                 {
34                         switch (style) {
35                         case OperationFormatStyle.Document:
36                         case OperationFormatStyle.Rpc:
37                                 return true;
38                         }
39                         return false;
40                 }
41         }
42         
43         [FriendAccessAllowed]
44         internal interface IDispatchOperation
45         {
46                 bool DeserializeRequest { get; set; }
47                 IDispatchMessageFormatter Formatter { get; set; }
48                 string Name { get; }
49                 bool SerializeReply { get; set; }
50         }
51 }
52 namespace System.ServiceModel.Channels
53 {
54         public interface ITransportTokenAssertionProvider {}
55         public static class UrlUtility {
56                 public static string UrlEncode (string s, Encoding e)
57                 {
58                         return s;
59                 }
60
61                 public static string UrlDecode (string s, Encoding e)
62                 {
63                         return s;
64                 }
65         }
66 }
67 namespace System.ServiceModel.Channels.Http
68 {
69 }
70 namespace System.ServiceModel.Channels.Security
71 {
72 }
73 namespace System.ServiceModel.Configuration
74 {
75         class Dummy {}
76 }
77 namespace System.ServiceModel.Description
78 {
79         public interface IPolicyExportExtension {}
80         public interface IPolicyImportExtension {}
81         public interface IWsdlExportExtension {}
82         public interface IWsdlImportExtension {}
83
84         // introduced for silverlight sdk compatibility
85         internal class ServiceReflector
86         {
87                 public static T GetSingleAttribute<T> (ICustomAttributeProvider p, Type [] types)
88                 {
89                         T ret = default (T);
90                         foreach (Type t in types) {
91                                 foreach (object att in p.GetCustomAttributes (t, false)) {
92                                         if (att is T) {
93                                                 if (ret != null)
94                                                         throw new InvalidOperationException (String.Format ("More than one {0} attributes are found in the argument types", typeof (T)));
95                                                 ret = (T) att;
96                                         }
97                                 }
98                         }
99                         return ret;
100                 }
101         }
102 }
103 namespace System.ServiceModel
104 {
105         // introduced for silverlight sdk compatibility
106         internal interface IDuplexHelper { }
107
108         [FriendAccessAllowed ()]
109         internal class DiagnosticUtility
110         {
111                 [FriendAccessAllowed ()]
112                 internal class ExceptionUtility
113                 {
114                         public static Exception ThrowHelperArgument (string message) { throw new NotImplementedException (); }
115                         
116                         public static Exception ThrowHelperArgument (string paramName, string message) { throw new NotImplementedException (); }
117                         
118                         public static Exception ThrowHelperArgumentNull (string arg)
119                         {
120                                 return new ArgumentNullException (arg);
121                         }
122
123                         [FriendAccessAllowed]
124                         internal static Exception ThrowHelperCallback (Exception e) { throw new NotImplementedException (); }
125                         
126                         [FriendAccessAllowed]
127                         internal static Exception ThrowHelperCallback (string message, Exception innerException) { throw new NotImplementedException (); }
128                         
129                         public static Exception ThrowHelperError (Exception error)
130                         {
131                                 return error;
132                         }
133                         
134                         [FriendAccessAllowed]
135                         internal static Exception ThrowHelperFatal (string message, Exception innerException) { throw new NotImplementedException (); }
136                         
137                         [FriendAccessAllowed]
138                         internal static Exception ThrowHelperInternal (bool fatal) { throw new NotImplementedException (); }
139                         
140                         public static Exception ThrowHelperWarning (Exception e) { throw new NotImplementedException (); }
141                 }
142         }
143 }
144
145 namespace System.ServiceModel.Dispatcher
146 {
147         public sealed class EndpointDispatcher
148         {
149                 internal EndpointDispatcher ()
150                 {
151                 }
152         }
153
154         internal class FaultFormatter : IClientFaultFormatter
155         {
156                 internal FaultFormatter (Type[] detailTypes) { throw new NotImplementedException (); }
157                 internal FaultFormatter (SynchronizedCollection<FaultContractInfo> faultContractInfoCollection) { throw new NotImplementedException (); }
158                 protected virtual FaultException CreateFaultException (MessageFault messageFault, string action) { throw new NotImplementedException (); }
159                 protected FaultException CreateFaultException (MessageFault messageFault, string action, object detailObj, Type detailType, XmlDictionaryReader detailReader) { throw new NotImplementedException (); }
160                 public FaultException Deserialize (MessageFault messageFault, string action) { throw new NotImplementedException (); }
161                 protected virtual XmlObjectSerializer GetSerializer (Type detailType, string faultExceptionAction, out string action) { throw new NotImplementedException (); }
162         }
163
164         internal interface IClientFaultFormatter
165         {
166                 FaultException Deserialize (MessageFault messageFault, string action);
167         }
168 }
169 namespace System.ServiceModel.Security
170 {
171         class Dummy {}
172 }
173 #if !MOBILE
174 namespace System.Net.Security
175 {
176         public enum ProtectionLevel {None}
177 }
178 namespace System.Xml.Serialization
179 {
180         public class XmlTypeMapping {}
181 }
182 namespace System.Xml.XPath
183 {
184         class Dummy {}
185 }
186 namespace Mono.Xml.XPath
187 {
188         class Dummy {}
189 }
190 #endif
191 #endif