Share via


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

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 Accept ( _
    context As ParserContext, _
    expected As String, _
    caseSensitive As Boolean, _
    <OutAttribute> ByRef errorLocation As Nullable(Of SourceLocation), _
    <OutAttribute> ByRef errorChar As Nullable(Of Char) _
) As Boolean
'Usage
Dim context As ParserContext
Dim expected As String
Dim caseSensitive As Boolean
Dim errorLocation As Nullable(Of SourceLocation)
Dim errorChar As Nullable(Of Char)
Dim returnValue As Boolean

returnValue = context.Accept(expected, _
    caseSensitive, errorLocation, errorChar)
public static bool Accept(
    this ParserContext context,
    string expected,
    bool caseSensitive,
    out Nullable<SourceLocation> errorLocation,
    out Nullable<char> errorChar
)
[ExtensionAttribute]
public:
static bool Accept(
    ParserContext^ context, 
    String^ expected, 
    bool caseSensitive, 
    [OutAttribute] Nullable<SourceLocation>% errorLocation, 
    [OutAttribute] Nullable<wchar_t>% errorChar
)
public static function Accept(
    context : ParserContext, 
    expected : String, 
    caseSensitive : boolean, 
    errorLocation : Nullable<SourceLocation>, 
    errorChar : Nullable<char>
) : 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

Accept Overload

System.Web.Razor.Parser Namespace