例如,标识符如iPhone.当我运行代码分析时,它给了我这个错误:
CA1709:Microsoft.Naming:通过将其更改为"I"来更正名称空间名称"iPhone.Example"中的"i"的大小写.
我尝试添加一个条目CustomDictionary.xml如下:
<Words>
<Recognized>
<Word>iphone</Word>
</Recognized>
</Words>
Run Code Online (Sandbox Code Playgroud)
然后它仍然给了我同样的错误和一个,如下:
CA1702:Microsoft.Naming:名称空间名称"iPhone.Example"中的复合词"iPhone"作为离散术语存在.如果您的用法是单字,请将其称为"iphone".
然后我添加了一些规则如下:
<Compound>
<Term CompoundAlternate="IPhone">iphone</Term>
</Compound>
<DiscreteExceptions>
<Term>iphone</Term>
</DiscreteExceptions>
<Acronyms>
<CasingExceptions>
<Acronym>iPhone</Acronym>
</CasingExceptions>
</Acronyms>
Run Code Online (Sandbox Code Playgroud)
但它没有任何区别.反正有没有添加这种例外?
提前致谢.
我想子类化一些SharePoint对象,例如SPSite,SPWeb,SPList和SPListItem.知道怎么做吗?我无法创建派生类的实例,因为我无法使用构造函数构造对象.
我通常使用容器类来包装所述对象,但我不认为这是一个很好的解决方案,因为它不能为对象提供良好的语义和OOP感觉.任何帮助或建议表示赞赏.
谢谢.