Share via


ParserContextExtensions.Expect Method (ParserContext, Char, Boolean, String, Boolean, Nullable<SourceLocation>)

This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Namespace:  System.Web.Razor.Parser
Assembly:  System.Web.Razor (in System.Web.Razor.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Expect ( _
    context As ParserContext, _
    expected As Char, _
    outputError As Boolean, _
    errorMessage As String, _
    caseSensitive As Boolean, _
    errorLocation As Nullable(Of SourceLocation) _
) As Boolean
'Usage
Dim context As ParserContext
Dim expected As Char
Dim outputError As Boolean
Dim errorMessage As String
Dim caseSensitive As Boolean
Dim errorLocation As Nullable(Of SourceLocation)
Dim returnValue As Boolean

returnValue = context.Expect(expected, _
    outputError, errorMessage, caseSensitive, _
    errorLocation)
public static bool Expect(
    this ParserContext context,
    char expected,
    bool outputError,
    string errorMessage,
    bool caseSensitive,
    Nullable<SourceLocation> errorLocation
)
[ExtensionAttribute]
public:
static bool Expect(
    ParserContext^ context, 
    wchar_t expected, 
    bool outputError, 
    String^ errorMessage, 
    bool caseSensitive, 
    Nullable<SourceLocation> errorLocation
)
public static function Expect(
    context : ParserContext, 
    expected : char, 
    outputError : boolean, 
    errorMessage : String, 
    caseSensitive : boolean, 
    errorLocation : Nullable<SourceLocation>
) : boolean

Parameters

Return Value

Type: System.Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ParserContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see b8020aae-374d-46a9-bcb7-8cc2390b93b6 or 175ce3ff-9bbf-4e64-8421-faeb81a0bb51.

Permissions

  • Medium trust for the immediate caller. This member can be used by partially trusted code.

See Also

Reference

ParserContextExtensions Class

Expect Overload

System.Web.Razor.Parser Namespace