Partager via


FieldDescription Class

Definition

Provides a description of a field for use by Prompt(String, String, Collection<FieldDescription>).

public ref class FieldDescription
public class FieldDescription
type FieldDescription = class
Public Class FieldDescription
Inheritance
FieldDescription

Remarks

It is permitted to subclass FieldDescription but there is no established scenario for doing this, nor has it been tested.

Constructors

FieldDescription(String)

Initializes a new instance of FieldDescription and defines the Name value.

Properties

Attributes

Gets the Attribute classes that apply to the field. In the case that Prompt(String, String, Collection<FieldDescription>) is being called from the engine, this will contain the set of prompting attributes that are attached to a cmdlet parameter declaration.

DefaultValue

Gets and sets the default value, if any, for the implementation of Prompt(String, String, Collection<FieldDescription>) to pre-populate its UI with. This is a PSObject instance so that the value can be serialized, converted, manipulated like any pipeline object.

HelpMessage

Gets and sets the help message for this field.

IsMandatory

Gets and sets whether a value must be supplied for this field.

Label

A short, human-presentable message to describe and identify the field. If supplied, a typical implementation of Prompt(String, String, Collection<FieldDescription>) will use this value instead of the field name to identify the field to the user.

Name

Gets the name of the field.

ParameterAssemblyFullName

Gets the full name of the assembly containing the type identified by ParameterTypeFullName or ParameterTypeName.

ParameterTypeFullName

Gets the full string name of the parameter's type.

ParameterTypeName

Gets the short name of the parameter's type.

Methods

SetParameterType(Type)

Sets the ParameterTypeName, ParameterTypeFullName, and ParameterAssemblyFullName as a single operation.

Applies to