當前位置: 首頁>>代碼示例>>C#>>正文


C# JObject.AddToProperties方法代碼示例

本文整理匯總了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>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:7,代碼來源:AIXMElevationConvtertor.cs

示例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());           
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:9,代碼來源:AIXMGeometriesConverter.cs

示例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>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:7,代碼來源:AIXMFeaturePropertiesConverter.cs

示例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());
 }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:7,代碼來源:MessageHasMemberConverter.cs

示例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());
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:9,代碼來源:AIXMTimeSliceConverter.cs

示例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;
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:9,代碼來源:AIXMBasicMessageConvertor.cs

示例7: ReadSurfacePropertiesElement

        public IEnumerable<JObject> ReadSurfacePropertiesElement(IAixmConverter converter, JObject currentObject, XElement element)
        {
            currentObject.AddToProperties("surfaceProperties", JObject.FromObject(element));

            return Enumerable.Empty<JObject>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:6,代碼來源:AIXMFeaturePropertiesConverter.cs

示例8: ReadTypeElement

        public IEnumerable<JObject> ReadTypeElement(IAixmConverter converter, JObject currentObject, XElement element)
        {
            currentObject.AddToProperties("aixmType", element.Value);

            return Enumerable.Empty<JObject>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:6,代碼來源:AIXMFeaturePropertiesConverter.cs

示例9: ReadInterpretationElement

        public IEnumerable<JObject> ReadInterpretationElement(IAixmConverter converter, JObject currentObject, XElement element)
        {
            currentObject.AddToProperties("interpretation", element.Value);

            return Enumerable.Empty<JObject>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:6,代碼來源:AIXMFeaturePropertiesConverter.cs

示例10: ReadLowerLimitElement

        public IEnumerable<JObject> ReadLowerLimitElement(IAixmConverter converter, JObject currentObject, XElement element)
        {
            currentObject.AddToProperties("lowerLimit", JObject.FromObject(element));

            return Enumerable.Empty<JObject>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:6,代碼來源:AIXMFeaturePropertiesConverter.cs

示例11: ReadAvailabilityElement

        public IEnumerable<JObject> ReadAvailabilityElement(IAixmConverter converter, JObject currentObject, XElement element)
        {
            currentObject.AddToProperties("availability", JObject.FromObject(element));

            return Enumerable.Empty<JObject>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:6,代碼來源:AIXMFeaturePropertiesConverter.cs

示例12: ReadTimeSliceMetadataElement

        public IEnumerable<JObject> ReadTimeSliceMetadataElement(IAixmConverter converter, JObject currentObject, XElement element)
        {
            currentObject.AddToProperties("timeSliceMetadata", JObject.FromObject(element));

            return Enumerable.Empty<JObject>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:6,代碼來源:AIXMFeaturePropertiesConverter.cs

示例13: ReadCorrectionNumberElement

        public IEnumerable<JObject> ReadCorrectionNumberElement(IAixmConverter converter, JObject currentObject, XElement element)
        {
            currentObject.AddToProperties("correctionNumber", JObject.FromObject(element));

            return Enumerable.Empty<JObject>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:6,代碼來源:AIXMFeaturePropertiesConverter.cs

示例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>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:7,代碼來源:AIXMFeaturePropertiesConverter.cs

示例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>();
        }
開發者ID:s-innovations,項目名稱:S-Innovations.Aixm,代碼行數:10,代碼來源:AIXMGeometriesConverter.cs


注:本文中的Newtonsoft.Json.Linq.JObject.AddToProperties方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。