Merge pull request #4828 from BrzVlad/fix-windows-ci
[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 using System.Threading;
11
12 namespace System.Runtime.CompilerServices
13 {
14         // introduced for silverlight sdk compatibility
15         internal class FriendAccessAllowedAttribute : Attribute
16         {
17                 public FriendAccessAllowedAttribute ()
18                 {
19                 }
20         }
21 }
22
23 namespace System.ServiceModel
24 {
25         public class EndpointIdentity {}
26         public class InstanceContext : CommunicationObject, IExtensibleObject<InstanceContext>
27         {
28                 protected internal override TimeSpan DefaultCloseTimeout
29                 {
30                         get { throw new NotImplementedException (); }
31                 }
32
33                 protected internal override TimeSpan DefaultOpenTimeout
34                 {
35                         get { throw new NotImplementedException (); }
36                 }
37
38                 public IExtensionCollection<InstanceContext> Extensions
39                 {
40                         get { throw new NotImplementedException (); }
41                 }
42
43                 public SynchronizationContext SynchronizationContext {
44                         get { throw new NotImplementedException (); }
45                         set { throw new NotImplementedException (); }
46                 }
47
48                 public InstanceContext (object implementation)
49                 {
50                 }
51
52                 public object GetServiceInstance (Message message)
53                 {
54                         throw new NotImplementedException ();
55                 }
56
57                 protected override void OnAbort ()
58                 {
59                         throw new NotImplementedException ();
60                 }
61
62                 protected override IAsyncResult OnBeginClose (TimeSpan timeout, AsyncCallback callback, object state)
63                 {
64                         throw new NotImplementedException ();
65                 }
66
67                 protected override IAsyncResult OnBeginOpen (TimeSpan timeout, AsyncCallback callback, object state)
68                 {
69                         throw new NotImplementedException ();
70                 }
71
72                 protected override void OnClose (TimeSpan timeout)
73                 {
74                         throw new NotImplementedException ();
75                 }
76
77                 protected override void OnClosed ()
78                 {
79                         throw new NotImplementedException ();
80                 }
81
82                 protected override void OnEndClose (IAsyncResult result)
83                 {
84                         throw new NotImplementedException ();
85                 }
86
87                 protected override void OnEndOpen (IAsyncResult result)
88                 {
89                         throw new NotImplementedException ();
90                 }
91
92                 protected override void OnFaulted ()
93                 {
94                         throw new NotImplementedException ();
95                 }
96
97                 protected override void OnOpen (TimeSpan timeout)
98                 {
99                         throw new NotImplementedException ();
100                 }
101
102                 protected override void OnOpened ()
103                 {
104                         throw new NotImplementedException ();
105                 }
106
107                 protected override void OnOpening ()
108                 {
109                         throw new NotImplementedException ();
110                 }
111         }
112         // introduced for silverlight sdk compatibility
113         internal class OperationFormatStyleHelper
114         {
115                 public static bool IsDefined (OperationFormatStyle style)
116                 {
117                         switch (style) {
118                         case OperationFormatStyle.Document:
119                         case OperationFormatStyle.Rpc:
120                                 return true;
121                         }
122                         return false;
123                 }
124         }
125         
126         [FriendAccessAllowed]
127         internal interface IDispatchOperation
128         {
129                 bool DeserializeRequest { get; set; }
130                 IDispatchMessageFormatter Formatter { get; set; }
131                 string Name { get; }
132                 bool SerializeReply { get; set; }
133         }
134 }
135 namespace System.ServiceModel.Channels
136 {
137         public interface ITransportTokenAssertionProvider {}
138         public static class UrlUtility {
139                 public static string UrlEncode (string s, Encoding e)
140                 {
141                         return s;
142                 }
143
144                 public static string UrlDecode (string s, Encoding e)
145                 {
146                         return s;
147                 }
148         }
149 }
150 namespace System.ServiceModel.Channels.Http
151 {
152 }
153 namespace System.ServiceModel.Channels.Security
154 {
155 }
156 namespace System.ServiceModel.Configuration
157 {
158         class Dummy {}
159 }
160 namespace System.ServiceModel.Description
161 {
162         public interface IPolicyExportExtension {}
163         public interface IPolicyImportExtension {}
164         public interface IWsdlExportExtension {}
165         public interface IWsdlImportExtension {}
166
167         // introduced for silverlight sdk compatibility
168         internal class ServiceReflector
169         {
170                 public static T GetSingleAttribute<T> (ICustomAttributeProvider p, Type [] types)
171                 {
172                         T ret = default (T);
173                         foreach (Type t in types) {
174                                 foreach (object att in p.GetCustomAttributes (t, false)) {
175                                         if (att is T) {
176                                                 if (ret != null)
177                                                         throw new InvalidOperationException (String.Format ("More than one {0} attributes are found in the argument types", typeof (T)));
178                                                 ret = (T) att;
179                                         }
180                                 }
181                         }
182                         return ret;
183                 }
184         }
185 }
186 namespace System.ServiceModel
187 {
188         // introduced for silverlight sdk compatibility
189         internal interface IDuplexHelper { }
190
191         [FriendAccessAllowed ()]
192         internal class DiagnosticUtility
193         {
194                 [FriendAccessAllowed ()]
195                 internal class ExceptionUtility
196                 {
197                         public static Exception ThrowHelperArgument (string message) { throw new NotImplementedException (); }
198                         
199                         public static Exception ThrowHelperArgument (string paramName, string message) { throw new NotImplementedException (); }
200                         
201                         public static Exception ThrowHelperArgumentNull (string arg)
202                         {
203                                 return new ArgumentNullException (arg);
204                         }
205
206                         [FriendAccessAllowed]
207                         internal static Exception ThrowHelperCallback (Exception e) { throw new NotImplementedException (); }
208                         
209                         [FriendAccessAllowed]
210                         internal static Exception ThrowHelperCallback (string message, Exception innerException) { throw new NotImplementedException (); }
211                         
212                         public static Exception ThrowHelperError (Exception error)
213                         {
214                                 return error;
215                         }
216                         
217                         [FriendAccessAllowed]
218                         internal static Exception ThrowHelperFatal (string message, Exception innerException) { throw new NotImplementedException (); }
219                         
220                         [FriendAccessAllowed]
221                         internal static Exception ThrowHelperInternal (bool fatal) { throw new NotImplementedException (); }
222                         
223                         public static Exception ThrowHelperWarning (Exception e) { throw new NotImplementedException (); }
224                 }
225         }
226 }
227
228 namespace System.ServiceModel.Dispatcher
229 {
230         public sealed class EndpointDispatcher
231         {
232                 internal EndpointDispatcher ()
233                 {
234                 }
235         }
236
237         internal class FaultFormatter : IClientFaultFormatter
238         {
239                 internal FaultFormatter (Type[] detailTypes) { throw new NotImplementedException (); }
240                 internal FaultFormatter (SynchronizedCollection<FaultContractInfo> faultContractInfoCollection) { throw new NotImplementedException (); }
241                 protected virtual FaultException CreateFaultException (MessageFault messageFault, string action) { throw new NotImplementedException (); }
242                 protected FaultException CreateFaultException (MessageFault messageFault, string action, object detailObj, Type detailType, XmlDictionaryReader detailReader) { throw new NotImplementedException (); }
243                 public FaultException Deserialize (MessageFault messageFault, string action) { throw new NotImplementedException (); }
244                 protected virtual XmlObjectSerializer GetSerializer (Type detailType, string faultExceptionAction, out string action) { throw new NotImplementedException (); }
245         }
246
247         internal interface IClientFaultFormatter
248         {
249                 FaultException Deserialize (MessageFault messageFault, string action);
250         }
251 }
252 namespace System.ServiceModel.Security
253 {
254         class Dummy {}
255 }
256 #if !MOBILE
257 namespace System.Net.Security
258 {
259         public enum ProtectionLevel {None}
260 }
261 namespace System.Xml.Serialization
262 {
263         public class XmlTypeMapping {}
264 }
265 namespace System.Xml.XPath
266 {
267         class Dummy {}
268 }
269 namespace Mono.Xml.XPath
270 {
271         class Dummy {}
272 }
273 #endif
274 #endif