RequestToken Class
Definition
Provides a default implementation of the IRequestToken interface.
public record RequestToken : IRequestToken, IEquatable<RequestToken>
- Inheritance
-
RequestToken
- Implements
Examples
The following example demonstrates how to use
using System;
using Cuemon.Messaging;
namespace MyApp.Examples;
public class RequestTokenExample
{
public void Demonstrate()
{
// Each request gets its own unique ID
var request1 = new RequestToken();
var request2 = new RequestToken();
Console.WriteLine($"Request 1 ID: {request1}");
Console.WriteLine($"Request 2 ID: {request2}");
Console.WriteLine($"Are they different? {request1.RequestId != request2.RequestId}");
}
}
Constructors
| Name | Description |
|---|---|
| RequestToken(string) | Initializes a new instance of the RequestToken class. |
Properties
| Name | Description |
|---|---|
| RequestId | Gets the unique request identifier. |
Methods
| Name | Description |
|---|---|
| ToString() | Returns a string that represents this instance. |