SandCastle:如何cref到String.Format(string,params object [])? [英] SandCastle: How to cref to String.Format (string, params object[]) ?

查看:93
本文介绍了SandCastle:如何cref到String.Format(string,params object [])?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在以下函数的XML doc注释中,我尝试链接到String.Format(string,params object []),但链接不起作用。 />

 namespace Util {
public static class XTrace {
public void WriteLine(string fmt,params object [] args){
Trace.WriteLine(String.Format(fmt,args));
}
}
}


在生成的doc.xml中,我看到我的函数成员名是" M: Util.XTrace.WriteLine(System.String,System.Object [])"
所以我假设String.Format的链接应该是< see cref = " M:System.String.Format(System.String,System.Object [])" />
但这不起作用。相反,我得到以下警告:
警告:CachedResolveReferenceLinksComponent:未知的引用链接目标'M:System.String.Format(System.String,System.Object [])'。

任何想法我做错了什么?我是否需要添加一些特殊的东西,因为"params"修饰符?

我正在使用SandCastle May 08和SandCastle HelpFileBuilder 1.8.0.2。

马丁

解决方案

PS我知道在String.Format的情况下,我可以使用href链接到MSDN Library页面。
但是我如何链接到我的功能?

我不知道,MSDN库本身似乎有问题用params链接到String.Format重载:
请参阅http://msdn.microsoft.com/en-us /library/system.string.format(VS.100).aspx

所以我想知道这是否是SandCastle中的一个错误?


Hi,

in the XML doc comments for the following function, I try to link to String.Format (string, params object []), but the link doesn't work.

namespace Util {
  public static class XTrace {
    public void WriteLine (string fmt, params object[] args) {
      Trace.WriteLine (String.Format (fmt, args));
    }
  }
}

In the generated doc.xml I see my functions member name is
  "M:Util.XTrace.WriteLine(System.String,System.Object[])",
so I assume the link to String.Format should be
  <see cref="M:System.String.Format(System.String,System.Object[])"/>,
but that doesnt work. Instead I get the following warning:
  Warn: CachedResolveReferenceLinksComponent: Unknown reference link target 'M:System.String.Format(System.String,System.Object[])'.

Any idea what I am doing wrong ?
Do I need to add something special because of the "params" modifier ?

I am using SandCastle May 08 with SandCastle HelpFileBuilder 1.8.0.2.

Martin

解决方案

P.S. I know that in the case of String.Format, I could simply link to the MSDN Library page using href.
But how would I link to my function ?

I noctice, that the MSDN library itself seems to have a problem to link to the String.Format overloads with params:
See http://msdn.microsoft.com/en-us/library/system.string.format(VS.100).aspx

So I wonder if this is a bug in SandCastle ?


这篇关于SandCastle:如何cref到String.Format(string,params object [])?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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