-Code reformat

This commit is contained in:
James Newton-King
2013-10-20 15:08:39 +13:00
parent d03963016e
commit bcd6982419
466 changed files with 71645 additions and 71598 deletions
@@ -5,33 +5,34 @@ using System.Text;
namespace Newtonsoft.Json.Tests.Documentation.Samples.Serializer
{
public class PropertyJsonIgnore
{
#region Types
public class Account
public class PropertyJsonIgnore
{
public string FullName { get; set; }
public string EmailAddress { get; set; }
[JsonIgnore]
public string PasswordHash { get; set; }
}
#endregion
public void Example()
{
#region Usage
Account account = new Account
#region Types
public class Account
{
FullName = "Joe User",
EmailAddress = "joe@example.com",
PasswordHash = "VHdlZXQgJ1F1aWNrc2lsdmVyJyB0byBASmFtZXNOSw=="
};
public string FullName { get; set; }
public string EmailAddress { get; set; }
string json = JsonConvert.SerializeObject(account);
[JsonIgnore]
public string PasswordHash { get; set; }
}
#endregion
Console.WriteLine(json);
// {"FullName":"Joe User","EmailAddress":"joe@example.com"}
#endregion
public void Example()
{
#region Usage
Account account = new Account
{
FullName = "Joe User",
EmailAddress = "joe@example.com",
PasswordHash = "VHdlZXQgJ1F1aWNrc2lsdmVyJyB0byBASmFtZXNOSw=="
};
string json = JsonConvert.SerializeObject(account);
Console.WriteLine(json);
// {"FullName":"Joe User","EmailAddress":"joe@example.com"}
#endregion
}
}
}
}