Example #1
0
        public static bool IsEventFiled(this IEventSymbol symbol)
        {
            if (!symbol.IsFromCode() || symbol.IsOverridable())
            {
                return(false);
            }

            var syntaxReference = symbol.DeclaringSyntaxReferences.FirstOrDefault();

            if (syntaxReference != null)
            {
                bool isField = syntaxReference.GetSyntax().IsKind(SyntaxKind.VariableDeclarator);
                if (isField)
                {
                    if (symbol.IsInterfaceImplementation())
                    {
                        isField = false;
                    }
                }
                return(isField);
            }
            return(false);
        }
Example #2
0
 protected virtual bool ShallAnalyze(IEventSymbol symbol) => symbol.IsOverride is false && symbol.IsInterfaceImplementation() is false;
Example #3
0
 protected override bool ShallAnalyze(IEventSymbol symbol) => symbol.IsInterfaceImplementation() is false;