Class VOption
This class wraps a System.Collections.Generic.Dictionary<TKey, TValue>. This is used to call functions with optional arguments. See Call(String, VOption, Object[]).
Inheritance
Implements
Inherited Members
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public class VOption : IEnumerable<KeyValuePair<string, object>>, IEnumerable
Properties
| Improve this Doc View SourceCount
Gets the number of key/value pairs contained in the NetVips.VOption._internalDictionary.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of key/value pairs contained in the NetVips.VOption._internalDictionary. |
Item[String]
Gets or sets the value associated with the specified key.
Declaration
public object this[string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the value to get or set. |
Property Value
Type | Description |
---|---|
System.Object | The value associated with the specified key. |
Keys
Gets a collection containing the keys in the NetVips.VOption._internalDictionary.
Declaration
public Dictionary<string, object>.KeyCollection Keys { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary.KeyCollection<> |
Methods
| Improve this Doc View SourceAdd(String, Object)
Adds the specified key and value to the NetVips.VOption._internalDictionary.
Declaration
public void Add(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the element to add. |
System.Object | value | The value of the element to add. The value can be null for reference types. |
ContainsKey(String)
Determines whether the NetVips.VOption._internalDictionary contains the specified key.
Declaration
public bool ContainsKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to locate in the NetVips.VOption._internalDictionary. |
Returns
Type | Description |
---|---|
System.Boolean | true if the NetVips.VOption._internalDictionary contains an element with the specified key; otherwise, false. |
GetEnumerator()
Returns an enumerator that iterates through the NetVips.VOption._internalDictionary.
Declaration
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.Object>> | A System.Collections.Generic.Dictionary`2.Enumerator structure for the NetVips.VOption._internalDictionary. |
Remove(String)
Removes the value with the specified key from the NetVips.VOption._internalDictionary.
Declaration
public bool Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the element to remove. |
Returns
Type | Description |
---|---|
System.Boolean | true if the element is successfully found and removed; otherwise, false. |
TryGetValue(String, out Object)
Gets the value associated with the specified key.
Declaration
public bool TryGetValue(string key, out object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the value to get. |
System.Object | value | When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized. |
Returns
Type | Description |
---|---|
System.Boolean | true if the NetVips.VOption._internalDictionary contains an element with the specified key; otherwise, false. |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Returns an enumerator that iterates through the NetVips.VOption._internalDictionary.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | A System.Collections.Generic.Dictionary`2.Enumerator structure for the NetVips.VOption._internalDictionary. |