コード例 #1
0
            /// <summary>
            /// Loads from json.
            /// </summary>
            /// <param name="jsonProperty">The json property.</param>
            /// <param name="service">The service.</param>
            internal override void LoadFromJson(JsonObject jsonProperty, ExchangeService service)
            {
                base.LoadFromJson(jsonProperty, service);

                JsonObject jsonFieldUriOrConstant = jsonProperty.ReadAsJsonObject(XmlElementNames.FieldURIOrConstant).ReadAsJsonObject(XmlElementNames.Item);

                if (jsonFieldUriOrConstant.ReadTypeString() == XmlElementNames.Constant)
                {
                    this.value = jsonFieldUriOrConstant[XmlElementNames.Value];
                }
                else
                {
                    this.otherPropertyDefinition = PropertyDefinitionBase.TryLoadFromJson(jsonProperty);
                }
            }
コード例 #2
0
 /// <summary>
 /// Loads from json.
 /// </summary>
 /// <param name="jsonProperty">The json property.</param>
 /// <param name="service">The service.</param>
 internal override void LoadFromJson(JsonObject jsonProperty, ExchangeService service)
 {
     this.PropertyDefinition = PropertyDefinitionBase.TryLoadFromJson(jsonProperty.ReadAsJsonObject(XmlElementNames.Item));
 }