Vixen
02b45cc4
csharp
public interface IBundleSource

Where a bundle's bytes come from.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The catalog says which bundle holds a chunk; this is what turns that name into something the object database can read. Two implementations matter and they are very different animals: a local bundle is a file that is definitely there, and a remote one may need downloading, may fail, and may cost the player money.

IsAvailable is separate from OpenAsync so a caller can find out what a load will cost before starting it. A game that wants to show a download prompt has to be able to ask.

Methods (4)

  • bool IsAvailable(CatalogBundle bundle)

    Whether the bundle can be opened without fetching anything.

  • ValueTask<IOdbBackend> OpenAsync(CatalogBundle bundle, CancellationToken cancellationToken = default(CancellationToken))

    Opens a bundle, fetching it first if that is what it takes.

  • ValueTask EnsureAsync(CatalogBundle bundle, IProgress<BundleProgress>? progress = null, CancellationToken cancellationToken = default(CancellationToken))

    Gets a bundle onto the device without opening it.

  • bool Evict(CatalogBundle bundle)

    Gives back whatever local copy this source is keeping of a bundle.

Used by (5)

  • AssetManagerVixen.Assets
  • LocalBundleSourceVixen.Assets
  • RemoteBundleSourceVixen.Assets
  • RemoteContentTestsVixen.Assets.Tests
  • RoutedBundleSourceVixen.Assets