本文整理汇总了C#中Newtonsoft.Json.Linq.JObject.AddToProperties方法的典型用法代码示例。如果您正苦于以下问题:C# JObject.AddToProperties方法的具体用法?C# JObject.AddToProperties怎么用?C# JObject.AddToProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Newtonsoft.Json.Linq.JObject
的用法示例。
在下文中一共展示了JObject.AddToProperties方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadElement
public IEnumerable<JObject> ReadElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("elevation", JObject.FromObject(element));
//If not a feature return null;
return Enumerable.Empty<JObject>();
}
示例2: ReadExtentElement
public IEnumerable<JObject> ReadExtentElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("geometrySource", "extent");
//set the ElementType of the extent on feature property extentSource, to be used when writing back.
currentObject.AddToProperties("extentSource", element.Elements().First().Name.LocalName);
return converter.ReadElement(currentObject, element.Elements());
}
示例3: ReadSequenceNumberElement
public IEnumerable<JObject> ReadSequenceNumberElement(IAixmConverter converter, JObject currentObject, XElement element)
{
int v;
currentObject.AddToProperties("sequenceNumber", int.TryParse(element.Value, out v) ? (JToken)v:(JToken)element.Value);
return Enumerable.Empty<JObject>();
}
示例4: ReadElement
public IEnumerable<JObject> ReadElement(IAixmConverter converter, JObject currentObject, XElement element)
{
var AixmElement = element.Elements().First();
var feature = new JObject(new JProperty("type","Feature"));
feature.AddToProperties("AixmType", AixmElement.Name.LocalName.ToString());
return converter.ReadElement(feature, AixmElement.Elements());
}
示例5: ReadElement
public IEnumerable<JObject> ReadElement(IAixmConverter converter, JObject currentObject, XElement element)
{
var AixmTimeSlice = element.Elements().First();
currentObject.AddToProperties("AixmTimeSlice", JToken.FromObject(AixmTimeSlice.Attributes().ToDictionary(a=>a.Name,a=>a.Value)));
return converter.ReadElement(currentObject, AixmTimeSlice.Elements());
}
示例6: ReadElement
public IEnumerable<JObject> ReadElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("#type",element.Name.ToString());
currentObject.Add("type", "FeatureCollection");
currentObject.Add("features", converter.ReadElements(currentObject,element.Elements()));
yield return currentObject;
}
示例7: ReadSurfacePropertiesElement
public IEnumerable<JObject> ReadSurfacePropertiesElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("surfaceProperties", JObject.FromObject(element));
return Enumerable.Empty<JObject>();
}
示例8: ReadTypeElement
public IEnumerable<JObject> ReadTypeElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("aixmType", element.Value);
return Enumerable.Empty<JObject>();
}
示例9: ReadInterpretationElement
public IEnumerable<JObject> ReadInterpretationElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("interpretation", element.Value);
return Enumerable.Empty<JObject>();
}
示例10: ReadLowerLimitElement
public IEnumerable<JObject> ReadLowerLimitElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("lowerLimit", JObject.FromObject(element));
return Enumerable.Empty<JObject>();
}
示例11: ReadAvailabilityElement
public IEnumerable<JObject> ReadAvailabilityElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("availability", JObject.FromObject(element));
return Enumerable.Empty<JObject>();
}
示例12: ReadTimeSliceMetadataElement
public IEnumerable<JObject> ReadTimeSliceMetadataElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("timeSliceMetadata", JObject.FromObject(element));
return Enumerable.Empty<JObject>();
}
示例13: ReadCorrectionNumberElement
public IEnumerable<JObject> ReadCorrectionNumberElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("correctionNumber", JObject.FromObject(element));
return Enumerable.Empty<JObject>();
}
示例14: ReadAssociatedApronElement
public IEnumerable<JObject> ReadAssociatedApronElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("associatedApron", JToken.FromObject(element.Attributes().ToDictionary(a => a.Name, a => a.Value)));
return Enumerable.Empty<JObject>();
}
示例15: ReadGeometryComponenentElement
public IEnumerable<JObject> ReadGeometryComponenentElement(IAixmConverter converter, JObject currentObject, XElement element)
{
currentObject.AddToProperties("geometrySource", element.Elements().First().Name.LocalName);
return converter.ReadElement(currentObject, element.Elements());
// currentObject.Add("geometry", JObject.FromObject(element));
return Enumerable.Empty<JObject>();
}