这是我从未见过的新问题。它发生在LibCURL.NET的开源包装器中:
http://sourceforge.net/projects/libcurl-net/
我得到了一个模糊的引用“警告为错误”,但奇怪的是,这是由于一个LibCURL源文件中的CREF引用(见下文)。对于名为Easy.GetInfo()的方法,确实有几个不同的重载,但我不知道如何解决这个问题,因为违规代码不是对Easy.GetInfo()的方法调用,实际上它根本不是代码,而是Enum注释中的CREF元素。有人知道怎么解决这个问题吗?
/// <summary>
/// This enumeration is used to extract information associated with an
/// <see cref="Easy"/> transfer. Specifically, a member of this
/// enumeration is passed as the first argument to
/// <see cref="Easy.GetInfo"/> specifying the item to retrieve in the
/// second argument, which is a reference to an <c>int</c>, a
/// <c>double</c>, a <c>string</c>, a <c>DateTime</c> or an <c>object</c>.
/// </summary>
public enum CURLINFO
{
...注意:我为LibCURL.NET框架版本4.5.1重新设定了目标。我提到这一点是为了防止与此事有关。
发布于 2015-11-02 05:01:19
我在推特上得到了答复,谢谢彼得·弗特。这真的是一个模糊的解决方案,所以我把它放在这里,让其他人找到一个社区Wiki的答案。我所要做的就是在CREF目标前面加上"o:“,这告诉编译器接受对重载函数的引用。见下文:
/// <summary>
/// Pass a <c>bool</c>. If it is <c>true</c>, libcurl will attempt to get
/// the modification date of the remote document in this operation. This
/// requires that the remote server sends the time or replies to a time
/// querying command. The <see cref="o:Easy.GetInfo"/> function with the
/// <see cref="CURLINFO.CURLINFO_FILETIME"/> argument can be used after a
/// transfer to extract the received time (if any).
/// </summary>发布于 2018-09-18 10:04:39
还可以回答历史:您可以通过指定其参数来引用特定的重载函数。
例如,假设您的Easy.GetInfo有一个以int作为参数的重载。您可以使用<see cref="Easy.GetInfo(int)"/>引用该特定函数。可以说,o:的东西似乎“打破了引用”。(我没有详细说明这件事。)
此外,在参数类型涉及泛型的情况下,您必须转义<和>字符。在我的例子中,function(IList<uint>)必须写成function(IList<uint>)。
https://stackoverflow.com/questions/33470633
复制相似问题