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