コード例 #1
0
 public SettingsNotFoundHighlighting(
     ICSharpArgumentsOwner argumentsOwner,
     IArgumentList argumentList,
     string key,
     string type)
 {
     _argumentsOwner = argumentsOwner;
     _argumentList   = argumentList;
     ToolTip         = $"{type} {key} wasn't found in configuration files";
 }
コード例 #2
0
        protected override Action <ITextControl> ExecutePsiTransaction(ISolution solution, IProgressIndicator progress)
        {
            var elementFactory = CSharpElementFactory.GetInstance(_error.Invocation);
            ICSharpArgumentsOwner arguments = _error.Invocation;
            var correctFlagsExpression      = elementFactory.CreateExpression(_error.ExpectedBindingflags.GetFullString());

            if (_error.Invocation.Arguments.Count == 1)
            {
                var arg = arguments.AddArgumentBefore(_error.Invocation.Arguments[0], null);
                arg.SetValue(correctFlagsExpression);
            }
            else if (_error.Invocation.Arguments.Count > 1)
            {
                _error.Invocation.Arguments[1].SetValue(correctFlagsExpression);
            }
            return(null);
        }