Пример #1
0
 public Entry(
     [JsonProperty("tuple1")] Tuple1 tuple1,
     [JsonProperty("tuple2")] Tuple2 tuple2
     )
 {
     this.tuple1 = tuple1;
     this.tuple2 = tuple2;
 }
Пример #2
0
            public override void WriteJson(JsonWriter writer, Object obj, JsonSerializer serializer)
            {
                Tuple1 o     = (Tuple1)obj;
                JArray array = new JArray();

                array.Add(JToken.FromObject(o.a, serializer));
                array.Add(JToken.FromObject(o.b, serializer));
                array.WriteTo(writer);
            }
Пример #3
0
        public override Boolean Equals(Object other)
        {
            Tuple1 o = other as Tuple1;

            if (o == null)
            {
                return(false);
            }

            if (!this.a.Equals(o.a))
            {
                return(false);
            }

            if (this.b != o.b)
            {
                return(false);
            }

            return(true);
        }