Interface IEndpoint
Represents an endpoint that listens for requests for a given service contract when started.
Namespace: Copper.Common.Interface
Assembly: Copper.Common.dll
Syntax
public interface IEndpoint
Methods
View SourceRetrieveEndpointMetadata()
Retrieves the endpoint's metadata.
Declaration
EndpointMetadata RetrieveEndpointMetadata()
Returns
| Type | Description |
|---|---|
| EndpointMetadata | The endpoint's metadata. |
Start<TContract>(TContract)
Starts the endpoint, causing it to start listening for requests.
Declaration
Task<string> Start<TContract>(TContract instance)
where TContract : class
Parameters
| Type | Name | Description |
|---|---|---|
| TContract | instance | The instance implementing the service contract. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | A System.Threading.Tasks.Task that represents outstanding operation. The result of the System.Threading.Tasks.Task is the endpoint System.String. |
Type Parameters
| Name | Description |
|---|---|
| TContract | The service contract type. |
Stop()
Stops the endpoint, causing it to not receive any requests.
Declaration
Task Stop()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents outstanding operation. |