3 implementations of ITypeSymbol_IsRecord
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\TypeSymbol.cs (1)
175bool ITypeSymbol.IsRecord => UnderlyingTypeSymbol.IsRecord || UnderlyingTypeSymbol.IsRecordStruct;
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
143public bool IsRecord => _symbol.IsRecord;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
607Private ReadOnly Property ITypeSymbol_IsRecord As Boolean Implements ITypeSymbol.IsRecord
48 references to ITypeSymbol_IsRecord
Microsoft.CodeAnalysis.CodeStyle (2)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
783if (methodSymbol.ContainingType.IsRecord &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IParameterSymbolExtensions.cs (1)
32ContainingType: { IsRecord: true } containingType,
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
394new ParameterName(argumentNameSuggestion, isNamedArgument, tryMakeCamelCase: !method.ContainingType.IsRecord), 426semanticModel, expression, capitalize: containingType.IsRecord, cancellationToken: cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
24namedType.IsRecord,
Microsoft.CodeAnalysis.CSharp (4)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (4)
598case TypeKind.Class when symbol.IsRecord: 600case TypeKind.Struct when symbol.IsRecord: 698case TypeKind.Class when symbol.IsRecord: 703case TypeKind.Struct when symbol.IsRecord:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
279if (namedType.IsRecord)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
46IsRecord: false,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
83if (namedType.IsRecord) 196if (namedType.IsRecord)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\NumericIntPtrTests.cs (1)
10692Assert.Equal(useCompilationReference || returnType.IsReferenceType, returnType.IsRecord);
Microsoft.CodeAnalysis.CSharp.Features (6)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (4)
965if (method.ContainingType.IsRecord && method.IsCopyConstructor()) 1007ContainingType.IsRecord: true, 1970TypeKind.Struct => symbol.IsRecord ? CSharpFeaturesResources.record_struct : FeaturesResources.struct_, 1971TypeKind.Class => symbol.IsRecord ? CSharpFeaturesResources.record_ : FeaturesResources.class_,
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
279if (namedType.IsRecord)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
46IsRecord: false,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\RecordStructTests.cs (3)
539Assert.False(type.IsRecord); 559Assert.False(type.IsRecord); 579Assert.False(type.IsRecord);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Extensions.cs (2)
180if (!type.IsRecord) 209if (!primaryConstructor.ContainingType.IsRecord)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
83if (namedType.IsRecord) 196if (namedType.IsRecord)
Microsoft.CodeAnalysis.Features (6)
Common\SymbolDisplayPartKindTags.cs (1)
22if (namedType.IsRecord)
EditAndContinue\Utilities\Extensions.cs (1)
173=> !type.InstanceConstructors.Any(static c => !(c.Parameters is [] || c.ContainingType.IsRecord && c.IsCopyConstructor()));
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
143public bool IsRecord => _symbol.IsRecord;
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
783if (methodSymbol.ContainingType.IsRecord &&
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (2)
394new ParameterName(argumentNameSuggestion, isNamedArgument, tryMakeCamelCase: !method.ContainingType.IsRecord), 426semanticModel, expression, capitalize: containingType.IsRecord, cancellationToken: cancellationToken);
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\TypeSymbol.vb (1)
607Private ReadOnly Property ITypeSymbol_IsRecord As Boolean Implements ITypeSymbol.IsRecord
Microsoft.CodeAnalysis.Workspaces (8)
Classification\ClassificationExtensions.cs (2)
12TypeKind.Class => type.IsRecord ? ClassificationTypeNames.RecordClassName : ClassificationTypeNames.ClassName, 14TypeKind.Struct => type.IsRecord ? ClassificationTypeNames.RecordStructName : ClassificationTypeNames.StructName,
Editing\SyntaxGenerator.cs (3)
761type.IsRecord, 770type.IsRecord, 815if (symbol.ContainingType?.IsRecord is true)
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (1)
78IsRecord: true,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IParameterSymbolExtensions.cs (1)
32ContainingType: { IsRecord: true } containingType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
24namedType.IsRecord,
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (2)
171return type.IsRecord ? "record class" : "class"; 174return type.IsRecord ? "record struct" : "struct";
Microsoft.Gen.Logging (3)
Parsing\Parser.cs (1)
189paramSymbol.Type.IsRecord)
Parsing\Parser.LogProperties.cs (1)
106if (namedType.IsRecord && !namedType.InstanceConstructors.IsDefaultOrEmpty)
Parsing\Parser.Records.cs (1)
145if (extractedType.IsRecord && // Going inside record types only
Microsoft.VisualStudio.LanguageServices (1)
ExtractClass\ExtractClassViewModel.cs (1)
68public string Title => _selectedType.IsRecord