Condividi tramite


Metodo IVsExpansionFunction.GetDefaultValue

Restituisce la stringa predefinita da inserire prima che il modello venga modificato.

Spazio dei nomi:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Sintassi

'Dichiarazione
Function GetDefaultValue ( _
    <OutAttribute> ByRef bstrValue As String, _
    <OutAttribute> ByRef fHasDefaultValue As Integer _
) As Integer
int GetDefaultValue(
    out string bstrValue,
    out int fHasDefaultValue
)
int GetDefaultValue(
    [OutAttribute] String^% bstrValue, 
    [OutAttribute] int% fHasDefaultValue
)
abstract GetDefaultValue : 
        bstrValue:string byref * 
        fHasDefaultValue:int byref -> int
function GetDefaultValue(
    bstrValue : String, 
    fHasDefaultValue : int
) : int

Parametri

  • bstrValue
    Tipo: String%

    [out] Restituisce una stringa contenente il valore predefinito.

  • fHasDefaultValue
    Tipo: Int32%

    [out] restituisce diverso da zero (true) se la funzione di espansione ha un valore predefinito; in caso contrario, restituisce zero (false). Vedere le note.

Valore restituito

Tipo: Int32
Se il metodo ha esito positivo, restituisce S_OK.Se non riesce, restituisce un codice di errore.

Note

Firma COM

da textmgr2.idl:

bool IVsExpansionFunction::GetDefaultValue(
   [out] BSTR *bstrValue,
   [out] bool *fHasDefaultValue
);

Tutti i campi in un frammento di codice possono avere un valore predefinito specificato nel file stesso frammento. GetDefaultValue il metodo può fornire un valore predefinito generato in modo dinamico con una funzione di espansione. Se una funzione di espansione non presenta un valore predefinito, deve sempre restituire zero (falsein fHasDefaultValue parametro. fHasDefaultValue il parametro viene spesso utilizzato dal chiamante di questo metodo per determinare se aggiornare il campo nel frammento di codice.

Sicurezza di .NET Framework

Vedere anche

Riferimenti

IVsExpansionFunction Interfaccia

Spazio dei nomi Microsoft.VisualStudio.TextManager.Interop