Bridge.React.Analyser.SelectAttributesAnalyzer.TargetTypeIsSelectAttributes C# (CSharp) Метод

TargetTypeIsSelectAttributes() приватный статический Метод

This requires querying the semantic model, which is typically more expensive that querying the syntax tree, so leave this check until last (so that as few code paths have to travel down this route as possible)
private static TargetTypeIsSelectAttributes ( ObjectCreationExpressionSyntax objectCreation, SyntaxNodeAnalysisContext context ) : bool
objectCreation ObjectCreationExpressionSyntax
context SyntaxNodeAnalysisContext
Результат bool
		private static bool TargetTypeIsSelectAttributes(ObjectCreationExpressionSyntax objectCreation, SyntaxNodeAnalysisContext context)
		{
			if (objectCreation == null)
				throw new ArgumentNullException(nameof(objectCreation));

			var typeToCreate = context.SemanticModel.GetTypeInfo(objectCreation);
			return
				(typeToCreate.Type != null) &&
				typeToCreate.Type.IsPartOfBridgeReact() &&
				(typeToCreate.Type.Name == "SelectAttributes");
		}