DispatchRuntime.cs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. //
  2. // DispatchRuntime.cs
  3. //
  4. // Author:
  5. // Atsushi Enomoto <[email protected]>
  6. //
  7. // Copyright (C) 2005-2010 Novell, Inc. http://www.novell.com
  8. //
  9. // Permission is hereby granted, free of charge, to any person obtaining
  10. // a copy of this software and associated documentation files (the
  11. // "Software"), to deal in the Software without restriction, including
  12. // without limitation the rights to use, copy, modify, merge, publish,
  13. // distribute, sublicense, and/or sell copies of the Software, and to
  14. // permit persons to whom the Software is furnished to do so, subject to
  15. // the following conditions:
  16. //
  17. // The above copyright notice and this permission notice shall be
  18. // included in all copies or substantial portions of the Software.
  19. //
  20. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  21. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  22. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  23. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  24. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  25. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  26. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  27. //
  28. using System;
  29. using System.Collections.Generic;
  30. using System.Collections.ObjectModel;
  31. using System.Reflection;
  32. using System.IdentityModel.Policy;
  33. using System.ServiceModel.Channels;
  34. using System.Text;
  35. using System.Threading;
  36. using System.ServiceModel;
  37. using System.ServiceModel.Description;
  38. using System.Web.Security;
  39. namespace System.ServiceModel.Dispatcher
  40. {
  41. public sealed class DispatchRuntime
  42. {
  43. DispatchOperation.DispatchOperationCollection operations =
  44. new DispatchOperation.DispatchOperationCollection ();
  45. internal DispatchRuntime (EndpointDispatcher dispatcher, ClientRuntime callbackClientRuntime)
  46. {
  47. EndpointDispatcher = dispatcher;
  48. CallbackClientRuntime = callbackClientRuntime ?? new ClientRuntime (EndpointDispatcher.ContractName, EndpointDispatcher.ContractNamespace, this);
  49. UnhandledDispatchOperation = new DispatchOperation (
  50. this, "*", "*", "*");
  51. AutomaticInputSessionShutdown = true;
  52. PrincipalPermissionMode = PrincipalPermissionMode.UseWindowsGroups; // silly default value for us.
  53. SuppressAuditFailure = true;
  54. ValidateMustUnderstand = true;
  55. InputSessionShutdownHandlers = new SynchronizedCollection<IInputSessionShutdown> ();
  56. InstanceContextInitializers = new SynchronizedCollection<IInstanceContextInitializer> ();
  57. MessageInspectors = new SynchronizedCollection<IDispatchMessageInspector> ();
  58. }
  59. [MonoTODO]
  60. public AuditLogLocation SecurityAuditLogLocation { get; set; }
  61. [MonoTODO]
  62. public bool AutomaticInputSessionShutdown { get; set; }
  63. public ChannelDispatcher ChannelDispatcher {
  64. get { return EndpointDispatcher.ChannelDispatcher; }
  65. }
  66. [MonoTODO]
  67. public ConcurrencyMode ConcurrencyMode { get; set; }
  68. public EndpointDispatcher EndpointDispatcher { get; private set; }
  69. public ClientRuntime CallbackClientRuntime { get; internal set; }
  70. [MonoTODO]
  71. public ReadOnlyCollection<IAuthorizationPolicy> ExternalAuthorizationPolicies { get; set; }
  72. [MonoTODO]
  73. public bool IgnoreTransactionMessageProperty { get; set; }
  74. [MonoTODO]
  75. public bool ImpersonateCallerForAllOperations { get; set; }
  76. [MonoTODO]
  77. public SynchronizedCollection<IInputSessionShutdown> InputSessionShutdownHandlers { get; private set; }
  78. [MonoTODO]
  79. public SynchronizedCollection<IInstanceContextInitializer> InstanceContextInitializers { get; private set; }
  80. public IInstanceProvider InstanceProvider { get; set; }
  81. public IInstanceContextProvider InstanceContextProvider { get; set; }
  82. [MonoTODO]
  83. public AuditLevel MessageAuthenticationAuditLevel { get; set; }
  84. public SynchronizedCollection<IDispatchMessageInspector> MessageInspectors { get; private set; }
  85. public SynchronizedKeyedCollection<string,DispatchOperation> Operations {
  86. get { return operations; }
  87. }
  88. public IDispatchOperationSelector OperationSelector { get; set; }
  89. [MonoTODO]
  90. public PrincipalPermissionMode PrincipalPermissionMode { get; set; }
  91. [MonoTODO]
  92. public bool ReleaseServiceInstanceOnTransactionComplete { get; set; }
  93. [MonoTODO]
  94. public RoleProvider RoleProvider { get; set; }
  95. [MonoTODO]
  96. public AuditLevel ServiceAuthorizationAuditLevel { get; set; }
  97. [MonoTODO]
  98. public ServiceAuthorizationManager ServiceAuthorizationManager { get; set; }
  99. public InstanceContext SingletonInstanceContext { get; set; }
  100. [MonoTODO]
  101. public bool SuppressAuditFailure { get; set; }
  102. [MonoTODO]
  103. public SynchronizationContext SynchronizationContext { get; set; }
  104. [MonoTODO]
  105. public bool TransactionAutoCompleteOnSessionClose { get; set; }
  106. public Type Type { get; set; }
  107. public DispatchOperation UnhandledDispatchOperation { get; set; }
  108. public bool ValidateMustUnderstand { get; set; }
  109. }
  110. }