📄 navigationpath.cs
字号:
using System;
using System.Collections.Generic;
namespace ScrewTurn.Wiki.PluginFramework {
/// <summary>
/// Represents a Navigation Path.
/// </summary>
[Serializable]
public class NavigationPath {
private string name;
private List<string> pages;
private IPagesStorageProvider provider;
/// <summary>
/// Initializes a new instance of the <b>NavigationPath</b> class.
/// </summary>
/// <param name="name">The Name of the Navigation Path.</param>
/// <param name="provider">The Provider</param>
public NavigationPath(string name, IPagesStorageProvider provider) {
this.name = name;
this.provider = provider;
pages = new List<string>();
}
/// <summary>
/// Gets or sets the Name.
/// </summary>
public string Name {
get { return name; }
set { name = value; }
}
/// <summary>
/// Gets the Pages of the Path.
/// </summary>
public List<string> Pages {
get { return pages; }
}
/// <summary>
/// Gets the Provider.
/// </summary>
public IPagesStorageProvider Provider {
get { return provider; }
}
}
/// <summary>
/// Compares two NavigationPaths objects.
/// </summary>
public class NavigationPathComparer : IComparer<NavigationPath> {
/// <summary>
/// Compares two Navigation Paths's Names.
/// </summary>
/// <param name="x">The first object.</param>
/// <param name="y">The second object.</param>
/// <returns>The result of the comparison (1, 0 or -1).</returns>
public int Compare(NavigationPath x, NavigationPath y) {
return x.Name.ToLower().CompareTo(y.Name.ToLower());
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -