4 implementations of ReturnType
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
46public abstract ITypeSymbol ReturnType { get; }
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\MethodSymbol.cs (1)
79ITypeSymbol IMethodSymbol.ReturnType
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\MethodSymbol.vb (1)
1056Private ReadOnly Property IMethodSymbol_ReturnType As ITypeSymbol Implements IMethodSymbol.ReturnType
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
46public abstract ITypeSymbol ReturnType { get; }
497 references to ReturnType
ConfigurationSchemaGenerator (2)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (2)
112IMethodReferenceOperation m => m.Method.ReturnType, 113IAnonymousFunctionOperation f => f.Symbol.ReturnType,
ILLink.RoslynAnalyzer (9)
COMAnalyzer.cs (1)
48 bool comDangerousMethod = IsComInterop (targetMethod.ReturnType);
DynamicallyAccessedMembersAnalyzer.cs (1)
156 if (method.GetDynamicallyAccessedMemberTypesOnReturnType () != DynamicallyAccessedMemberTypes.None && !method.ReturnType.IsTypeInterestingForDataflow (isByRef: method.ReturnsByRef))
RequiresAnalyzerBase.cs (2)
164 while (member is IMethodSymbol method && method.OverriddenMethod != null && SymbolEqualityComparer.Default.Equals (method.ReturnType, method.OverriddenMethod.ReturnType))
TrimAnalysis\FlowAnnotations.cs (1)
172 if (!method.OriginalDefinition.ReturnType.IsTypeInterestingForDataflow (isByRef: method.ReturnsByRef))
TrimAnalysis\MethodProxy.cs (1)
55 internal partial bool ReturnsVoid () => Method.ReturnType.SpecialType == SpecialType.System_Void;
TrimAnalysis\MethodReturnValue.cs (1)
25 StaticType = new (isNewObj ? methodSymbol.ContainingType : methodSymbol.ReturnType);
TrimAnalysis\TrimAnalysisVisitor.cs (2)
125 return method.ReturnType.IsTypeInterestingForDataflow (isByRef: method.ReturnsByRef) ? new MethodReturnValue (method, isNewObj: false) : value; 347 if (method.ReturnType.IsTypeInterestingForDataflow (isByRef: method.ReturnsByRef)) {
Microsoft.Analyzers.Extra (2)
AsyncMethodWithoutCancellation.cs (1)
116var returnType = method.ReturnType.OriginalDefinition;
CallAnalysis\Arrays.cs (1)
101static void HandleMethod(OperationAnalysisContext context, IInvocationOperation op) => HandleSuspectType(context, (INamedTypeSymbol)op.TargetMethod.ReturnType, op.Syntax.GetLocation());
Microsoft.AspNetCore.App.Analyzers (7)
Http\RequestDelegateReturnTypeAnalyzer.cs (1)
36var returnType = methodReference.Method.ReturnType;
RouteHandlers\DisallowReturningActionResultFromMapMethods.cs (1)
34var returnType = UnwrapPossibleAsyncReturnType(methodSymbol.ReturnType);
src\Shared\RoslynUtils\ParsabilityHelper.cs (5)
98methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 108methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 140methodSymbol.ReturnType is INamedTypeSymbol returnType && 152methodSymbol.ReturnType is INamedTypeSymbol returnType && 214if (bindAsyncMethod.ReturnType is INamedTypeSymbol returnType && !IsReturningValueTaskOfTOrNullableT(returnType, typeSymbol, wellKnownTypes))
Microsoft.AspNetCore.App.CodeFixes (2)
Dependencies\AddPackageFixer.cs (1)
69IMethodSymbol methodSymbol => methodSymbol.ReturnType,
Dependencies\ExtensionMethodsCompletionProvider.cs (1)
66IMethodSymbol methodSymbol => methodSymbol.ReturnType,
Microsoft.AspNetCore.Components.Analyzers (1)
InternalUsageAnalyzer.cs (1)
102VisitDeclarationSymbol(context, method.ReturnType, method);
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
InternalUsageAnalyzer.cs (1)
102VisitDeclarationSymbol(context, method.ReturnType, method);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (9)
src\Shared\RoslynUtils\ParsabilityHelper.cs (5)
98methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 108methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean && 140methodSymbol.ReturnType is INamedTypeSymbol returnType && 152methodSymbol.ReturnType is INamedTypeSymbol returnType && 214if (bindAsyncMethod.ReturnType is INamedTypeSymbol returnType && !IsReturningValueTaskOfTOrNullableT(returnType, typeSymbol, wellKnownTypes))
StaticRouteHandlerModel\EndpointResponse.cs (3)
31WrappedResponseType = method.ReturnType; 32WrappedResponseTypeDisplayName = method.ReturnType.ToDisplayString(EmitterConstants.DisplayFormat); 48var returnType = method.ReturnType;
StaticRouteHandlerModel\Model\EndpointParameterExtensions.cs (1)
55=> ((INamedTypeSymbol?)parameter.BindableMethodSymbol?.ReturnType)?.TypeArguments[0];
Microsoft.AspNetCore.Mvc.Analyzers (1)
TagHelpersInCodeBlocksAnalyzer.cs (1)
86!symbolCache.TaskType.IsAssignableFrom(methodSymbol.ReturnType))
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
ApiControllerFacts.cs (1)
18if (method.ReturnsVoid || method.ReturnType.TypeKind == TypeKind.Error)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (10)
HubClientProxyGenerator.Parser.cs (3)
98if (symbol.ReturnType.ToString() != "System.IDisposable") 301if (!(member.ReturnsVoid || member.ReturnType is INamedTypeSymbol { Arity: 0, Name: "Task" })) 306methodSpec.Name, member.ReturnType.Name));
HubServerProxyGenerator.Parser.cs (7)
80if (!SymbolEqualityComparer.Default.Equals(symbol.TypeArguments[0], symbol.ReturnType)) 275FullyQualifiedReturnTypeName = member.ReturnType.ToString() 278if (member.ReturnType is INamedTypeSymbol { Arity: 1 } rtype) 283if (member.ReturnType is INamedTypeSymbol { Arity: 1, Name: "Task" } a 289else if (member.ReturnType is INamedTypeSymbol { Arity: 1, Name: "IAsyncEnumerable" } c) 323member.ReturnType is not INamedTypeSymbol { Name: "Task" or "ValueTask" }) 328methodSpec.Name, member.ReturnType.Name));
Microsoft.CodeAnalysis (16)
Compilation\Compilation.cs (1)
1718if (!isContainingAssemblyInReferences(funcPtr.Signature.ReturnType))
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
765if (boundReturnType != null && methodSymbol.ReturnType.Equals(boundReturnType))
DocumentationCommentId.cs (2)
474this.GetReferenceGenerator(symbol).Visit(symbol.ReturnType); 1264if (returnType != null && methodSymbol.ReturnType.Equals(returnType, SymbolEqualityComparer.CLRSignature))
Operations\ControlFlowGraphBuilder.cs (11)
2498(ITypeSymbolHelpers.IsBooleanType(unaryOperatorMethod.ReturnType) && 2602if (unaryOperatorMethod != null && ITypeSymbolHelpers.IsBooleanType(unaryOperatorMethod.ReturnType)) 2608semanticModel: null, condition.Syntax, unaryOperatorMethod.ReturnType, constantValue: null, isImplicit: true); 3345method.ReturnType, isImplicit: true); 4191method.ReturnType, isImplicit: true); 4353enterMethod.ReturnType, isImplicit: true)); 4389enterMethod.ReturnType, isImplicit: true)); 4436exitMethod.ReturnType, isImplicit: true)); 4601result = new FlowCaptureReferenceOperation(enumeratorCaptureId, operation.Collection.Syntax, info.GetEnumeratorMethod.ReturnType, constantValue: null); 4707method.ReturnType, isImplicit: true); 4834semanticModel: null, operation.LimitValue.Syntax, method.ReturnType,
Symbols\ISymbolExtensions.cs (1)
151ITypeSymbol? scopeType = enterScopeMethod.ReturnType;
Microsoft.CodeAnalysis.CodeStyle (34)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
856(IsSpecialMethodWithMatchingProperty("ShouldSerialize") && methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean ||
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
432(method.ReturnType.IsDelegateType() ||
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
765if (boundReturnType != null && methodSymbol.ReturnType.Equals(boundReturnType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IMethodSymbolExtensions.cs (6)
106methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 || 107methodSymbol.ReturnType.OriginalDefinition.Equals(taskType) || 108methodSymbol.ReturnType.OriginalDefinition.Equals(genericTaskType)); 118if (method.ReturnType is not INamedTypeSymbol { Arity: 0 }) 122return method.ReturnType.Equals(compilation.TaskType()) || 123method.ReturnType.GetAttributes().Any(a => a.AttributeClass?.Equals(compilation.AsyncMethodBuilderAttribute()) ?? false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (8)
280IMethodSymbol methodSymbol => methodSymbol.ReturnType, 454types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 592if (methodSymbol.ReturnType == null) 600container: typeSymbol ?? methodSymbol!.ReturnType.OriginalDefinition, 613var returnType = getAwaiter.ReturnType; 647var returnType = getEnumerator.ReturnType; 670ReturnType.SpecialType: SpecialType.System_Boolean, 687var returnType = getAsyncEnumerator.ReturnType;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (1)
114symbol.ReturnType.Accept(this) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
106if (!IsSymbolAccessibleCore(funcPtrSignature.ReturnType, within, null, out failedThroughTypeCheck))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.CollectTypeParameterSymbolsVisitor.cs (1)
49symbol.Signature.ReturnType.Accept(this);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (1)
31accessibility = AccessibilityUtilities.Minimum(accessibility, symbol.Signature.ReturnType.Accept(this));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (2)
20visitor.WriteSymbolKey(symbol.ReturnType); 29var returnType = reader.ReadSymbolKey(contextualSymbol?.ReturnType, out var returnTypeFailureReason);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.FunctionPointerTypeSymbolKey.cs (2)
29visitor.WriteSymbolKey(symbol.Signature.ReturnType); 56var returnType = reader.ReadSymbolKey(contextualSymbol?.Signature.ReturnType, out var returnTypeFailureReason);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.MethodSymbolKey.cs (3)
146visitor.WriteSymbolKey(symbol.ReturnType); 247var returnType = (ITypeSymbol?)reader.ReadSymbolKey(contextualSymbol: method.ReturnType, out _).GetAnySymbol(); 249!reader.Comparer.Equals(returnType, method.ReturnType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (2)
482CompareAcrossSemanticModels(methodSymbol.ReturnType, newMethodSymbol.ReturnType) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (2)
207if (!method1.ReturnsVoid && !this.SignatureTypeEquivalenceComparer.Equals(method1.ReturnType, method2.ReturnType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
488return symbolEquivalenceComparer.SignatureTypeEquivalenceComparer.Equals(x.ReturnType, y.ReturnType, equivalentTypesWithDifferingAssemblies) &&
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.MethodSignatureInfo.cs (1)
25=> _methodSymbol.ReturnType;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
148if (IsTypeLessAccessibleThanOtherType(methodSymbol.ReturnType, second, []))
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
143return !IsAsyncReturnType(methodSymbol.ReturnType, knownTypes);
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (2)
52if (ShouldOfferFix(methodSymbol.ReturnType, knownTypes)) 100solutionServices, syntaxFacts, generator, updatedNode, methodSymbol.ReturnType, knownTypes, needsReturnStatementAdded));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (2)
371accessor.ReturnType, 532returnType ?? method.ReturnType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
67method.ReturnType.SubstituteTypes(mapping, typeGenerator), 93method.ReturnType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (1)
133.FirstOrDefault(m => m is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, ReturnType: var returnType, Parameters.Length: 0 } &&
Microsoft.CodeAnalysis.CSharp (3)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (3)
362else if (symbol.ReturnType != null) 656symbol.ReturnType.Accept(this.NotFirstVisitor); 757symbol.ReturnType.Accept(this.NotFirstVisitor);
Microsoft.CodeAnalysis.CSharp.CodeStyle (14)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (2)
159if (!IsIdentityOrImplicitConversion(compilation, invokedMethod.ReturnType, lambdaMethod.ReturnType))
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (3)
438if (method.ReturnType.IsRefLikeType) 560if (method.ReturnType.IsRefLikeType) 974var collectionBuilderAttributeData = createMethod.ReturnType.OriginalDefinition
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (1)
62methodSymbol.ReturnType is INamedTypeSymbol namedType &&
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (1)
61return method.ReturnType is INamedTypeSymbol namedType && namedType.Arity != 0;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
144if (sliceLikeMethod.ReturnType.Equals(containingType))
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (2)
150m.ReturnType.Equals(method.ReturnType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (2)
159var returnType = methodSymbol.ReturnType; 177var returnType = UnwrapTupleType(methodSymbol.ReturnType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
1349return Equals(originalMethodSymbol.ReturnType, rewrittenMethodSymbol.ReturnType);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (22)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
29methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
112methodReturnType = method.ReturnType;
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (2)
40if (methodSymbol?.ReturnType == null || methodSymbol.ReturnsVoid) 45var type = methodSymbol.ReturnType;
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (6)
127var returnType = methodSymbol.ReturnType; 131? MakeGenericType(nameof(IAsyncEnumerable<int>), methodSymbol.ReturnType) 132: knownTypes.IAsyncEnumerableOfTType.Construct(methodSymbol.ReturnType.GetTypeArguments()[0]).GenerateTypeSyntax(); 137? MakeGenericType(nameof(IAsyncEnumerator<int>), methodSymbol.ReturnType) 138: knownTypes.IAsyncEnumeratorOfTType.Construct(methodSymbol.ReturnType.GetTypeArguments()[0]).GenerateTypeSyntax(); 148newReturnType = knownTypes.TaskOfTType!.Construct(methodSymbol.ReturnType).GenerateTypeSyntax();
src\Analyzers\CSharp\CodeFixes\MakeMethodSynchronous\CSharpMakeMethodSynchronousCodeFixProvider.cs (3)
60var returnType = methodSymbol.ReturnType; 75newReturnType = knownTypes.IEnumerableOfTType.Construct(methodSymbol.ReturnType.GetTypeArguments()[0]).GenerateTypeSyntax(); 81newReturnType = knownTypes.IEnumeratorOfTType.Construct(methodSymbol.ReturnType.GetTypeArguments()[0]).GenerateTypeSyntax();
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
91var returnType = lambdaType.DelegateInvokeMethod.ReturnType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (1)
74type: method.ReturnType.GenerateTypeSyntax(),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
224.Concat(method.ReturnType.GetReferencedTypeParameters())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
236invokeMethod.ReturnType.GenerateTypeSyntax(),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (1)
95returnType: method.ReturnType.GenerateTypeSyntax(),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
166Type: symbol.Signature.ReturnType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
57var returnType = method.ReturnType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
590invocationTypes.Any(t => Compilation.ClassifyConversion(m.ReturnType, t).IsImplicit)).ToList(); 629var map = DetermineTypeParameterMapping(type, method.ReturnType);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
SymbolKey\SymbolKeyMetadataVsSourceTests.cs (1)
244var mtsym20_1 = mem20_1.ReturnType;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (14)
CodeGen\CodeGenFunctionPointersTests.cs (1)
7422Assert.Equal("System.String", lambdaSymbol.ReturnType.ToTestDisplayString(includeNonNullable: false));
CodeGen\CodeGenTupleTest.cs (13)
14247m1Tuple = (INamedTypeSymbol)((IMethodSymbol)symbolInfo.Symbol).ReturnType; 14263var m2Tuple = (INamedTypeSymbol)((IMethodSymbol)symbolInfo.Symbol).ReturnType; 14308m3TupleArray = (IArrayTypeSymbol)((IMethodSymbol)symbolInfo.Symbol).ReturnType; 14326m4TupleList = (INamedTypeSymbol)((IMethodSymbol)symbolInfo.Symbol).ReturnType; 14343var m6Tuple = m6Method.ReturnType; 14449m5TuplePointer = (IPointerTypeSymbol)((IMethodSymbol)symbolInfo.Symbol).ReturnType; 19662Assert.Equal("(System.Int32 a, System.Int32)", ((IMethodSymbol)invocation1.Symbol).ReturnType.ToTestDisplayString()); 19665Assert.Equal("(System.Int32, System.Int32)", ((IMethodSymbol)invocation2.Symbol).ReturnType.ToTestDisplayString()); 19668Assert.Equal("(System.Int32, System.Int32)[]", ((IMethodSymbol)invocation3.Symbol).ReturnType.ToTestDisplayString()); 26298Assert.Equal("IResult<System.Int32>", doSymbol.ReturnType.ToTestDisplayString()); 26331Assert.Equal("IResult<System.Int32>", doSymbol.ReturnType.ToTestDisplayString()); 26364Assert.Equal("IResult<System.Int32>", doSymbol.ReturnType.ToTestDisplayString()); 26397Assert.Equal("IResult<System.Int32>", doSymbol.ReturnType.ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\NumericIntPtrTests.cs (1)
10690var returnType = model.GetDeclaredSymbol(method).ReturnType;
Microsoft.CodeAnalysis.CSharp.Features (41)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.CompletionSymbolDisplay.cs (1)
67AddType(symbol.ReturnType, builder);
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (2)
44var targetTypeName = conversion.ReturnType.ToMinimalDisplayString(semanticModel, position); 72var symbols = ImmutableArray.Create<ISymbol>(conversion.ContainingType, conversion.Parameters.First().Type, conversion.ReturnType);
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (3)
304methodSymbol.ReturnType?.SpecialType == SpecialType.System_Int32 && 343IsList(methodSymbol.ReturnType) && 747if (methodSymbol.ReturnType.OriginalDefinition?.SpecialType != SpecialType.System_Collections_Generic_IEnumerable_T)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (2)
1571if (!TypesEquivalent(oldMethod.ReturnType, newMethod.ReturnType, exact: false))
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (2)
711if (methodSymbol.ReturnType.NullableAnnotation != NullableAnnotation.Annotated) 777var newType = methodSymbol.ReturnType.WithNullableAnnotation(NullableAnnotation.NotAnnotated);
ExtractMethod\CSharpSelectionResult.StatementResult.cs (2)
88: (method.ReturnType, method.ReturnsByRef); 95: (method.ReturnType, method.ReturnsByRef);
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
145var delegateReturnType = delegateType.DelegateInvokeMethod.ReturnType;
SignatureHelp\GenericNameSignatureHelpProvider_Method.cs (1)
46result.AddRange(method.ReturnType.ToMinimalDisplayParts(semanticModel, position));
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_DelegateAndFunctionPointerInvoke.cs (1)
61displayParts.AddRange(invokeMethod.ReturnType.ToMinimalDisplayParts(semanticModel, position));
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider_DelegateType.cs (1)
51parts.AddRange(invokeMethod.ReturnType.ToMinimalDisplayParts(semanticModel, position));
Snippets\CSharpConsoleSnippetProvider.cs (1)
42if (lambdaSymbol is IMethodSymbol { ReturnType: { SpecialType: SpecialType.System_Void } or { TypeKind: TypeKind.Error } })
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (2)
159if (!IsIdentityOrImplicitConversion(compilation, invokedMethod.ReturnType, lambdaMethod.ReturnType))
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (3)
438if (method.ReturnType.IsRefLikeType) 560if (method.ReturnType.IsRefLikeType) 974var collectionBuilderAttributeData = createMethod.ReturnType.OriginalDefinition
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (1)
62methodSymbol.ReturnType is INamedTypeSymbol namedType &&
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (1)
61return method.ReturnType is INamedTypeSymbol namedType && namedType.Arity != 0;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
144if (sliceLikeMethod.ReturnType.Equals(containingType))
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (2)
150m.ReturnType.Equals(method.ReturnType))
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
29methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
112methodReturnType = method.ReturnType;
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (2)
40if (methodSymbol?.ReturnType == null || methodSymbol.ReturnsVoid) 45var type = methodSymbol.ReturnType;
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (6)
127var returnType = methodSymbol.ReturnType; 131? MakeGenericType(nameof(IAsyncEnumerable<int>), methodSymbol.ReturnType) 132: knownTypes.IAsyncEnumerableOfTType.Construct(methodSymbol.ReturnType.GetTypeArguments()[0]).GenerateTypeSyntax(); 137? MakeGenericType(nameof(IAsyncEnumerator<int>), methodSymbol.ReturnType) 138: knownTypes.IAsyncEnumeratorOfTType.Construct(methodSymbol.ReturnType.GetTypeArguments()[0]).GenerateTypeSyntax(); 148newReturnType = knownTypes.TaskOfTType!.Construct(methodSymbol.ReturnType).GenerateTypeSyntax();
src\Analyzers\CSharp\CodeFixes\MakeMethodSynchronous\CSharpMakeMethodSynchronousCodeFixProvider.cs (3)
60var returnType = methodSymbol.ReturnType; 75newReturnType = knownTypes.IEnumerableOfTType.Construct(methodSymbol.ReturnType.GetTypeArguments()[0]).GenerateTypeSyntax(); 81newReturnType = knownTypes.IEnumeratorOfTType.Construct(methodSymbol.ReturnType.GetTypeArguments()[0]).GenerateTypeSyntax();
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
91var returnType = lambdaType.DelegateInvokeMethod.ReturnType;
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\FunctionPointerOperations.cs (1)
211Assert.Equal(SpecialType.System_Void, signature.ReturnType.SpecialType);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
Semantics\FunctionPointerTests.cs (3)
1781Assert.Equal(SpecialType.System_String, functionPointer.Signature.ReturnType.SpecialType); 1942Assert.Equal(TypeKind.TypeParameter, functionPointer.Signature.ReturnType.TypeKind); 1946Assert.True(declaredSymbol.TypeParameters[0].Equals(functionPointer.Signature.ReturnType, TypeCompareKind.ConsiderEverything));
Semantics\GenericConstraintsTests.cs (1)
2882Assert.Equal("System.Int32*", symbol.ReturnType.ToTestDisplayString());
Semantics\NullableReferenceTypesTests.cs (3)
158194Assert.Equal("object", ((IMethodSymbol)model.GetSymbolInfo(item).Symbol).ReturnType.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158479Assert.Equal("object", ((IMethodSymbol)model.GetSymbolInfo(item).Symbol).ReturnType.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 158485Assert.Equal("object", ((IMethodSymbol)found).ReturnType.ToDisplayString(TypeWithAnnotations.TestDisplayFormat));
Semantics\OperatorTests.cs (3)
7622symbol1.Name, symbol1.ReturnType, symbol1.Parameters[0].Type); 8398symbol1.Name, symbol1.ReturnType, symbol1.Parameters[0].Type, symbol1.Parameters[1].Type); 8435if (SymbolEqualityComparer.ConsiderEverything.Equals(symbol1.ContainingSymbol, symbol1.ReturnType))
Semantics\RecordStructTests.cs (2)
555var type = model.GetDeclaredSymbol(method)!.ReturnType; 575var type = model.GetDeclaredSymbol(method)!.ReturnType;
Semantics\UnsafeTests.cs (2)
8876summaryMethod.Name, summaryMethod.ReturnType, summaryMethod.Parameters[0].Type, summaryMethod.Parameters[1].Type); 9338summaryMethod.Name, summaryMethod.ReturnType, summaryMethod.Parameters[0].Type, summaryMethod.Parameters[1].Type);
Semantics\Utf8StringsLiteralsTests.cs (1)
4089method.Name, method.ReturnType, method.Parameters[0].Type, method.Parameters[1].Type);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (36)
Compilation\CompilationAPITests.cs (1)
1736Assert.Equal(taskOfObject, entryPoint.ReturnType);
Compilation\GetSemanticInfoTests.cs (3)
1027ITypeSymbol returnType = methodSymbol.ReturnType; 2800var returnType = method.ReturnType; 4790Assert.Equal(SymbolKind.ErrorType, lambda.ReturnType.Kind);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
976Assert.Equal("N1.N2.St<System.Object>.Em", mSymbol.ReturnType.ToTestDisplayString()); 977Assert.Equal<ISymbol>(enumSymbol, mSymbol.ReturnType.OriginalDefinition);
Compilation\SemanticModelGetSemanticInfoTests.cs (2)
5669Assert.Equal("System.Int32", lambdaSym.ReturnType.ToTestDisplayString()); 5705Assert.Equal("System.Int32", lambdaSym.ReturnType.ToTestDisplayString());
DocumentationComments\CrefTests.cs (1)
6077var members = model.LookupSymbols(methodNameSyntax.SpanStart, ((IMethodSymbol)methodSymbol).ReturnType);
Symbols\CheckedUserDefinedOperatorsTests.cs (3)
7216var int64 = ((IMethodSymbol)model.GetSymbolInfo(xNode.Parent).Symbol).ReturnType; 7288var int64 = ((IMethodSymbol)model.GetSymbolInfo(xNode.Parent).Symbol).ReturnType; 7359var int64 = ((IMethodSymbol)model.GetSymbolInfo(xNode.Parent).Symbol).ReturnType;
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1268Assert.True(((IFunctionPointerTypeSymbol)typeInfo.Type!).Signature.ReturnType.IsErrorType());
Symbols\Source\NullablePublicAPITests.cs (12)
292var result = member.ReturnType.NullableAnnotation; 578var result = method.ReturnType.NullableAnnotation; 696var array = (IArrayTypeSymbol)method.ReturnType; 760var result = method.ReturnType.NullableAnnotation; 825ITypeParameterSymbol typeParameterSymbol = ((INamedTypeSymbol)((INamedTypeSymbol)method.ReturnType).GetMembers("B").Single()).TypeParameters.Single(); 892var result = ((INamedTypeSymbol)method.ReturnType).TypeArguments.Single().NullableAnnotation; 893Assert.Equal(result, ((INamedTypeSymbol)method.ReturnType).TypeArgumentNullableAnnotations.Single()); 894Assert.Equal(result, ((INamedTypeSymbol)method.ReturnType).TypeArgumentNullableAnnotations().Single()); 1865Assert.Equal(expectedAnnotation, methodSymbol.ReturnType.NullableAnnotation); 1907Assert.Equal(expectedAnnotation, ((INamedTypeSymbol)methodSymbol.ReturnType).TypeArgumentNullableAnnotations.Single()); 1908Assert.Equal(expectedAnnotation, ((INamedTypeSymbol)methodSymbol.ReturnType).TypeArgumentNullableAnnotations().Single()); 3367var spanType = (INamedTypeSymbol)propertySymbol.ReturnType;
Symbols\SymbolEqualityTests.cs (2)
839var method1ReturnType = method1.ReturnType; // A<T!> 840var method2ReturnType = method2.ReturnType; // A<T!>
Symbols\TypeTests.cs (1)
1716memType = ((INamedTypeSymbol)memType).DelegateInvokeMethod.ReturnType;
Symbols\UnsignedRightShiftTests.cs (8)
134Assert.Same(shiftSymbol.ReturnType, unsignedShiftSymbol.ReturnType); 637Assert.Same(shiftSymbol.ReturnType, unsignedShiftSymbol.ReturnType); 1187Assert.Same(shiftSymbol.ReturnType, unsignedShiftSymbol.ReturnType); 1595Assert.Same(shiftSymbol.ReturnType, unsignedShiftSymbol.ReturnType);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Extensions.cs (1)
817return ((IMethodSymbol)symbol).ReturnType;
FunctionPointerUtilities.cs (1)
249assertEqualSemanticInformation(model, returnParam!, signature.ReturnType);
Microsoft.CodeAnalysis.CSharp.Workspaces (20)
Recommendations\CSharpRecommendationServiceRunner_Conversions.cs (2)
190=> method.ReturnType.IsNonNullableValueType() && method.Parameters.Single().Type.IsNonNullableValueType(); 197TryMakeNullable(compilation, method.ReturnType),
Recommendations\CSharpRecommendationServiceRunner_Operators.cs (3)
73return symbol.Parameters.Length == 1 && symbol.ReturnType.IsValueType; 87return symbol.Parameters.Length == 2 && symbol.ReturnType.IsValueType; 96return symbol.Parameters.Length == 2 && symbol.ReturnType.SpecialType == SpecialType.System_Boolean;
Rename\CSharpRenameRewriterLanguageService.cs (1)
1063if (!method.ReturnsVoid && !method.Parameters.Any() && method.ReturnType.SpecialType == SpecialType.System_Boolean)
Simplification\CSharpSimplificationService.Expander.cs (2)
120var returnType = (_semanticModel.GetSymbolInfo(lambdaExpression).Symbol as IMethodSymbol)?.ReturnType; 142var returnType = (_semanticModel.GetSymbolInfo(parentLambda).Symbol as IMethodSymbol)?.ReturnType;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (2)
159var returnType = methodSymbol.ReturnType; 177var returnType = UnwrapTupleType(methodSymbol.ReturnType);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
1349return Equals(originalMethodSymbol.ReturnType, rewrittenMethodSymbol.ReturnType);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (1)
74type: method.ReturnType.GenerateTypeSyntax(),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
224.Concat(method.ReturnType.GetReferencedTypeParameters())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
236invokeMethod.ReturnType.GenerateTypeSyntax(),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (1)
95returnType: method.ReturnType.GenerateTypeSyntax(),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
166Type: symbol.Signature.ReturnType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
57var returnType = method.ReturnType;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
590invocationTypes.Any(t => Compilation.ClassifyConversion(m.ReturnType, t).IsImplicit)).ToList(); 629var map = DetermineTypeParameterMapping(type, method.ReturnType);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (2)
AbstractTypeParameterChecker.cs (1)
91Visit(symbol.ReturnType);
InstructionDecoder.cs (1)
117return ((IMethodSymbol)method.GetISymbol()).ReturnType.ToDisplayString(DisplayFormat);
Microsoft.CodeAnalysis.Features (34)
Completion\Providers\AbstractOverrideCompletionProvider.cs (2)
47newOverriddenMember = CodeGenerationSymbolFactory.CreateMethodSymbol(methodSymbol, returnType: methodSymbol.ReturnType.WithNullableAnnotation(NullableAnnotation.NotAnnotated)); 74SymbolKind.Method => ((IMethodSymbol)symbol).ReturnType,
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
72returnType: method.ReturnType,
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
130=> symbol is IMethodSymbol method ? method.ReturnType : symbol.GetSymbolType();
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (4)
215if (methodSymbol.ReturnsVoid || methodSymbol.ReturnType == null || targetTypeSymbols.IsEmpty) 220if (typeConvertibilityCache.TryGetValue(methodSymbol.ReturnType, out var isConvertible)) 225isConvertible = CompletionUtilities.IsTypeImplicitlyConvertible(compilation, methodSymbol.ReturnType, targetTypeSymbols); 226typeConvertibilityCache[methodSymbol.ReturnType] = isConvertible;
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (3)
259if (!IsExchangable(indexer.ReturnType, foreachType, model.Compilation)) 283IsExchangable(indexer.ReturnType, foreachType, model.Compilation)) 314if (!IsExchangable(indexerImpl.ReturnType, foreachType, model.Compilation))
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
284var getEnumeratorReturnType = getEnumeratorMethod.ReturnType;
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
2382TypesEquivalent(oldMethod.ReturnType, newMethod.ReturnType, exact);
ExtractInterface\AbstractExtractInterfaceService.cs (1)
394returnType: method.ReturnType,
ExtractMethod\Extensions.cs (1)
27return methodSymbol.ReturnType;
ExtractMethod\MethodExtractor.TypeParameterCollector.cs (1)
36symbol.Signature.ReturnType.Accept(this);
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (3)
71_state.DelegateMethodSymbol.ReturnType == null || 72_state.DelegateMethodSymbol.ReturnType is IErrorTypeSymbol) 79return _state.DelegateMethodSymbol.ReturnType;
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (2)
498.LocalDeclarationStatement(calleeMethodSymbol.ReturnType, unusedLocalName.Text, 561GenerateTypeSyntax(calleeMethodSymbol.ReturnType, allowVar: false),
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
60symbol.ReturnType.Accept(this);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
138SymbolEqualityComparer.IncludeNullability.Equals(parameter.Type, getMethod.ReturnType) &&
Shared\Utilities\ExtractTypeHelpers.cs (1)
209DoesTypeReferenceTypeParameter(method.ReturnType, typeParameter, checkedTypes);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
856(IsSpecialMethodWithMatchingProperty("ShouldSerialize") && methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean ||
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
432(method.ReturnType.IsDelegateType() ||
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.MethodSignatureInfo.cs (1)
25=> _methodSymbol.ReturnType;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
148if (IsTypeLessAccessibleThanOtherType(methodSymbol.ReturnType, second, []))
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
143return !IsAsyncReturnType(methodSymbol.ReturnType, knownTypes);
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (2)
52if (ShouldOfferFix(methodSymbol.ReturnType, knownTypes)) 100solutionServices, syntaxFacts, generator, updatedNode, methodSymbol.ReturnType, knownTypes, needsReturnStatementAdded));
src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
765if (boundReturnType != null && methodSymbol.ReturnType.Equals(boundReturnType))
ValueTracking\ValueTracker.cs (1)
246return methodSymbol.ReturnType.SpecialType != SpecialType.System_Void;
Microsoft.CodeAnalysis.Test.Utilities (2)
Compilation\TestOperationVisitor.cs (2)
815semanticModel.Compilation.CreateBuiltinOperator(symbol.Name, method.ReturnType, method.Parameters[0].Type); 818semanticModel.Compilation.CreateBuiltinOperator(symbol.Name, method.ReturnType, method.Parameters[0].Type, method.Parameters[1].Type);
Microsoft.CodeAnalysis.VisualBasic (3)
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
443method.ReturnType.Accept(Me.NotFirstVisitor())
SymbolDisplay\SymbolDisplayVisitor.Types.vb (1)
191invokeMethod.ReturnType.Accept(Me.NotFirstVisitor())
Symbols\MethodSymbol.vb (1)
1056Private ReadOnly Property IMethodSymbol_ReturnType As ITypeSymbol Implements IMethodSymbol.ReturnType
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
162returnType = methodSymbol.ReturnType
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (17)
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (3)
70If method.ReturnType.GetArity() <> 1 Then 74ienumerableSymbol = ienumerableSymbol.Construct(method.ReturnType.GetTypeArguments().First()) 76If Not method.ReturnType.Equals(ienumerableSymbol) Then
src\Analyzers\VisualBasic\CodeFixes\MakeMethodAsynchronous\VisualBasicMakeMethodAsynchronousCodeFixProvider.vb (2)
87If Not knownTypes.IsTaskLike(methodSymbol.ReturnType) Then 89Dim returnType = knownTypes.TaskOfTType.Construct(methodSymbol.ReturnType).GenerateTypeSyntax().WithAdditionalAnnotations(Simplifier.AddImportsAnnotation)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodSynchronous\VisualBasicMakeMethodSynchronousCodeFixProvider.vb (3)
59If methodSymbol.ReturnType.OriginalDefinition.Equals(knownTypes.TaskOfTType) Then 60Dim newAsClause = functionStatement.AsClause.WithType(methodSymbol.ReturnType.GetTypeArguments()(0).GenerateTypeSyntax()) 64ElseIf Equals(methodSymbol.ReturnType.OriginalDefinition, knownTypes.TaskType) Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ConversionGenerator.vb (1)
55SyntaxFactory.SimpleAsClause(method.ReturnType.GenerateTypeSyntax()))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\MethodGenerator.vb (2)
70Dim isSub = method.ReturnType.SpecialType = SpecialType.System_Void 110method.ReturnType.GenerateTypeSyntax())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
144SyntaxFactory.SimpleAsClause(invokeMethod.ReturnType.GenerateTypeSyntax())))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\OperatorGenerator.vb (1)
50SyntaxFactory.SimpleAsClause(method.ReturnType.GenerateTypeSyntax()))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (4)
742Dim typeArguments = memberMethod.ReturnType.GetTypeArguments() 746taskOfT IsNot Nothing AndAlso Equals(memberMethod.ReturnType.OriginalDefinition, taskOfT) AndAlso typeArguments.Any(), 750Return CreateResult(memberMethod.ReturnType) 769Dim memberType = If(TryCast(memberSymbol, IMethodSymbol)?.ReturnType,
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
189returnType:=delegateInvokeMethod.ReturnType,
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
CodeGen\CodeGenTuples.vb (1)
22442Assert.Equal("IResult(Of System.Int32)", actSymbol.ReturnType.ToTestDisplayString())
Microsoft.CodeAnalysis.VisualBasic.Features (15)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
284eventType.DelegateInvokeMethod.ReturnType,
SignatureHelp\AbstractOrdinaryMethodSignatureHelpProvider.vb (1)
62parts.AddRange(method.ReturnType.ToMinimalDisplayParts(semanticModel, position))
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (2)
131parts.AddRange(method.ReturnType.ToMinimalDisplayParts(semanticModel, position)) 158parts.AddRange(delegateInvokeMethod.ReturnType.ToMinimalDisplayParts(semanticModel, position))
SignatureHelp\GenericNameSignatureHelpProvider.Method.vb (1)
60result.AddRange(method.ReturnType.ToMinimalDisplayParts(semanticModel, position))
SignatureHelp\InvocationExpressionSignatureHelpProvider.DelegateInvoke.vb (1)
77parts.AddRange(invokeMethod.ReturnType.ToMinimalDisplayParts(semanticModel, position))
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.DelegateType.vb (1)
76parts.AddRange(invokeMethod.ReturnType.ToMinimalDisplayParts(semanticModel, position))
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (3)
70If method.ReturnType.GetArity() <> 1 Then 74ienumerableSymbol = ienumerableSymbol.Construct(method.ReturnType.GetTypeArguments().First()) 76If Not method.ReturnType.Equals(ienumerableSymbol) Then
src\Analyzers\VisualBasic\CodeFixes\MakeMethodAsynchronous\VisualBasicMakeMethodAsynchronousCodeFixProvider.vb (2)
87If Not knownTypes.IsTaskLike(methodSymbol.ReturnType) Then 89Dim returnType = knownTypes.TaskOfTType.Construct(methodSymbol.ReturnType).GenerateTypeSyntax().WithAdditionalAnnotations(Simplifier.AddImportsAnnotation)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodSynchronous\VisualBasicMakeMethodSynchronousCodeFixProvider.vb (3)
59If methodSymbol.ReturnType.OriginalDefinition.Equals(knownTypes.TaskOfTType) Then 60Dim newAsClause = functionStatement.AsClause.WithType(methodSymbol.ReturnType.GetTypeArguments()(0).GenerateTypeSyntax()) 64ElseIf Equals(methodSymbol.ReturnType.OriginalDefinition, knownTypes.TaskType) Then
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\CompilationAPITests.vb (1)
2108Assert.Equal(taskOfObject, entryPoint.ReturnType)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (11)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
945If Not method.ReturnsVoid AndAlso Not method.Parameters.Any() AndAlso method.ReturnType.SpecialType = SpecialType.System_Boolean Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
162returnType = methodSymbol.ReturnType
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ConversionGenerator.vb (1)
55SyntaxFactory.SimpleAsClause(method.ReturnType.GenerateTypeSyntax()))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\MethodGenerator.vb (2)
70Dim isSub = method.ReturnType.SpecialType = SpecialType.System_Void 110method.ReturnType.GenerateTypeSyntax())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
144SyntaxFactory.SimpleAsClause(invokeMethod.ReturnType.GenerateTypeSyntax())))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\OperatorGenerator.vb (1)
50SyntaxFactory.SimpleAsClause(method.ReturnType.GenerateTypeSyntax()))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (4)
742Dim typeArguments = memberMethod.ReturnType.GetTypeArguments() 746taskOfT IsNot Nothing AndAlso Equals(memberMethod.ReturnType.OriginalDefinition, taskOfT) AndAlso typeArguments.Any(), 750Return CreateResult(memberMethod.ReturnType) 769Dim memberType = If(TryCast(memberSymbol, IMethodSymbol)?.ReturnType,
Microsoft.CodeAnalysis.Workspaces (50)
Editing\SyntaxGenerator.cs (6)
195returnType: method.ReturnType.IsSystemVoid() ? null : TypeExpression(method.ReturnType, method.RefKind), 242return method.ReturnType.GetReferencedTypeParameters().Any(t => IsNullableAnnotatedTypeParameter(typeParameter, t)) || 287returnType: method.ReturnType.IsSystemVoid() ? null : TypeExpression(method.ReturnType, method.RefKind), 796returnType: invoke.ReturnsVoid ? null : TypeExpression(invoke.ReturnType),
FindSymbols\FindReferences\Finders\ExplicitConversionSymbolReferenceFinder.cs (2)
21GetUnderlyingNamedType(symbol.ReturnType) is not null; 46var underlyingNamedType = GetUnderlyingNamedType(symbol.ReturnType);
Shared\Extensions\IMethodSymbolExtensions.cs (2)
41if (!method.ReturnType.InheritsFromOrEquals(invoke.ReturnType))
Shared\Extensions\ISymbolExtensions.cs (2)
522if (!left.ReturnType.Equals(right.ReturnType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\IMethodSymbolExtensions.cs (6)
106methodSymbol.ReturnType.SpecialType == SpecialType.System_Int32 || 107methodSymbol.ReturnType.OriginalDefinition.Equals(taskType) || 108methodSymbol.ReturnType.OriginalDefinition.Equals(genericTaskType)); 118if (method.ReturnType is not INamedTypeSymbol { Arity: 0 }) 122return method.ReturnType.Equals(compilation.TaskType()) || 123method.ReturnType.GetAttributes().Any(a => a.AttributeClass?.Equals(compilation.AsyncMethodBuilderAttribute()) ?? false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (8)
280IMethodSymbol methodSymbol => methodSymbol.ReturnType, 454types = types.Concat((method.ReturnType ?? compilation.GetSpecialType(SpecialType.System_Object)).WithNullableAnnotation(method.ReturnNullableAnnotation)); 592if (methodSymbol.ReturnType == null) 600container: typeSymbol ?? methodSymbol!.ReturnType.OriginalDefinition, 613var returnType = getAwaiter.ReturnType; 647var returnType = getEnumerator.ReturnType; 670ReturnType.SpecialType: SpecialType.System_Boolean, 687var returnType = getAsyncEnumerator.ReturnType;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.RequiresUnsafeModifierVisitor.cs (1)
114symbol.ReturnType.Accept(this) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (1)
106if (!IsSymbolAccessibleCore(funcPtrSignature.ReturnType, within, null, out failedThroughTypeCheck))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.CollectTypeParameterSymbolsVisitor.cs (1)
49symbol.Signature.ReturnType.Accept(this);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (1)
31accessibility = AccessibilityUtilities.Minimum(accessibility, symbol.Signature.ReturnType.Accept(this));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (2)
20visitor.WriteSymbolKey(symbol.ReturnType); 29var returnType = reader.ReadSymbolKey(contextualSymbol?.ReturnType, out var returnTypeFailureReason);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.FunctionPointerTypeSymbolKey.cs (2)
29visitor.WriteSymbolKey(symbol.Signature.ReturnType); 56var returnType = reader.ReadSymbolKey(contextualSymbol?.Signature.ReturnType, out var returnTypeFailureReason);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.MethodSymbolKey.cs (3)
146visitor.WriteSymbolKey(symbol.ReturnType); 247var returnType = (ITypeSymbol?)reader.ReadSymbolKey(contextualSymbol: method.ReturnType, out _).GetAnySymbol(); 249!reader.Comparer.Equals(returnType, method.ReturnType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (2)
482CompareAcrossSemanticModels(methodSymbol.ReturnType, newMethodSymbol.ReturnType) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (2)
207if (!method1.ReturnsVoid && !this.SignatureTypeEquivalenceComparer.Equals(method1.ReturnType, method2.ReturnType))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (2)
488return symbolEquivalenceComparer.SignatureTypeEquivalenceComparer.Equals(x.ReturnType, y.ReturnType, equivalentTypesWithDifferingAssemblies) &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (2)
371accessor.ReturnType, 532returnType ?? method.ReturnType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (2)
67method.ReturnType.SubstituteTypes(mapping, typeGenerator), 93method.ReturnType,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (1)
448method.ReturnType.SpecialType == SpecialType.System_Boolean &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (1)
210method.ReturnType.SpecialType == SpecialType.System_Int32 &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (1)
133.FirstOrDefault(m => m is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, ReturnType: var returnType, Parameters.Length: 0 } &&
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
UtilityTest\DocumentationCommentIdTests.cs (2)
314CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.op_Explicit(Acme.Widget)~System.Int32", compilation, m => m.MethodKind == MethodKind.Conversion && m.Parameters.Length == 1 && m.ReturnType.Name == "Int32"); 315CheckDeclarationId<IMethodSymbol>("M:Acme.Widget.op_Implicit(Acme.Widget)~System.Int64", compilation, m => m.MethodKind == MethodKind.Conversion && m.Parameters.Length == 1 && m.ReturnType.Name == "Int64");
Microsoft.Gen.Metrics (4)
Parser.cs (4)
441string metricNameFromMethod = methodSymbol.ReturnType.Name; 452MetricTypeName = methodSymbol.ReturnType.ToDisplayString(), // Roslyn doesn't know this type yet, no need to use a format here 572var returnType = methodSymbol.ReturnType; 577Diag(DiagDescriptors.ErrorInvalidMethodReturnType, methodSymbol.ReturnType.GetLocation(), methodSymbol.Name);
Microsoft.Gen.MetricsReports (4)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (4)
441string metricNameFromMethod = methodSymbol.ReturnType.Name; 452MetricTypeName = methodSymbol.ReturnType.ToDisplayString(), // Roslyn doesn't know this type yet, no need to use a format here 572var returnType = methodSymbol.ReturnType; 577Diag(DiagDescriptors.ErrorInvalidMethodReturnType, methodSymbol.ReturnType.GetLocation(), methodSymbol.Name);
Microsoft.Interop.ComInterfaceGenerator (3)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (3)
253if (methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean 273if (methodSymbol.ReturnType is { TypeKind: TypeKind.Struct } 274&& IsHResultLikeType(methodSymbol.ReturnType)
Microsoft.Interop.LibraryImportGenerator (21)
Analyzers\ConvertToLibraryImportFixer.cs (1)
689return method.ReturnType.SpecialType is SpecialType.System_String or SpecialType.System_Char;
Analyzers\CustomMarshallerAttributeAnalyzer.cs (9)
886unmanagedType = toUnmanagedMethod.ReturnType; 903if (!SymbolEqualityComparer.Default.Equals(methods.ToUnmanaged.ReturnType, methods.ToUnmanagedWithBuffer.ReturnType)) 947if (TryGetElementTypeFromSpanType(methods.ManagedValuesSource.ReturnType, out ITypeSymbol sourceElementType) 948&& TryGetElementTypeFromSpanType(methods.ManagedValuesDestination.ReturnType, out ITypeSymbol destinationElementType) 966&& TryGetElementTypeFromSpanType(unmanagedValuesCollectionMethod.ReturnType, out ITypeSymbol sourceElementType) 1202unmanagedType = methods.ToUnmanaged.ReturnType; 1235if (TryGetElementTypeFromSpanType(methods.ManagedValuesSource.ReturnType, out ITypeSymbol sourceElementType) 1236&& TryGetElementTypeFromSpanType(methods.ManagedValuesDestination.ReturnType, out ITypeSymbol destinationElementType)
Analyzers\CustomMarshallerAttributeFixer.cs (7)
355unmanagedType = methods.ToUnmanaged.ReturnType; 359unmanagedType = methods.ToUnmanagedWithBuffer.ReturnType; 389return ((INamedTypeSymbol)methods.ManagedValuesSource.ReturnType).TypeArguments[0]; 393return ((INamedTypeSymbol)methods.ManagedValuesDestination.ReturnType).TypeArguments[0]; 530unmanagedType = methods.ToUnmanaged.ReturnType; 556return ((INamedTypeSymbol)methods.ManagedValuesSource.ReturnType).TypeArguments[0]; 560return ((INamedTypeSymbol)methods.ManagedValuesDestination.ReturnType).TypeArguments[0];
Analyzers\NativeMarshallingAttributeAnalyzer.cs (1)
169IMethodSymbol method => method.ReturnType,
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (3)
253if (methodSymbol.ReturnType.SpecialType == SpecialType.System_Boolean 273if (methodSymbol.ReturnType is { TypeKind: TypeKind.Struct } 274&& IsHResultLikeType(methodSymbol.ReturnType)
Microsoft.Interop.SourceGeneration (27)
ManualTypeMarshallingHelper.cs (7)
467collectionElementType = ((INamedTypeSymbol)methods.ManagedValuesSource.ReturnType).TypeArguments[0]; 473nativeType = methods.ToUnmanagedWithBuffer.ReturnType; 477nativeType = methods.ToUnmanaged.ReturnType; 498collectionElementType = ((INamedTypeSymbol)methods.ManagedValuesDestination.ReturnType).TypeArguments[0]; 567nativeType = methods.ToUnmanaged.ReturnType; 573collectionElementType = ((INamedTypeSymbol)methods.ManagedValuesSource.ReturnType).TypeArguments[0]; 591collectionElementType = ((INamedTypeSymbol)methods.ManagedValuesDestination.ReturnType).TypeArguments[0];
MarshallerShape.cs (15)
294&& SymbolEqualityComparer.Default.Equals(managedType, m.ReturnType)); 303&& SymbolEqualityComparer.Default.Equals(managedType, m.ReturnType)); 346.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 356.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 368&& managedType.IsConstructedFromEqualTypes(m.ReturnType)); 378&& managedType.IsConstructedFromEqualTypes(m.ReturnType)); 386.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 396.FirstOrDefault(m => m is { IsStatic: true, Parameters.Length: 2, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 472unmanagedType = toUnmanaged.ReturnType; 595&& SymbolEqualityComparer.Default.Equals(managedType, m.ReturnType)); 603&& SymbolEqualityComparer.Default.Equals(managedType, m.ReturnType)); 690.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 699.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 0, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 708.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType } 718.FirstOrDefault(m => m is { IsStatic: false, Parameters.Length: 1, ReturnsVoid: false, ReturnType: INamedTypeSymbol returnType }
MethodSignatureElementInfoProvider.cs (2)
34ManagedTypeInfo.CreateTypeInfoForTypeSymbol(_method.ReturnType), 35marshallingInfoCallback(_method.ReturnType, new UseSiteAttributeProvider(_useSiteAttributeParsers, _method.GetReturnTypeAttributes(), rootProvider, _generatorDiagnostics, marshallingInfoCallback), 0)) with
SignatureContext.cs (3)
95StubReturnType = method.ReturnType.AsTypeSyntax(), 122TypePositionInfo retTypeInfo = new(ManagedTypeInfo.CreateTypeInfoForTypeSymbol(method.ReturnType), marshallingInfoParser.ParseMarshallingInfo(method.ReturnType, method.GetReturnTypeAttributes()));
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\RelaxTestNamingTest.cs (1)
127if (method.ReturnType.MetadataName != "Task")
Microsoft.VisualStudio.LanguageServices (2)
Progression\GraphNodeIdCreation.cs (1)
334var nodes = await GetPartialsForNamespaceAndTypeAsync(methodSymbol.ReturnType, true, solution, cancellationToken).ConfigureAwait(false);
ProjectSystem\AbstractEntryPointFinder.cs (1)
49var returnType = symbol.ReturnType;
Microsoft.VisualStudio.LanguageServices.CSharp (7)
CodeModel\CSharpCodeModelService_Prototype.cs (2)
310builder.Append(GetAsStringForCodeTypeRef(symbol.DelegateInvokeMethod.ReturnType)); 391builder.Append(GetAsStringForCodeTypeRef(symbol.ReturnType));
ObjectBrowser\DescriptionBuilder.cs (3)
42AddTypeLink(delegateInvokeMethod.ReturnType, LinkFlags.None); 199AddTypeLink(methodSymbol.ReturnType, LinkFlags.None); 216AddTypeLink(methodSymbol.ReturnType, LinkFlags.None);
Progression\CSharpProgressionLanguageService.cs (2)
119case IMethodSymbol m: return IncludeReturnType(m) ? m.ReturnType : null; 121case INamedTypeSymbol n: return n.IsDelegateType() ? n.DelegateInvokeMethod.ReturnType : null;
Microsoft.VisualStudio.LanguageServices.VisualBasic (7)
CodeModel\VisualBasicCodeModelService_Prototype.vb (3)
97methodSymbol.ReturnType IsNot Nothing AndAlso 98Not methodSymbol.ReturnType.SpecialType = SpecialType.System_Void Then 100AppendType(builder, methodSymbol.ReturnType, flags)
ObjectBrowser\DescriptionBuilder.vb (4)
60AddTypeLink(delegateInvokeMethod.ReturnType, LinkFlags.None) 146AddTypeLink(methodSymbol.ReturnType, LinkFlags.None) 193AddTypeLink(methodSymbol.ReturnType, LinkFlags.None) 221AddTypeLink(methodSymbol.ReturnType, LinkFlags.None)
System.Text.RegularExpressions.Generator (1)
RegexGenerator.Parser.cs (1)
119!SymbolEqualityComparer.Default.Equals(regexMethodSymbol.ReturnType, regexSymbol))
System.Windows.Forms.Analyzers.CSharp (2)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (1)
66if (funcType.DelegateInvokeMethod?.ReturnType is INamedTypeSymbol returnType
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
68|| shouldSerializeMethod.ReturnType.SpecialType != SpecialType.System_Boolean
System.Windows.Forms.Analyzers.VisualBasic (3)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.vb (2)
78If funcType.DelegateInvokeMethod?.ReturnType IsNot Nothing Then 79Dim returnType = TryCast(funcType.DelegateInvokeMethod.ReturnType, INamedTypeSymbol)
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
70shouldSerializeMethod.ReturnType.SpecialType <> SpecialType.System_Boolean OrElse