Class OscParameterCollection
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
IsReadOnly
public bool IsReadOnly { get; }
Property Value
this[string]
public object? this[string address] { get; set; }
Parameters
address
string
Property Value
Keys
public ICollection<string> Keys { get; }
Property Value
Values
public ICollection<object?> Values { get; }
Property Value
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
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
stringThe 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
ContainsKey(string)
public bool ContainsKey(string key)
Parameters
key
string
Returns
GetEnumerator()
public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
Returns
OnValueChanged(ParameterChangedEventArgs)
Raises the ValueChanged event and invokes the event handlers registered by address.
protected void OnValueChanged(ParameterChangedEventArgs args)
Parameters
args
ParameterChangedEventArgsThe event data.
OnValueChangedByAddress(ParameterChangedEventArgs)
Invokes the event handlers registered by address for the ValueChanged event.
protected void OnValueChangedByAddress(ParameterChangedEventArgs args)
Parameters
args
ParameterChangedEventArgsThe event data.
Remove(string)
public bool Remove(string key)
Parameters
key
string
Returns
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
stringThe OSC address of the parameter to listen for value changes on.
handler
OscParameterChangedEventHandler<IReadOnlyOscParameterCollection>The event handler to remove.
Returns
TryGetValue(string, out object?)
public bool TryGetValue(string key, out object? value)
Parameters
Returns
Events
ValueChanged
Occurs when a value in the collection changes.
public event OscParameterChangedEventHandler<IReadOnlyOscParameterCollection>? ValueChanged