Inheritance: JsonTypeSkeleton, IJsonNumber
Ejemplo n.º 1
0
 /// <summary>
 /// Returns a indicating whether this instance is equal to the specified
 /// JsonNumber.
 /// </summary>
 /// <param name="other">The value to compare.</param>
 /// <returns>True if the specified instance is equal to this instance, otherwise;
 /// false.</returns>
 public bool Equals(JsonNumber other)
 {
     return other != null && this.Value == other.Value;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Determines if the two <see cref="NetServ.Net.Json.JsonNumber"/>s are
        /// equal.
        /// </summary>
        /// <param name="a">The first JsonNumber.</param>
        /// <param name="b">The second JsonNumber.</param>
        /// <returns>True if the JsonNumbers are equal, otherwise; false.</returns>
        public static bool Equals(JsonNumber a, JsonNumber b)
        {
            object ao = a;
            object bo = b;

            if(ao == bo)
                return true;
            if(ao == null || bo == null)
                return false;

            return a.Value == b.Value;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns a value indicating equality with the specified instance.
 /// </summary>
 /// <param name="other">The JsonNumber to compare.</param>
 /// <returns></returns>
 public int CompareTo(JsonNumber other)
 {
     return other != null ? this.Value.CompareTo(other.Value) : -1;
 }
Ejemplo n.º 4
0
 protected void PutValue(string key, JsonNumber value)
 {
     json[key] = value;
 }