Пример #1
0
        /// <summary>
        /// Return a JSON representation for the given roaming networks collection.
        /// </summary>
        /// <param name="RoamingNetworks">An enumeration of roaming networks.</param>
        /// <param name="Skip">The optional number of roaming networks to skip.</param>
        /// <param name="Take">The optional number of roaming networks to return.</param>
        public static JArray ToJSON(this RoamingNetworks RoamingNetworks,
                                    UInt64?Skip = null,
                                    UInt64?Take = null)

        => RoamingNetworks != null && RoamingNetworks.Any()
                    ? new JArray(RoamingNetworks.AsEnumerable().ToJSON(Skip, Take))
                    : new JArray();
Пример #2
0
        /// <summary>
        /// Return a JSON representation for the given roaming networks collection
        /// using the given JSON property key.
        /// </summary>
        /// <param name="RoamingNetworks">An enumeration of roaming networks.</param>
        /// <param name="JPropertyKey">The name of the JSON property key to use.</param>
        /// <param name="Skip">The optional number of roaming networks to skip.</param>
        /// <param name="Take">The optional number of roaming networks to return.</param>
        public static JProperty ToJSON(this RoamingNetworks RoamingNetworks,
                                       String JPropertyKey,
                                       UInt64?Skip = null,
                                       UInt64?Take = null)

        => RoamingNetworks != null && RoamingNetworks.Any()
                    ? new JProperty(JPropertyKey, RoamingNetworks.AsEnumerable().ToJSON(Skip, Take))
                    : null;