Created
May 23, 2016 07:00
-
-
Save DavidKarlas/f199713320ee876c564f79df83d06dea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace cp654fz7 | |
{ | |
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false)] | |
public sealed class JsonPropertyAttribute : Attribute | |
{ | |
internal bool? _isReference; | |
internal int? _order; | |
public bool IsReference | |
{ | |
get { return _isReference ?? default(bool); } | |
set { _isReference = value; } | |
} | |
public int Order | |
{ | |
get { return _order ?? default(int); } | |
set { _order = value; } | |
} | |
public string PropertyName { get; set; } | |
public JsonPropertyAttribute() | |
{ | |
} | |
public JsonPropertyAttribute(string propertyName) | |
{ | |
PropertyName = propertyName; | |
} | |
} | |
class MainClass | |
{ | |
[JsonProperty()] | |
public object MyProperty { get; set; } | |
public static void Main(string[] args) | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Showing only 1 constructor when I have 2
Showing all kind of classes instead of just
IsReference=
andOrder=