Show / Hide Table of Contents

Class VOption

This class wraps a Dictionary<TKey, TValue>. This is used to call functions with optional arguments. See Call(string, VOption, params object[]).

Inheritance
object
VOption
Implements
IEnumerable<KeyValuePair<string, object>>
IEnumerable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public class VOption : IEnumerable<KeyValuePair<string, object>>, IEnumerable

Properties

Count

Gets the number of key/value pairs contained in the NetVips.VOption._internalDictionary.

Declaration
public int Count { get; }
Property Value
Type Description
int

The number of key/value pairs contained in the NetVips.VOption._internalDictionary.

this[string]

Gets or sets the value associated with the specified key.

Declaration
public object this[string key] { get; set; }
Parameters
Type Name Description
string key

The key of the value to get or set.

Property Value
Type Description
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
Dictionary<string, object>.KeyCollection

Methods

Add(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
string key

The key of the element to add.

object value

The value of the element to add. The value can be null for reference types.

AddIfPresent<T>(string, T?)

Adds the specified key and value to the NetVips.VOption._internalDictionary, if value is present.

Declaration
public void AddIfPresent<T>(string key, T? value) where T : struct
Parameters
Type Name Description
string key

The key of the element to add.

T? value

The value of the element to add.

Type Parameters
Name Description
T

AddIfPresent<T>(string, T)

Adds the specified key and class to the NetVips.VOption._internalDictionary, if class is present.

Declaration
public void AddIfPresent<T>(string key, T cls) where T : class
Parameters
Type Name Description
string key

The key of the element to add.

T cls

The value of the element to add.

Type Parameters
Name Description
T

AddIfPresent<T>(string, T[])

Adds the specified key and array to the NetVips.VOption._internalDictionary, if array is present.

Declaration
public void AddIfPresent<T>(string key, T[] array) where T : struct
Parameters
Type Name Description
string key

The key of the element to add.

T[] array

The value of the element to add.

Type Parameters
Name Description
T

ContainsKey(string)

Determines whether the NetVips.VOption._internalDictionary contains the specified key.

Declaration
public bool ContainsKey(string key)
Parameters
Type Name Description
string key

The key to locate in the NetVips.VOption._internalDictionary.

Returns
Type Description
bool

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
IEnumerator<KeyValuePair<string, object>>

A Dictionary<TKey, TValue>.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
string key

The key of the element to remove.

Returns
Type Description
bool

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
string key

The key of the value to get.

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
bool

true if the NetVips.VOption._internalDictionary contains an element with the specified key; otherwise, false.

Implements

IEnumerable<T>
IEnumerable
In this article
Back to top Generated by DocFX