Base:
property
IsVirtual
Microsoft.CodeAnalysis.CSharp.Symbol.IsVirtual
42 references to IsVirtual
Microsoft.CodeAnalysis.CSharp (26)
Symbols\Source\SourceMemberMethodSymbol.cs (2)
993
if ((((hasBody || IsExtern) && !(IsStatic &&
IsVirtual
)) || IsExplicitInterfaceImplementation) && !ContainingAssembly.RuntimeSupportsDefaultInterfaceImplementation)
998
if (((!hasBody && IsAbstract) ||
IsVirtual
) && !IsExplicitInterfaceImplementation && IsStatic && !ContainingAssembly.RuntimeSupportsStaticAbstractMembersInInterfaces)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (3)
140
addRefReadOnlyModifier:
IsVirtual
|| IsAbstract,
703
if (definition.
IsVirtual
!= implementation.
IsVirtual
Symbols\Source\SourceOrdinaryMethodSymbolBase.cs (6)
322
Debug.Assert(!IsStatic || ContainingType.IsInterface || (!IsAbstract && !
IsVirtual
)); // Otherwise should have been reported and cleared earlier.
347
else if (this.DeclaredAccessibility == Accessibility.Private && (
IsVirtual
|| (IsAbstract && !isExplicitInterfaceImplementationInInterface) || IsOverride))
351
else if (IsOverride && (IsNew ||
IsVirtual
))
379
else if (IsAbstract &&
IsVirtual
)
388
else if (
IsVirtual
&& ContainingType.TypeKind == TypeKind.Struct)
403
else if (
IsVirtual
&& ContainingType.IsSealed)
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
533
else if (
IsVirtual
&& ContainingType.IsSealed && ContainingType.TypeKind != TypeKind.Struct) // error CS0106 on struct already
Symbols\Source\SourceUserDefinedConversionSymbol.cs (1)
84
if (IsStatic && (IsAbstract ||
IsVirtual
))
Symbols\Source\SourceUserDefinedOperatorSymbol.cs (1)
84
if (IsAbstract ||
IsVirtual
|| (name != WellKnownMemberNames.EqualityOperatorName && name != WellKnownMemberNames.InequalityOperatorName))
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (12)
53
!(IsAbstract ||
IsVirtual
) && !IsExplicitInterfaceImplementation &&
93
else if (IsAbstract &&
IsVirtual
)
391
if (IsAbstract ||
IsVirtual
)
467
diagnostics.Add(IsAbstract ||
IsVirtual
? ErrorCode.ERR_AbstractConversionNotInvolvingContainedType : ErrorCode.ERR_ConversionNotInvolvingContainedType, this.Locations[0]);
603
diagnostics.Add((IsAbstract ||
IsVirtual
) ? ErrorCode.ERR_BadAbstractUnaryOperatorSignature : ErrorCode.ERR_BadUnaryOperatorSignature, this.Locations[0]);
623
diagnostics.Add((IsAbstract ||
IsVirtual
) ? ErrorCode.ERR_BadAbstractUnaryOperatorSignature : ErrorCode.ERR_BadUnaryOperatorSignature, this.Locations[0]);
673
diagnostics.Add((IsAbstract ||
IsVirtual
) ? ErrorCode.ERR_BadAbstractIncDecSignature : ErrorCode.ERR_BadIncDecSignature, this.Locations[0]);
677
(((IsAbstract ||
IsVirtual
) && IsContainingType(parameterType) && IsSelfConstrainedTypeParameter(this.ReturnType)) ||
682
diagnostics.Add((IsAbstract ||
IsVirtual
) ? ErrorCode.ERR_BadAbstractIncDecRetType : ErrorCode.ERR_BadIncDecRetType, this.Locations[0]);
690
return IsContainingType(type) || ((IsAbstract ||
IsVirtual
) && IsSelfConstrainedTypeParameter(type));
722
diagnostics.Add((IsAbstract ||
IsVirtual
) ? ErrorCode.ERR_BadAbstractShiftOperatorSignature : ErrorCode.ERR_BadShiftOperatorSignature, this.Locations[0]);
741
diagnostics.Add((IsAbstract ||
IsVirtual
) ? ErrorCode.ERR_BadAbstractBinaryOperatorSignature : ErrorCode.ERR_BadBinaryOperatorSignature, this.Locations[0]);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Semantics\RecordStructTests.cs (2)
4311
Assert.False(recordEquals.
IsVirtual
);
4320
Assert.False(objectEquals.
IsVirtual
);
Semantics\RecordTests.cs (6)
18093
Assert.True(recordEquals.
IsVirtual
);
18202
Assert.True(recordEquals.
IsVirtual
);
18466
Assert.True(recordEquals.
IsVirtual
);
18626
Assert.True(recordEquals.
IsVirtual
);
18665
Assert.False(recordEquals.
IsVirtual
);
18701
Assert.False(recordEquals.
IsVirtual
);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Symbols\Source\MethodTests.cs (8)
1863
Assert.True(method1.
IsVirtual
);
1864
Assert.True(method2.
IsVirtual
);
1865
Assert.False(method3.
IsVirtual
);
1866
Assert.False(method4.
IsVirtual
);
1884
Assert.True(method1.
IsVirtual
);
1885
Assert.True(method2.
IsVirtual
);
1886
Assert.False(method3.
IsVirtual
);
1887
Assert.False(method4.
IsVirtual
);