Пример #1
0
        /// <summary>
        /// Return a JSON representation of the given GeoLocation.
        /// </summary>
        /// <param name="GeoFence">A geographical location.</param>
        /// <param name="JPropertyKey">The name of the JSON property key to use.</param>
        public static JProperty ToJSON(this GeoFence GeoFence, String JPropertyKey)
        {
            //if (GeoLocation == default(GeoFence))
            //    return null;

            return(new JProperty(JPropertyKey,
                                 GeoFence.ToJSON()));
        }
Пример #2
0
 /// <summary>
 /// Return a JSON representation of the given GeoLocation.
 /// </summary>
 /// <param name="GeoLocation">A geographical location.</param>
 public static JObject ToJSON(this GeoFence?GeoLocation)
 => GeoLocation?.ToJSON();