需要unproven - String中的枚举检查失败.StartsWith(string,StringComparison) [英] requires unproven - Enum check failure in string.StartsWith(string, StringComparison)
问题描述
以下代码行导致"需要未经证实"的消息。
The following line of code causes a 'requires unproven' message.
if(!nameValuePair [0] .StartsWith(" $",StringComparison.Ordinal))
if (!nameValuePair[0].StartsWith("$", StringComparison.Ordinal))
警告 2
CodeContracts:需要unproven:Enum.IsDefined(typeof(StringComparison) ,comparisonType)
TableNameRetriever.cs 68
11 CargoWise.Glow.Infrastructure.Caching
Warning 2 CodeContracts: requires unproven: Enum.IsDefined(typeof(StringComparison), comparisonType) TableNameRetriever.cs 68 11 CargoWise.Glow.Infrastructure.Caching
推荐答案
你好Brett,
Hi Brett,
在新版本的静态检查器中,我们现在考虑了上述涉及Enum.IsDefined的合同。
in the new version of the static checker, we now take into account contracts involving Enum.IsDefined as above.
如果你成功获得了一个repro,我将非常感激它(你可以直接发给我)
If you succeed in getting a repro, I will appreciate it a lot (you can send it directly to me)
谢谢,
f
这篇关于需要unproven - String中的枚举检查失败.StartsWith(string,StringComparison)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!