IUrlParser.cs :  » Content-Management-Systems-CMS » N2 » N2 » Web » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Content Management Systems CMS » N2 
N2 » N2 » Web » IUrlParser.cs
using System;
namespace N2.Web{
  /// <summary>
  /// Classes implementing this interface creates unique urls for items and
  /// can from such an url find the corresponding item.
  /// </summary>
  public interface IUrlParser
  {
        /// <summary>Is invoked when the url parser didn't find </summary>
      event EventHandler<PageNotFoundEventArgs> PageNotFound;

    /// <summary>Gets the current start page.</summary>
    ContentItem StartPage { get; }

    /// <summary>Parses the current url to retrieve the current page.</summary>
    ContentItem CurrentPage { get; }

    /// <summary>Calculates an item url by walking it's parent path.</summary>
    /// <param name="item">The item whose url to compute.</param>
    /// <returns>A friendly url to the supplied item.</returns>
    string BuildUrl(ContentItem item);

    /// <summary>Checks if an item is start or root page</summary>
    /// <param name="item">The item to check</param>
    /// <returns>True if the item is a start page or a root page</returns>
    bool IsRootOrStartPage(ContentItem item);

    /// <summary>Finds the content item and the template associated with an url.</summary>
    /// <param name="url">The url to the template to locate.</param>
    /// <returns>A TemplateData object. If no template was found the object will have empty properties.</returns>
    PathData ResolvePath(string url);

    /// <summary>Finds an item by traversing names from the starting point root.</summary>
    /// <param name="url">The url that should be traversed.</param>
    /// <returns>The content item matching the supplied url.</returns>
    ContentItem Parse(string url);

    /// <summary>Removes a trailing default.aspx from an URL.</summary>
    /// <param name="path">A URL path without query strings from which to remove any trailing default.aspx.</param>
    /// <returns>The same path or one stripped of the remaining default document segment.</returns>
    string StripDefaultDocument(string path);
  }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.