public override object Add(object prefix, object output) { if (Debugging.AssertsEnabled) { Debugging.Assert(Valid(prefix, false)); } if (Debugging.AssertsEnabled) { Debugging.Assert(Valid(output, true)); } long?prefix2 = (long?)prefix; if (output is long?) { long?output2 = (long?)output; if (prefix2 == NO_OUTPUT) { return(output2); } else if (output2 == NO_OUTPUT) { return(prefix2); } else { return(prefix2 + output2); } } else { TwoInt64s output3 = (TwoInt64s)output; long v = prefix2.Value; return(new TwoInt64s(output3.First + v, output3.Second + v)); } }
public override object Add(object prefix, object output) { if (Debugging.AssertsEnabled) { Debugging.Assert(Valid(prefix, false)); } if (Debugging.AssertsEnabled) { Debugging.Assert(Valid(output, true)); } Int64 prefix2 = (Int64)prefix; if (output is Int64 output2) { if (prefix2 == NO_OUTPUT) { return(output2); } else if (output2 == NO_OUTPUT) { return(prefix2); } else { return(Int64.GetInstance(prefix2 + output2)); } } else { TwoInt64s output3 = (TwoInt64s)output; long v = prefix2; return(new TwoInt64s(output3.First + v, output3.Second + v)); } }
public override bool Equals(object other) { if (other is TwoInt64s) { TwoInt64s other2 = (TwoInt64s)other; return(first == other2.first && second == other2.second); } else { return(false); } }
public override void Write(object output, DataOutput @out) { Debug.Assert(Valid(output, true)); if (output is long?) { long?output2 = (long?)output; @out.WriteVInt64(output2.GetValueOrDefault() << 1); } else { TwoInt64s output3 = (TwoInt64s)output; @out.WriteVInt64((output3.First << 1) | 1); @out.WriteVInt64(output3.Second); } }
public override void Write(object output, DataOutput @out) { if (Debugging.AssertsEnabled) { Debugging.Assert(Valid(output, true)); } if (output is Int64 output2) { @out.WriteVInt64(output2 << 1); } else { TwoInt64s output3 = (TwoInt64s)output; @out.WriteVInt64((output3.First << 1) | 1); @out.WriteVInt64(output3.Second); } }