|
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
Imports System.Collections.Immutable
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Namespace Microsoft.CodeAnalysis.VisualBasic.Symbols
''' <summary>
''' Represents a Lambda parameter.
''' </summary>
Friend MustInherit Class LambdaParameterSymbol
Inherits ParameterSymbol
Private ReadOnly _location As ImmutableArray(Of Location)
Private ReadOnly _name As String
Private ReadOnly _type As TypeSymbol ' Can be Nothing for UnboundLambdaParameterSymbol.
Private ReadOnly _ordinal As UShort
Private ReadOnly _isByRef As Boolean
Protected Sub New(
name As String,
ordinal As Integer,
type As TypeSymbol,
isByRef As Boolean,
location As Location
)
_name = name
_ordinal = CType(ordinal, UShort)
_type = type
If location IsNot Nothing Then
_location = ImmutableArray.Create(Of Location)(location)
Else
_location = ImmutableArray(Of Location).Empty
End If
_isByRef = isByRef
End Sub
Public NotOverridable Overrides ReadOnly Property Name As String
Get
Return _name
End Get
End Property
Public NotOverridable Overrides ReadOnly Property Ordinal As Integer
Get
Return _ordinal
End Get
End Property
Public NotOverridable Overrides ReadOnly Property HasExplicitDefaultValue As Boolean
Get
Return False
End Get
End Property
Friend Overrides ReadOnly Property ExplicitDefaultConstantValue(inProgress As SymbolsInProgress(Of ParameterSymbol)) As ConstantValue
Get
Return Nothing
End Get
End Property
Public NotOverridable Overrides ReadOnly Property IsOptional As Boolean
Get
Return False
End Get
End Property
Friend NotOverridable Overrides ReadOnly Property IsMetadataOut As Boolean
Get
Return False
End Get
End Property
Friend NotOverridable Overrides ReadOnly Property IsMetadataIn As Boolean
Get
Return False
End Get
End Property
Friend NotOverridable Overrides ReadOnly Property MarshallingInformation As MarshalPseudoCustomAttributeData
Get
Return Nothing
End Get
End Property
Friend Overrides ReadOnly Property HasOptionCompare As Boolean
Get
Return False
End Get
End Property
Friend Overrides ReadOnly Property IsIDispatchConstant As Boolean
Get
Return False
End Get
End Property
Friend Overrides ReadOnly Property IsIUnknownConstant As Boolean
Get
Return False
End Get
End Property
Friend Overrides ReadOnly Property IsCallerLineNumber As Boolean
Get
Return False
End Get
End Property
Friend Overrides ReadOnly Property IsCallerMemberName As Boolean
Get
Return False
End Get
End Property
Friend Overrides ReadOnly Property IsCallerFilePath As Boolean
Get
Return False
End Get
End Property
Friend NotOverridable Overrides ReadOnly Property CallerArgumentExpressionParameterIndex As Integer
Get
Return -1
End Get
End Property
Public NotOverridable Overrides ReadOnly Property IsParamArray As Boolean
Get
Return False
End Get
End Property
Public NotOverridable Overrides ReadOnly Property Locations As ImmutableArray(Of Location)
Get
Return _location
End Get
End Property
Public Overrides ReadOnly Property DeclaringSyntaxReferences As ImmutableArray(Of SyntaxReference)
Get
Return GetDeclaringSyntaxReferenceHelper(Of ParameterSyntax)(Me.Locations)
End Get
End Property
Public NotOverridable Overrides ReadOnly Property Type As TypeSymbol
Get
Return _type
End Get
End Property
Public NotOverridable Overrides ReadOnly Property IsByRef As Boolean
Get
Return _isByRef
End Get
End Property
Friend NotOverridable Overrides ReadOnly Property IsExplicitByRef As Boolean
Get
Return _isByRef
End Get
End Property
Public NotOverridable Overrides ReadOnly Property CustomModifiers As ImmutableArray(Of CustomModifier)
Get
Return ImmutableArray(Of CustomModifier).Empty
End Get
End Property
Public NotOverridable Overrides ReadOnly Property RefCustomModifiers As ImmutableArray(Of CustomModifier)
Get
Return ImmutableArray(Of CustomModifier).Empty
End Get
End Property
End Class
End Namespace
|