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)

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

public sealed class DataSpecifier

NameDescription
System_CAPS_pubpropertyAlignment

Gets the portion of the data specifier string that represents the alignment component.

System_CAPS_pubpropertyFormatString

Gets the portion of the data specifier string that represents the formatString component.

System_CAPS_pubpropertyQualifier

Gets the portion of the data specifier string that represents the qualifier component.

System_CAPS_pubpropertySpecifier

Gets the portion of the data specifier string that represents the specifier component.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticParse(String)

Parses a data specifier string into its components and returns a DataSpecifier object instance containing the parsed components.

System_CAPS_pubmethodSystem_CAPS_staticParse(String, Int32)

Parses a data specifier string, starting at the specified index, into its components and then returns a DataSpecifier object instance containing the parsed components.

System_CAPS_pubmethodSystem_CAPS_staticResolve(String, Int32, DataSpecifier.Resolver)

Converts the data specifier string, starting at the specified index, into its textual representation by using the specified delegate resolver method.

System_CAPS_pubmethodSystem_CAPS_staticResolve(String, DataSpecifier.Resolver)

Converts the data specifier string into its textual representation by using the specified delegate resolver method.

System_CAPS_pubmethodSystem_CAPS_staticResolveAll(String, DataSpecifier.Resolver)

Converts a string of one or more data specifiers into its textual representation by using the specified delegate resolver method.

System_CAPS_pubmethodToString()

Returns a string representation consisting of all the components of the specified DataSpecifier object.(Overrides Object.ToString().)

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}.

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

Return to top
Show: