Table of Contents

Class LaunchUrlService

Namespace
BSGameLib.Game.Launch
Assembly
BSGameLib.Game.dll

Default ILaunchUrls. Collects URLs from the command line, from later copies through BSGameLib.Game.Launch.InstanceChannel, and from the platform's drop events (how SDL passes on macOS's open-URL), and raises them on the game's thread when the frame loop asks.

public sealed class LaunchUrlService : ILaunchUrls, IDisposable
Inheritance
LaunchUrlService
Implements
Inherited Members

Constructors

LaunchUrlService(ILogger<LaunchUrlService>, LaunchUrlOptions)

Created by dependency injection. With no options it collects nothing, and no other copy can hand it a URL.

public LaunchUrlService(ILogger<LaunchUrlService> logger, LaunchUrlOptions options = null)

Parameters

logger ILogger<LaunchUrlService>
options LaunchUrlOptions

Methods

Dispose()

Stops listening for URLs from other copies.

public void Dispose()

Offer(string)

A URL from anywhere: kept when it has the game's scheme and a sane length, ignored otherwise.

public void Offer(string url)

Parameters

url string

Events

Received

Raised on the game's thread, once a frame, for each URL that arrived since the last frame.

public event EventHandler<LaunchUrlEventArgs> Received

Event Type

EventHandler<LaunchUrlEventArgs>