示例#1
0
            public void OperationBlockEndAction(OperationBlockAnalysisContext context)
            {
                // Check to see if the method just throws a NotImplementedException/NotSupportedException
                // We shouldn't warn about parameters in that case
                if (context.IsMethodNotImplementedOrSupported())
                {
                    return;
                }

                // Do not raise warning for unused 'this' parameter of an extension method.
                if (_method.IsExtensionMethod)
                {
                    var thisParamter = _unusedParameters.Where(p => p.Ordinal == 0).FirstOrDefault();
                    _unusedParameters.Remove(thisParamter);
                }

                _finalUnusedParameters.Add(_method, _unusedParameters);
            }