Table of Contents

Property IsTransferPermitted

Namespace
Qavren.Edge.Chat
Assembly
Qavren.Edge.Chat.Onnx.dll

IsTransferPermitted

Consulted once, immediately before the first byte of a transfer. Returning false makes ProvisionAsync throw ChatDownloadNotPermitted without opening a connection. Null (the default) permits the transfer.

This is a hook and not a network stack, deliberately. Reading whether the connection is metered means Microsoft.Maui.Networking.Connectivity on MAUI, NetworkInterface/NWPathMonitor elsewhere, and a per-platform answer that does not exist on a bare ServiceCollection - which the suite's decisions say this package must run on. So the policy is one line in the app: o.IsTransferPermitted = () => Connectivity.Current.ConnectionProfile == ConnectionProfile.WiFi; and the sample app shows exactly that. Google Play warns a user above 200 MB on mobile data and both shipped presets are far past it, so an app that ships chat and never sets this has made a decision, which is why the consent sheet names the transfer size.

public Func<bool>? IsTransferPermitted { get; set; }

Property Value

Func<bool>