Metoda ExpansionProvider.FormatSpan —
Formaty zakres określony tekst.
Przestrzeń nazw: Microsoft.VisualStudio.Package
Zestawy: Microsoft.VisualStudio.Package.LanguageService.10.0 (w Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (w Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (w Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (w Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Składnia
'Deklaracja
Public Overridable Function FormatSpan ( _
buffer As IVsTextLines, _
ts As TextSpan() _
) As Integer
public virtual int FormatSpan(
IVsTextLines buffer,
TextSpan[] ts
)
Parametry
- buffer
Typ: Microsoft.VisualStudio.TextManager.Interop.IVsTextLines
IVsTextLines Buforu.
- ts
Typ: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
Tablica TextSpan obiektów.
Wartość zwracana
Typ: System.Int32
S_OK Jeśli metoda pomyślnie, w przeciwnym razie E_NOTIMPL.
Implementuje
IVsExpansionClient.FormatSpan(IVsTextLines, array<TextSpan[])
Uwagi
Metoda ta sprawdza najpierw, że buffer jest taka sama, jak IVsTextLines w Sourcei generuje ArgumentException , jeśli nie są one.Jeśli format zaznaczenia jest włączona, ta metoda iterację tablicę TextSpan obiekty i formatuje je.
Zabezpieczenia programu .NET Framework
- Pełne zaufanie do bezpośredniego wywołującego. Tego elementu członkowskiego nie można używać w kodzie częściowo zaufanym. Aby uzyskać więcej informacji, zobacz Przy użyciu bibliotek z częściowo zaufanego kodu..