Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Source/Glass.Mapper.Sc/Fields/Link.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@ public class Link

public const string UrlFormat = "{0}{1}";

public string BuildUrl()
{
return BuildUrl((SafeDictionary<string>)null);
}


[Obsolete("User the SafeDictionary alternative")]
[Obsolete("Use the SafeDictionary alternative")]
public string BuildUrl(NameValueCollection attributes = null)
{
return BuildUrl(attributes.ToSafeDictionary());
Expand Down Expand Up @@ -114,7 +117,7 @@ public string BuildUrl(SafeDictionary<string> attributes = null)
var query = getValue("query", () => Query);
var anchor = getValue("anchor", () => Anchor);

if (query.IsNotNullOrEmpty())
if (query.HasValue())
builder.AddToQueryString(query);

return UrlFormat.Formatted(builder.ToString(), anchor.IsNullOrEmpty() ? "" : "#" + anchor);
Expand Down