Table of Contents

Constructor ObsModel

Namespace
OBSStudioClient.Model
Assembly
OBSClient.dll

ObsModel(ObsModelOptions?, ILoggerFactory?)

Creates an ObsModel with a new ObsClient, which it disposes of when it is disposed.

public ObsModel(ObsModelOptions? options = null, ILoggerFactory? loggerFactory = null)

Parameters

options ObsModelOptions

The settings, or null for the defaults.

loggerFactory ILoggerFactory

The logger factory, or null to log nothing.

ObsModel(ObsClient, ObsModelOptions?, ILogger<ObsModel>?)

Creates an ObsModel on an ObsClient that you have made. The client has to be disconnected, and it can have only one ObsModel. You remain the owner of the client: disposing of the ObsModel disconnects it, and does not dispose of it.

public ObsModel(ObsClient client, ObsModelOptions? options = null, ILogger<ObsModel>? logger = null)

Parameters

client ObsClient

The client.

options ObsModelOptions

The settings, or null for the defaults.

logger ILogger<ObsModel>

The logger, or null to log nothing.

Exceptions

ArgumentNullException

client is null.

InvalidOperationException

The client is connected or connecting, or has an ObsModel already.