Dummy_2_1.cs 5.1 KB

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