Catel.ReSharper.CatelProperties.CSharp.Actions.ExcludePropertyFromSerializationContextAction.IsAvailable C# (CSharp) Method

IsAvailable() protected method

protected IsAvailable ( ) : bool
return bool
        protected override bool IsAvailable()
        {
            var expressionInitializer = FieldDeclaration.Initial as IExpressionInitializer;
            _invocationExpression = null;
            if (expressionInitializer != null)
            {
                _invocationExpression = expressionInitializer.Value as IInvocationExpression;
            }

            return _invocationExpression != null && (_invocationExpression.ArgumentList.Arguments.Count < 4 || ((_invocationExpression.ArgumentList.Arguments[3].Value is ICSharpLiteralExpression) && (_invocationExpression.ArgumentList.Arguments[3].Value as ICSharpLiteralExpression).Literal.GetTokenType() == CSharpTokenType.TRUE_KEYWORD));
        }
        #endregion