public override bool Equals(object obj) { ZKId peer = (ZKId)obj; if (peer == null) { return(false); } if (Object.ReferenceEquals(peer, this)) { return(true); } bool ret = false; ret = Scheme.Equals(peer.Scheme); if (!ret) { return(ret); } ret = Id.Equals(peer.Id); if (!ret) { return(ret); } return(ret); }
public void Deserialize(IInputArchive a_, String tag) { a_.StartRecord(tag); Perms = a_.ReadInt("perms"); Id = new ZKId(); a_.ReadRecord(Id, "id"); a_.EndRecord(tag); }
public ACL( int perms , ZKId id ) { Perms = perms; Id = id; }
public int CompareTo(object obj) { ZKId peer = (ZKId)obj; if (peer == null) { throw new InvalidOperationException("Comparing different types of records."); } int ret = 0; ret = Scheme.CompareTo(peer.Scheme); if (ret != 0) { return(ret); } ret = Id.CompareTo(peer.Id); if (ret != 0) { return(ret); } return(ret); }
public void Deserialize(IInputArchive a_, String tag) { a_.StartRecord(tag); Type = a_.ReadInt("type"); Zxid = a_.ReadLong("zxid"); Data = a_.ReadBuffer("data"); { IIndex vidx1 = a_.StartVector("authinfo"); if (vidx1 != null) { var tmpLst = new System.Collections.Generic.List <ZKId>(); for (; !vidx1.Done(); vidx1.Incr()) { ZKId e1; e1 = new ZKId(); a_.ReadRecord(e1, "e1"); tmpLst.Add(e1); } Authinfo = tmpLst; } a_.EndVector("authinfo"); } a_.EndRecord(tag); }