ข้ามไปยังเนื้อหา

Class LazyTransportBinding

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Behaviors.Http
Assembly: Cephalon.Behaviors.Http.dll

Deferred-initialization wrapper around an . Ensures that is called exactly once, on first request, using a to guard concurrent callers. This keeps pod startup under 100 ms regardless of transport count.

public sealed class LazyTransportBinding : IDisposable

objectLazyTransportBinding

IDisposable

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

EnsureMappedAsync(WebApplication, BehaviorTopologyDescriptor, BehaviorDispatcher, IHttpBehaviorBinding, CancellationToken)

Section titled “ EnsureMappedAsync(WebApplication, BehaviorTopologyDescriptor, BehaviorDispatcher, IHttpBehaviorBinding, CancellationToken)”

Ensures the binding has been mapped. If not yet mapped, calls under a semaphore, then marks the instance as initialized so subsequent calls return immediately. On initialization failure the flag is NOT set, allowing a retry on the next call.

public Task EnsureMappedAsync(WebApplication app, BehaviorTopologyDescriptor descriptor, BehaviorDispatcher dispatcher, IHttpBehaviorBinding binding, CancellationToken ct = default)

app WebApplication

The web application to register routes on.

descriptor BehaviorTopologyDescriptor

The behavior topology descriptor.

dispatcher BehaviorDispatcher

The behavior dispatcher.

binding IHttpBehaviorBinding

The concrete transport binding to initialize.

ct CancellationToken

Cancellation token threaded from the caller.

Task

A task that completes when the binding is ready.