/// <summary> /// Initializes a new instance of the <see cref="VSphereSelectionSpec" /> class. /// </summary> /// <param name="name">The name to assign this selection spec, which allows it to be referenced/reused.</param> /// <param name="managedObjectType">The type of vSphere managed object to extend the query from.</param> /// <param name="path">The name of the property to use to select objects.</param> /// <param name="selectSet">An optional set of selections to specify additional objects to retrieve.</param> public VSphereSelectionSpec(string name, VSphereManagedObjectType managedObjectType, string path, params VSphereSelectionSpec[] selectSet) { IEnumerable <SelectionSpec> set = Enumerable.Empty <SelectionSpec>(); if (selectSet != null) { set = selectSet.Select(n => n.SelectionSpec); } SelectionSpec = new TraversalSpec { name = name, type = managedObjectType.ToString(), path = path, selectSet = set.ToArray() }; }
/// <summary> /// Initializes a new instance of the <see cref="VSpherePropertySpec"/> class. /// </summary> /// <param name="managedObjectType">The type of vSphere managed object to retrieve.</param> /// <param name="propertyPaths">The paths of the properties to retrieve.</param> public VSpherePropertySpec(VSphereManagedObjectType managedObjectType, params string[] propertyPaths) : this(managedObjectType, false, propertyPaths) { }
/// <summary> /// Initializes a new instance of the <see cref="VSpherePropertySpec" /> class. /// </summary> /// <param name="managedObjectType">The type of vSphere managed object to retrieve.</param> /// <param name="propertyPath">The path of the property to retrieve.</param> public VSpherePropertySpec(VSphereManagedObjectType managedObjectType, string propertyPath) : this(managedObjectType, false, new[] { propertyPath }) { }
/// <summary> /// Initializes a new instance of the <see cref="VSpherePropertySpec"/> class. /// </summary> /// <param name="managedObjectType">The type of vSphere managed object to retrieve.</param> /// <param name="readAllProperties">if set to <c>true</c> read all properties of this object type.</param> public VSpherePropertySpec(VSphereManagedObjectType managedObjectType, bool readAllProperties) : this(managedObjectType, readAllProperties, null) { }
/// <summary> /// Initializes a new instance of the <see cref="VSpherePropertySpec" /> class. /// </summary> /// <param name="managedObjectType">The type of vSphere managed object to retrieve.</param> public VSpherePropertySpec(VSphereManagedObjectType managedObjectType) : this(managedObjectType, false) { }
/// <summary> /// Initializes a new instance of the <see cref="VSphereSelectionSpec" /> class. /// </summary> /// <param name="name">The name to assign this selection spec, which allows it to be referenced/reused.</param> /// <param name="managedObjectType">The type of vSphere managed object to extend the query from.</param> /// <param name="path">The name of the property to use to select objects.</param> public VSphereSelectionSpec(string name, VSphereManagedObjectType managedObjectType, string path) : this(name, managedObjectType, path, null) { }
/// <summary> /// Initializes a new instance of the <see cref="VSphereSelectionSpec" /> class. /// </summary> /// <param name="managedObjectType">The type of vSphere managed object to extend the query from.</param> /// <param name="path">The name of the property to use to select objects.</param> /// <param name="selectSet">An optional set of selections to specify additional objects to retrieve.</param> public VSphereSelectionSpec(VSphereManagedObjectType managedObjectType, string path, params VSphereSelectionSpec[] selectSet) : this(null, managedObjectType, path, selectSet) { }