Skip to content

Commit

Permalink
Added json-property names
Browse files Browse the repository at this point in the history
  • Loading branch information
René Pjengaard Bank committed Jul 11, 2016
1 parent 869f441 commit 24e6c17
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 7 deletions.
Binary file added releases/github/Skybrud.LinkPicker.v1.0.6.zip
Binary file not shown.
Binary file added releases/nuget/Skybrud.LinkPicker.1.0.6.nupkg
Binary file not shown.
Binary file added releases/umbraco/Skybrud.LinkPicker.v1.0.6.zip
Binary file not shown.
6 changes: 6 additions & 0 deletions src/Skybrud.LinkPicker/LinkPickerItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,37 @@ public class LinkPickerItem {
/// <summary>
/// Gets the ID of the selected content or media. If an URL has been selected, this will return <code>0</code>.
/// </summary>
[JsonProperty("id")]
public int Id { get; private set; }

/// <summary>
/// Gets the name of the link.
/// </summary>
[JsonProperty("name")]
public string Name { get; private set; }

/// <summary>
/// Gets the URL of the link.
/// </summary>
[JsonProperty("url")]
public string Url { get; private set; }

/// <summary>
/// Gets the link target.
/// </summary>
[JsonProperty("target")]
public string Target { get; private set; }

/// <summary>
/// Gets the mode (or type) of the link.
/// </summary>
[JsonProperty("mode")]
public LinkPickerMode Mode { get; private set; }

/// <summary>
/// Gets whether the link is valid.
/// </summary>
[JsonIgnore]
public bool IsValid {
get { return !String.IsNullOrWhiteSpace(Url); }
}
Expand Down
5 changes: 5 additions & 0 deletions src/Skybrud.LinkPicker/LinkPickerList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,35 @@ public class LinkPickerList {
/// <summary>
/// Gets the title of the control.
/// </summary>
[JsonProperty("title")]
public string Title { get; private set; }

/// <summary>
/// Gets whether the control has a title.
/// </summary>
[JsonIgnore]
public bool HasTitle {
get { return !String.IsNullOrWhiteSpace(Title); }
}

/// <summary>
/// Gets an array of all link items.
/// </summary>
[JsonProperty("items")]
public LinkPickerItem[] Items { get; internal set; }

/// <summary>
/// Gets whether the link picker list has any items.
/// </summary>
[JsonIgnore]
public bool HasItems {
get { return Items != null && Items.Length > 0; }
}

/// <summary>
/// Gets the total amount of link items.
/// </summary>
[JsonProperty("count")]
public int Count {
get { return Items.Length; }
}
Expand Down
4 changes: 2 additions & 2 deletions src/Skybrud.LinkPicker/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.5.0")]
[assembly: AssemblyInformationalVersion("1.0.5")]
[assembly: AssemblyVersion("1.0.6.0")]
[assembly: AssemblyInformationalVersion("1.0.6")]
8 changes: 4 additions & 4 deletions src/Skybrud.LinkPicker/Properties/AssemblyInfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"company": "Skybrud.dk",
"product": "Skybrud.PropertyEditors",
"copyright": "Copyright © 2016",
"version": "1.0.5.0",
"informationalVersion": "1.0.5",
"fileVersion": "0.0.451.1"
}
"version": "1.0.6.0",
"informationalVersion": "1.0.6",
"fileVersion": "0.0.472.3"
}
2 changes: 1 addition & 1 deletion src/Skybrud.LinkPicker/Properties/AssemblyInfoGenerated.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Reflection;

[assembly: AssemblyFileVersion("0.0.451.1")]
[assembly: AssemblyFileVersion("0.0.472.3")]

0 comments on commit 24e6c17

Please sign in to comment.