不能燮preSS CA1709以任何方式 [英] Can't suppress CA1709 in any way

查看:176
本文介绍了不能燮preSS CA1709以任何方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想晚饭preSS CA1709:标识符应正确套管,上 公共类IDD 。比如我想使用IDD作为正确的单词。但我不能。我什么都试过在code分析词典:

I want to suppress CA1709: Identifiers should be cased correctly, on public class IDd. For example i want to use IDd as correct word. But i can't. I tried everything at code analysis dictionary:

<?xml version="1.0" encoding="utf-8"?>
<Dictionary>
  <Words>
    <Unrecognized>
      <Word></Word>
    </Unrecognized>
    <Recognized>
      <Word>d</Word>
      <Word>IDd</Word>
    </Recognized>
        <Deprecated>
            <Term PreferredAlternate=""></Term>
        </Deprecated>
        <Compound>
            <Term CompoundAlternate="IDd">IDd</Term>
        </Compound>
    <DiscreteExceptions>
      <Term>IDd</Term>
    </DiscreteExceptions>
  </Words>
  <Acronyms>
    <CasingExceptions>
      <Acronym>IDd</Acronym>
      <Acronym>ID</Acronym>
      <Acronym>d</Acronym>
    </CasingExceptions>
  </Acronyms>
</Dictionary>

但没有什么可以帮助我补充这项工作是正确与这种情况下。你会建议?

But nothing helps me to add this work as correct with that case. What would you advise?

推荐答案

这里的问题是DD,而不是完整的国际长途,这是什么CA1709违反消息应该显示。

The problem here is the "Dd", not the full "IDd", which is what the message of the CA1709 violation should be showing.

这可以解决,如果你认为这是一个实际的词相当加入DD的字典作为一个公认的一句话:

This can be addressed quite adding "dd" to the dictionary as a recognized word if you consider to be an actual word:

<?xml version="1.0" encoding="utf-8" ?>
<Dictionary>
    <Words>
        <Recognized>
            <Word>dd</Word>
        </Recognized>
    </Words>
</Dictionary>

,或将其添加为一个缩写外壳异常,如果你不认为这是一个字一个仍想使用Pascal大小写:

or by adding it as an acronym casing exception if you do not consider it to be a word by still want to use pascal casing:

<?xml version="1.0" encoding="utf-8" ?>
<Dictionary>
    <Acronyms>
        <CasingExceptions>
            <Acronym>Dd</Acronym>
        </CasingExceptions>
    </Acronyms>
</Dictionary>

这篇关于不能燮preSS CA1709以任何方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆