Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

内部链接

Shirasagi edited this page Feb 1, 2024 · 1 revision

格式样例

wiki://sast-wiki/Entry?id=12345

其中各个部分:

  • Scheme: wiki
  • HostName: sast-wiki
  • Path: /Entry
  • Query: ?id=12345
    • 注:实际上拿到的Query是NameValueCollection,不需要你手动解析

请使用:

  • IInternalLinkCreator.Create(string path, Dictionary<string, string> query)创建内部链接

  • IInternalLinkValidator.Validate(Uri link)检验链接是否为合法的内部链接

  • IInternalLinkHandler.Trigger(Uri internalLink)来激活一个内部链接

  • IInternalLinkService.Register(string path, EventHandler<NameValueCollection> handler)注册新的内部链接路径与其激活时触发的方法(可以传个lambda进去)

Clone this wiki locally