콘텐츠로 이동

InvokeContext

이 콘텐츠는 아직 번역되지 않았습니다.

Namespace NetWiv · Assembly NetWiv.Core

public sealed class InvokeContext
public AppHandle App { get; }
public ulong DocumentId { get; }
public bool IsTrusted { get; }
public Request Request { get; }
public RuntimeCommandScope Scope { get; }
public IServiceProvider Services { get; }

The service scope created for this invocation, or an empty provider when the app has no service provider. Scoped services are disposed when the command completes.

public Uri Source { get; }
public string WebviewLabel { get; }
public string WindowLabel { get; }
public uint AddResource<T>(T resource);

Registers a resource owned by the invoking document, or by the app for trusted backend calls.

public ValueTask<RuntimeInvokeResponse> InvokePlatformAsync(string command, JsonElement args, CancellationToken cancellationToken = null);

Runs a platform operation after the plugin command passed the ACL check.

public State<T> State<T>();