Skip to content

Commit

Permalink
Added some more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
oopanuga committed Apr 27, 2016
1 parent 9a29a65 commit f43e8d9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
31 changes: 19 additions & 12 deletions SeoPack/Helpers/UrlHelperExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using SeoPack.Url;
using System.Web.Mvc;
using System.Web.Routing;
using SeoPack.Url.UrlPolicy;

namespace SeoPack.Helpers
{
Expand Down Expand Up @@ -28,8 +29,9 @@ public static UrlSeoHelper UnpackSeo(this UrlHelper urlHelper)
}

/// <summary>
/// Generates a fully qualified Seo friendly URL for the specified route values. It uses
/// a set of predefined url policies to achieve this.
/// Generates a fully qualified Seo friendly URL for the specified route values based on a set
/// of predefined url policies. See <see cref="UrlPolicyConfiguration"/> on configuring url
/// policies.
/// </summary>
/// <param name="urlHelper">The URL helper.</param>
/// <param name="routeValues">The route values.</param>
Expand All @@ -40,8 +42,9 @@ public static string RouteSeoFriendlyUrl(this UrlHelper urlHelper, object routeV
}

/// <summary>
/// Generates a fully qualified Seo friendly URL for the specified route values. It uses
/// a set of predefined url policies to achieve this.
/// Generates a fully qualified Seo friendly URL for the specified route values based on a set
/// of predefined url policies. See <see cref="UrlPolicyConfiguration"/> on configuring url
/// policies.
/// </summary>
/// <param name="urlHelper">The URL helper.</param>
/// <param name="routeValues">The route values.</param>
Expand All @@ -52,8 +55,9 @@ public static string RouteSeoFriendlyUrl(this UrlHelper urlHelper, RouteValueDic
}

/// <summary>
/// Generates a fully qualified Seo friendly URL for the specified route values. It uses
/// a set of predefined url policies to achieve this.
/// Generates a fully qualified Seo friendly URL for the specified route values based on a set
/// of predefined url policies. See <see cref="UrlPolicyConfiguration"/> on configuring url
/// policies.
/// </summary>
/// <param name="urlHelper">The URL helper.</param>
/// <param name="routeName">Name of the route.</param>
Expand All @@ -64,8 +68,9 @@ public static string RouteSeoFriendlyUrl(this UrlHelper urlHelper, string routeN
}

/// <summary>
/// Generates a fully qualified Seo friendly URL for the specified route values. It uses
/// a set of predefined url policies to achieve this.
/// Generates a fully qualified Seo friendly URL for the specified route values based on a set
/// of predefined url policies. See <see cref="UrlPolicyConfiguration"/> on configuring url
/// policies.
/// </summary>
/// <param name="urlHelper">The URL helper.</param>
/// <param name="routeName">Name of the route.</param>
Expand All @@ -77,8 +82,9 @@ public static string RouteSeoFriendlyUrl(this UrlHelper urlHelper, string routeN
}

/// <summary>
/// Generates a fully qualified Seo friendly URL for the specified route values. It uses
/// a set of predefined url policies to achieve this.
/// Generates a fully qualified Seo friendly URL for the specified route values based on a set
/// of predefined url policies. See <see cref="UrlPolicyConfiguration"/> on configuring url
/// policies.
/// </summary>
/// <param name="urlHelper">The URL helper.</param>
/// <param name="routeName">Name of the route.</param>
Expand All @@ -91,8 +97,9 @@ public static string RouteSeoFriendlyUrl(this UrlHelper urlHelper, string routeN
}

/// <summary>
/// Generates a fully qualified Seo friendly URL for the specified route values. It uses
/// a set of predefined url policies to achieve this.
/// Generates a fully qualified Seo friendly URL for the specified route values based on a set
/// of predefined url policies. See <see cref="UrlPolicyConfiguration"/> on configuring url
/// policies.
/// </summary>
/// <param name="urlHelper">The URL helper.</param>
/// <param name="routeName">Name of the route.</param>
Expand Down
18 changes: 18 additions & 0 deletions SeoPack/Url/UrlPolicy/UrlPolicyConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@

namespace SeoPack.Url.UrlPolicy
{
/// <summary>
/// Represents a class used to configure a set of url policies that define the characteristics
/// of a Seo Friendly Url. See <see cref="SeoFriendlyUrl"/>
/// </summary>
public static class UrlPolicyConfiguration
{
private static UrlPolicyBuilder _builder;

/// <summary>
/// Gets the configured URL policies.
/// </summary>
/// <value>
/// The URL policies.
/// </value>
public static UrlPolicyBase[] UrlPolicies
{
get
Expand All @@ -16,12 +26,20 @@ public static UrlPolicyBase[] UrlPolicies
}
}

/// <summary>
/// Returns a url policy builder used to subsequently configure selected/added URL policies.
/// </summary>
/// <returns>The url policy builder.</returns>
public static UrlPolicyBuilder Configure()
{
_builder = new UrlPolicyBuilder();
return _builder;
}

/// <summary>
/// Configures url policies based on the supplied URL policies.
/// </summary>
/// <param name="urlPolicies">The URL policies.</param>
public static void Configure(IEnumerable<UrlPolicyBase> urlPolicies)
{
_builder = new UrlPolicyBuilder(urlPolicies.ToList());
Expand Down

0 comments on commit f43e8d9

Please sign in to comment.