public class TenantPropagationMessageInspector<TTenantId> : IClientMessageInspector, IDispatchMessageInspector
Public Class TenantPropagationMessageInspector(Of TTenantId) Implements IClientMessageInspector, IDispatchMessageInspector
Thetype exposes the following members.
Initializes a new instance of theclass.
Gets the strategy used for identifying the current tenant.
Enables inspection or modification of a message after a reply message is received but prior to passing it back to the client application.
Inspects inbound message headers and adds an TenantIdentificationContextExtension to the current operation context with the tenant ID.
Called after the operation has returned but before the reply message is sent.
Adds the tenant ID to the outbound message headers.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function.(Inherited from Object.)
Gets the Type of the current instance.(Inherited from Object.)
Creates a shallow copy of the current Object.(Inherited from Object.)
Returns a string that represents the current object.(Inherited from Object.)
Name of the header that gets added to messages and carries the tenant ID.
Namespace of the header that gets added to messages and carries tenant information.
Use this in conjunction with the TenantPropagationBehaviorTTenantId to automatically get the tenant ID on the WCF client end, add the ID to a header on the outbound message, and have the tenant ID read from headers on the service side and added to the operation context in an TenantIdentificationContextExtension. This allows you, on the service side, to use the OperationContextTenantIdentificationStrategy as your registered ITenantIdentificationStrategy.
For a usage example, see TenantPropagationBehaviorTTenantId.