using System; using System.Collections.Generic; using System.Text; using System.Globalization; namespace ScrewTurn.Wiki.PluginFramework { /// /// Contains a Snippet. /// public class Snippet { /// /// The name of the Snippet. /// protected string name; /// /// The content of the Snippet. /// protected string content; /// /// The Provider that handles the Snippet. /// protected IPagesStorageProviderV30 provider; /// /// Initializes a new instance of the Snippet class. /// /// The Name of the Snippet. /// The Content of the Snippet. /// The Provider of the Snippet. public Snippet(string name, string content, IPagesStorageProviderV30 provider) { this.name = name; this.content = content; this.provider = provider; } /// /// Gets the Name of the Snippet. /// public string Name { get { return name; } } /// /// Gets or sets the Content of the Snippet. /// public string Content { get { return content; } } /// /// Gets the Provider of the Snippet. /// public IPagesStorageProviderV30 Provider { get { return provider; } } } /// /// Compares two objects. /// public class SnippetNameComparer : IComparer { /// /// Compares the name of two objects. /// /// The first . /// The second . /// The result of the comparison (1, 0 or -1). public int Compare(Snippet x, Snippet y) { return StringComparer.OrdinalIgnoreCase.Compare(x.Name, y.Name); } } }