本文整理汇总了C#中JsonObject.EnsureValidSystemProperties方法的典型用法代码示例。如果您正苦于以下问题:C# JsonObject.EnsureValidSystemProperties方法的具体用法?C# JsonObject.EnsureValidSystemProperties怎么用?C# JsonObject.EnsureValidSystemProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JsonObject
的用法示例。
在下文中一共展示了JsonObject.EnsureValidSystemProperties方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateJsonObjectWithETag
public static JsonObject CreateJsonObjectWithETag()
{
const string valueString = "something";
var json = new JsonObject {{"ETag", valueString}, {"id", valueString}, {"name", valueString}};
json.EnsureValidSystemProperties();
return json;
}
示例2: CreateJsonObject
public static JsonObject CreateJsonObject(DateTime aTimestamp, string id = "something")
{
const string valueString = "something";
var json = new JsonObject { { "ETag", valueString }, { "Timestamp", aTimestamp }, { "id", id }, { "name", valueString } };
json.EnsureValidSystemProperties();
return json;
}
示例3: ToJsonObject
public static JsonObject ToJsonObject(this DynamicTableEntity ce)
{
var json = new JsonObject { { "ETag", ce.ETag }, { "Timestamp", ce.Timestamp } };
foreach (var field in ce.Properties)
{
json[field.Key] =
IsArray(field)
? InflateArray(field)
: field.Value.PropertyAsObject;
}
json.EnsureValidSystemProperties();
return json;
}
示例4: ToJsonObject
public static JsonObject ToJsonObject(this CyanEntity ce)
{
var json = new JsonObject {{"ETag", ce.ETag}, {"Timestamp", ce.Timestamp}};
foreach (var field in ce.Fields)
{
json[field.Key] =
IsArray(field)
? JsonConvert.DeserializeObject<object[]>(field.Value.ToString())
: field.Value;
}
json.EnsureValidSystemProperties();
return json;
}
示例5: CreateJsonObjectForPostWithArray
public static JsonObject CreateJsonObjectForPostWithArray(string id = "someId", string parentId = "", string name = "someName")
{
var json = new JsonObject
{
{"id", id},
{"name", name},
{"parentId", parentId},
{"PartitionKey", "PK"},
{"RowKey", id},
{"dragon_ids", new object[] {"1", "2", "3"}}
};
json.EnsureValidSystemProperties();
return json;
}