Table of Contents

Class OscParameterCollection

Namespace
BuildSoft.VRChat.Osc
Assembly
vrcosclib.dll

A collection of OSC parameters that can be accessed using a string address.

public class OscParameterCollection : IDictionary<string, object?>, ICollection<KeyValuePair<string, object?>>, IReadOnlyOscParameterCollection, IReadOnlyDictionary<string, object?>, IReadOnlyCollection<KeyValuePair<string, object?>>, IEnumerable<KeyValuePair<string, object?>>, IEnumerable
Inheritance
OscParameterCollection
Implements
Inherited Members

Properties

Count

public int Count { get; }

Property Value

int

IsReadOnly

public bool IsReadOnly { get; }

Property Value

bool

this[string]

public object? this[string address] { get; set; }

Parameters

address string

Property Value

object

Keys

public ICollection<string> Keys { get; }

Property Value

ICollection<string>

Values

public ICollection<object?> Values { get; }

Property Value

ICollection<object>

Methods

Add(KeyValuePair<string, object?>)

public void Add(KeyValuePair<string, object?> item)

Parameters

item KeyValuePair<string, object>

Add(string, object?)

public void Add(string address, object? value)

Parameters

address string
value object

AddValueChangedEventByAddress(string, OscParameterChangedEventHandler<IReadOnlyOscParameterCollection>)

Adds an event handler to the collection that is invoked when the value of the parameter with the specified OSC address changes.

public void AddValueChangedEventByAddress(string address, OscParameterChangedEventHandler<IReadOnlyOscParameterCollection> handler)

Parameters

address string

The OSC address of the parameter to listen for value changes on.

handler OscParameterChangedEventHandler<IReadOnlyOscParameterCollection>

The event handler to add.

Clear()

public void Clear()

Contains(KeyValuePair<string, object?>)

public bool Contains(KeyValuePair<string, object?> item)

Parameters

item KeyValuePair<string, object>

Returns

bool

ContainsKey(string)

public bool ContainsKey(string key)

Parameters

key string

Returns

bool

GetEnumerator()

public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<string, object>>

OnValueChanged(ParameterChangedEventArgs)

Raises the ValueChanged event and invokes the event handlers registered by address.

protected void OnValueChanged(ParameterChangedEventArgs args)

Parameters

args ParameterChangedEventArgs

The event data.

OnValueChangedByAddress(ParameterChangedEventArgs)

Invokes the event handlers registered by address for the ValueChanged event.

protected void OnValueChangedByAddress(ParameterChangedEventArgs args)

Parameters

args ParameterChangedEventArgs

The event data.

Remove(string)

public bool Remove(string key)

Parameters

key string

Returns

bool

RemoveValueChangedEventByAddress(string, OscParameterChangedEventHandler<IReadOnlyOscParameterCollection>)

Removes an event handler to the collection that is invoked when the value of the parameter with the specified OSC address changes.

public bool RemoveValueChangedEventByAddress(string address, OscParameterChangedEventHandler<IReadOnlyOscParameterCollection> handler)

Parameters

address string

The OSC address of the parameter to listen for value changes on.

handler OscParameterChangedEventHandler<IReadOnlyOscParameterCollection>

The event handler to remove.

Returns

bool

TryGetValue(string, out object?)

public bool TryGetValue(string key, out object? value)

Parameters

key string
value object

Returns

bool

Events

ValueChanged

Occurs when a value in the collection changes.

public event OscParameterChangedEventHandler<IReadOnlyOscParameterCollection>? ValueChanged

Event Type

OscParameterChangedEventHandler<IReadOnlyOscParameterCollection>