Share via


DataSpecifier Class

Represents a utility class that provides the ability to parse and resolve data specifiers.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'Declaration
Public NotInheritable Class DataSpecifier
'Usage
Dim instance As DataSpecifier
public sealed class DataSpecifier
public ref class DataSpecifier sealed
public final class DataSpecifier

Remarks

Data specifiers specify the display format of a string. They are strings of the form {[qualifier.]specifier[,alignment][:formatString]}. Below is a more detailed description of each component of the data specifier string:

qualifier

  • The optional qualifier component is the name of the entity that the specifier property belongs to.

specifier

  • The required specifier component is the property to identify.

alignment

  • The optional alignment component is a signed integer indicating the preferred formatted field width. If the value of alignment is less than the length of the formatted string, alignment is ignored and the length of the formatted string is used as the field width. The formatted data in the field is right-aligned if alignment is positive and left-aligned if alignment is negative. If padding is necessary, white space is used. The comma is required if alignment is specified.

formatString

  • The optional formatString component is a format string that is appropriate for the type of object being formatted. Specify a numeric format string if the corresponding object is a numeric value, a date and time format string if the corresponding object is a DateTime object, or an enumeration format string if the corresponding object is an enumeration value. If formatString is not specified, the general (G) format specifier for a numeric, date and time, or enumeration type is used. The colon is required if formatString is specified.

As an example, data specifiers are present in the data object view XML file to specify the appearance of nodes in Server Explorer. In particular, the default connection node name is specified in the XML file in the InitialDisplayName tag under the ConnectionNode tag as the following collection of data specifiers: {Root.Name}.{Name}.{DefaultSchema}.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.Framework.DataSpecifier

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

DataSpecifier Members

Microsoft.VisualStudio.Data.Framework Namespace