Udostępnij za pośrednictwem


ExpansionFunction.GetFieldValue Method

Gets the value of the specified field.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

'Declaration
Public Function GetFieldValue ( _
    name As String, _
    <OutAttribute> ByRef value As String _
) As Boolean
public bool GetFieldValue(
    string name,
    out string value
)
public:
bool GetFieldValue(
    String^ name, 
    [OutAttribute] String^% value
)
member GetFieldValue : 
        name:string * 
        value:string byref -> bool 
public function GetFieldValue(
    name : String, 
    value : String
) : boolean

Parameters

  • name
    Type: System.String
    [in] The name of the field for which to get a value.
  • value
    Type: System.String%
    [out] Returns the requested value or nulla null reference (Nothing in Visual Basic) if the value could not be obtained.

Return Value

Type: System.Boolean
If the value was obtained, returns true; otherwise, returns false.

Remarks

This method is called from the GetArgument method to retrieve the value of a particular field by name. The name is not case-sensitive. You can call this method directly from your implementation of the GetCurrentValue method to obtain an argument by name.

This method calls the GetFieldValue method on the IVsExpansionSession object that is held by the ExpansionProvider object.

.NET Framework Security

See Also

Reference

ExpansionFunction Class

Microsoft.VisualStudio.Package Namespace