Esempio n. 1
0
 public override String ToString()
 {
     try
     {
         System.IO.MemoryStream ms = new System.IO.MemoryStream();
         using (ZooKeeperNet.IO.EndianBinaryWriter writer =
                    new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8))
         {
             BinaryOutputArchive a_ =
                 new BinaryOutputArchive(writer);
             a_.StartRecord(this, string.Empty);
             a_.WriteInt(Magic, "magic");
             a_.WriteInt(Version, "version");
             a_.WriteLong(Dbid, "dbid");
             a_.EndRecord(this, string.Empty);
             ms.Position = 0;
             return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
     return("ERROR");
 }
Esempio n. 2
0
 public override string ToString()
 {
     try
     {
         MemoryStream memoryStream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter((EndianBitConverter)EndianBitConverter.Big, (Stream)memoryStream, Encoding.UTF8))
         {
             BinaryOutputArchive binaryOutputArchive = new BinaryOutputArchive(writer);
             binaryOutputArchive.StartRecord((IRecord)this, string.Empty);
             binaryOutputArchive.StartVector <string>(this.Children, "children");
             if (this.Children != null)
             {
                 foreach (string child in this.Children)
                 {
                     binaryOutputArchive.WriteString(child, child);
                 }
             }
             binaryOutputArchive.EndVector <string>(this.Children, "children");
             binaryOutputArchive.WriteRecord((IRecord)this.Stat, "stat");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         GetChildren2Response.log.Error((object)ex);
     }
     return("ERROR");
 }
Esempio n. 3
0
 public override String ToString()
 {
     try {
         System.IO.MemoryStream ms = new System.IO.MemoryStream();
         using (ZooKeeperNet.IO.EndianBinaryWriter writer =
                    new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
             BinaryOutputArchive a_ =
                 new BinaryOutputArchive(writer);
             a_.StartRecord(this, string.Empty);
             a_.WriteLong(Czxid, "czxid");
             a_.WriteLong(Mzxid, "mzxid");
             a_.WriteLong(Ctime, "ctime");
             a_.WriteLong(Mtime, "mtime");
             a_.WriteInt(Version, "version");
             a_.WriteInt(Cversion, "cversion");
             a_.WriteInt(Aversion, "aversion");
             a_.WriteLong(EphemeralOwner, "ephemeralOwner");
             a_.WriteLong(Pzxid, "pzxid");
             a_.EndRecord(this, string.Empty);
             ms.Position = 0;
             return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
         }
     } catch (Exception ex) {
         log.Error(ex);
     }
     return("ERROR");
 }
Esempio n. 4
0
 public override String ToString()
 {
     try
     {
         System.IO.MemoryStream ms = new System.IO.MemoryStream();
         using (Newegg.EC.Zookeeper.Client.Core.IO.EndianBinaryWriter writer =
                    new Newegg.EC.Zookeeper.Client.Core.IO.EndianBinaryWriter(Newegg.EC.Zookeeper.Client.Core.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8))
         {
             BinaryOutputArchive a_ =
                 new BinaryOutputArchive(writer);
             a_.StartRecord(this, string.Empty);
             {
                 a_.StartVector(Txns, "txns");
                 if (Txns != null)
                 {
                     foreach (var e1 in Txns)
                     {
                         a_.WriteRecord(e1, "e1");
                     }
                 }
                 a_.EndVector(Txns, "txns");
             }
             a_.EndRecord(this, string.Empty);
             ms.Position = 0;
             return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
     return("ERROR");
 }
Esempio n. 5
0
 public override String ToString()
 {
     try
     {
         System.IO.MemoryStream ms = new System.IO.MemoryStream();
         using (IkZooKeeperNet.IO.EndianBinaryWriter writer =
                    new IkZooKeeperNet.IO.EndianBinaryWriter(IkZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8))
         {
             BinaryOutputArchive a_ =
                 new BinaryOutputArchive(writer);
             a_.StartRecord(this, string.Empty);
             a_.WriteInt(Type, "type");
             a_.WriteBool(Done, "done");
             a_.WriteInt(Err, "err");
             a_.EndRecord(this, string.Empty);
             ms.Position = 0;
             return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
     return("ERROR");
 }
Esempio n. 6
0
 public override string ToString()
 {
     try
     {
         MemoryStream stream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Big, stream, Encoding.UTF8))
         {
             BinaryOutputArchive archive = new BinaryOutputArchive(writer);
             archive.StartRecord(this, string.Empty);
             archive.WriteInt(this.Type, "type");
             archive.WriteLong(this.Zxid, "zxid");
             archive.WriteBuffer(this.Data, "data");
             archive.StartVector <ZKId>(this.Authinfo, "authinfo");
             if (this.Authinfo != null)
             {
                 foreach (ZKId id in this.Authinfo)
                 {
                     archive.WriteRecord(id, "e1");
                 }
             }
             archive.EndVector <ZKId>(this.Authinfo, "authinfo");
             archive.EndRecord(this, string.Empty);
             stream.Position = 0L;
             return(Encoding.UTF8.GetString(stream.ToArray()));
         }
     }
     catch (Exception exception)
     {
         log.Error(exception);
     }
     return("ERROR");
 }
Esempio n. 7
0
 public override string ToString()
 {
     try
     {
         MemoryStream memoryStream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter((EndianBitConverter)EndianBitConverter.Big, (Stream)memoryStream, Encoding.UTF8))
         {
             BinaryOutputArchive binaryOutputArchive = new BinaryOutputArchive(writer);
             binaryOutputArchive.StartRecord((IRecord)this, string.Empty);
             binaryOutputArchive.StartVector <Org.Apache.Zookeeper.Txn.Txn>(this.Txns, "txns");
             if (this.Txns != null)
             {
                 foreach (Org.Apache.Zookeeper.Txn.Txn txn in this.Txns)
                 {
                     binaryOutputArchive.WriteRecord((IRecord)txn, "e1");
                 }
             }
             binaryOutputArchive.EndVector <Org.Apache.Zookeeper.Txn.Txn>(this.Txns, "txns");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         MultiTxn.log.Error((object)ex);
     }
     return("ERROR");
 }
Esempio n. 8
0
        public override String ToString()
        {
            try
            {
                System.IO.MemoryStream ms = new System.IO.MemoryStream();
                using (ZooKeeperNet.IO.EndianBinaryWriter writer =
                           new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8))
                {
                    BinaryOutputArchive a_ =
                        new BinaryOutputArchive(writer);
                    a_.StartRecord(this, string.Empty);
#warning code here
                    //a_.WriteBuffer(Remark, "remark");
                    a_.WriteBuffer(Remark, "data");
                    a_.WriteRecord(Stat, "stat");
                    a_.EndRecord(this, string.Empty);
                    ms.Position = 0;
                    return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
            }
            return("ERROR");
        }
Esempio n. 9
0
   public override String ToString()
   {
       try {
           System.IO.MemoryStream ms = new System.IO.MemoryStream();
           using (ZooKeeperNet.IO.EndianBinaryWriter writer =
                      new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
               BinaryOutputArchive a_ =
                   new BinaryOutputArchive(writer);
               a_.StartRecord(this, string.Empty);
               a_.WriteString(Path, "path");
               a_.WriteBuffer(Data, "data");
               {
                   a_.StartVector(Acl, "acl");
                   if (Acl != null)
                   {
                       foreach (var e1 in Acl)
                       {
                           a_.WriteRecord(e1, "e1");
                       }
                   }
                   a_.EndVector(Acl, "acl");
               }
               a_.WriteBool(Ephemeral, "ephemeral");
               a_.WriteInt(ParentCVersion, "parentCVersion");
               a_.EndRecord(this, string.Empty);
               ms.Position = 0;
               return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
           }
       } catch (Exception ex) {
   #if !NET_CORE
           log.Error(ex);
 #endif
       }
       return("ERROR");
   }
Esempio n. 10
0
 public override String ToString()
 {
     try
     {
         System.IO.MemoryStream ms = new System.IO.MemoryStream();
         using (Newegg.EC.Zookeeper.Client.Core.IO.EndianBinaryWriter writer =
                    new Newegg.EC.Zookeeper.Client.Core.IO.EndianBinaryWriter(Newegg.EC.Zookeeper.Client.Core.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8))
         {
             BinaryOutputArchive a_ =
                 new BinaryOutputArchive(writer);
             a_.StartRecord(this, string.Empty);
             a_.WriteString(Path, "path");
             a_.WriteBuffer(Data, "data");
             a_.WriteInt(Version, "version");
             a_.EndRecord(this, string.Empty);
             ms.Position = 0;
             return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
     return("ERROR");
 }
Esempio n. 11
0
 public override String ToString()
 {
     try {
         System.IO.MemoryStream ms = new System.IO.MemoryStream();
         using (ZooKeeperNet.IO.EndianBinaryWriter writer =
                    new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
             BinaryOutputArchive a_ =
                 new BinaryOutputArchive(writer);
             a_.StartRecord(this, string.Empty);
             {
                 a_.StartVector(Acl, "acl");
                 if (Acl != null)
                 {
                     foreach (var e1 in Acl)
                     {
                         a_.WriteRecord(e1, "e1");
                     }
                 }
                 a_.EndVector(Acl, "acl");
             }
             a_.WriteRecord(Stat, "stat");
             a_.EndRecord(this, string.Empty);
             ms.Position = 0;
             return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
         }
     } catch (Exception ex) {
         log.Error(ex);
     }
     return("ERROR");
 }
Esempio n. 12
0
 public override string ToString()
 {
     try
     {
         MemoryStream memoryStream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter((EndianBitConverter)EndianBitConverter.Big, (Stream)memoryStream, Encoding.UTF8))
         {
             BinaryOutputArchive binaryOutputArchive = new BinaryOutputArchive(writer);
             binaryOutputArchive.StartRecord((IRecord)this, string.Empty);
             binaryOutputArchive.WriteLong(this.Czxid, "czxid");
             binaryOutputArchive.WriteLong(this.Mzxid, "mzxid");
             binaryOutputArchive.WriteLong(this.Ctime, "ctime");
             binaryOutputArchive.WriteLong(this.Mtime, "mtime");
             binaryOutputArchive.WriteInt(this.Version, "version");
             binaryOutputArchive.WriteInt(this.Cversion, "cversion");
             binaryOutputArchive.WriteInt(this.Aversion, "aversion");
             binaryOutputArchive.WriteLong(this.EphemeralOwner, "ephemeralOwner");
             binaryOutputArchive.WriteInt(this.DataLength, "dataLength");
             binaryOutputArchive.WriteInt(this.NumChildren, "numChildren");
             binaryOutputArchive.WriteLong(this.Pzxid, "pzxid");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         Stat.log.Error((object)ex);
     }
     return("ERROR");
 }
Esempio n. 13
0
 public override string ToString()
 {
     try
     {
         MemoryStream stream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Big, stream, Encoding.UTF8))
         {
             BinaryOutputArchive archive = new BinaryOutputArchive(writer);
             archive.StartRecord(this, string.Empty);
             archive.WriteLong(this.Czxid, "czxid");
             archive.WriteLong(this.Mzxid, "mzxid");
             archive.WriteLong(this.Ctime, "ctime");
             archive.WriteLong(this.Mtime, "mtime");
             archive.WriteInt(this.Version, "version");
             archive.WriteInt(this.Cversion, "cversion");
             archive.WriteInt(this.Aversion, "aversion");
             archive.WriteLong(this.EphemeralOwner, "ephemeralOwner");
             archive.EndRecord(this, string.Empty);
             stream.Position = 0L;
             return(Encoding.UTF8.GetString(stream.ToArray()));
         }
     }
     catch (Exception exception)
     {
         log.Error(exception);
     }
     return("ERROR");
 }
Esempio n. 14
0
 public override string ToString()
 {
     try
     {
         MemoryStream memoryStream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter((EndianBitConverter)EndianBitConverter.Big, (Stream)memoryStream, Encoding.UTF8))
         {
             BinaryOutputArchive binaryOutputArchive = new BinaryOutputArchive(writer);
             binaryOutputArchive.StartRecord((IRecord)this, string.Empty);
             binaryOutputArchive.WriteString(this.Path, "path");
             binaryOutputArchive.StartVector <ACL>(this.Acl, "acl");
             if (this.Acl != null)
             {
                 foreach (ACL acl in this.Acl)
                 {
                     binaryOutputArchive.WriteRecord((IRecord)acl, "e1");
                 }
             }
             binaryOutputArchive.EndVector <ACL>(this.Acl, "acl");
             binaryOutputArchive.WriteInt(this.Version, "version");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         SetACLRequest.log.Error((object)ex);
     }
     return("ERROR");
 }
Esempio n. 15
0
 public override string ToString()
 {
     try
     {
         MemoryStream stream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Big, stream, Encoding.UTF8))
         {
             BinaryOutputArchive archive = new BinaryOutputArchive(writer);
             archive.StartRecord(this, string.Empty);
             archive.WriteString(this.Path, "path");
             archive.WriteBuffer(this.Data, "data");
             archive.StartVector <ACL>(this.Acl, "acl");
             if (this.Acl != null)
             {
                 foreach (ACL acl in this.Acl)
                 {
                     archive.WriteRecord(acl, "e1");
                 }
             }
             archive.EndVector <ACL>(this.Acl, "acl");
             archive.WriteInt(this.Flags, "flags");
             archive.EndRecord(this, string.Empty);
             stream.Position = 0L;
             return(Encoding.UTF8.GetString(stream.ToArray()));
         }
     }
     catch (Exception exception)
     {
         log.Error(exception);
     }
     return("ERROR");
 }
Esempio n. 16
0
 public override string ToString()
 {
     try
     {
         MemoryStream stream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Big, stream, Encoding.UTF8))
         {
             BinaryOutputArchive archive = new BinaryOutputArchive(writer);
             archive.StartRecord(this, string.Empty);
             archive.StartVector <string>(this.Children, "children");
             if (this.Children != null)
             {
                 foreach (string str in this.Children)
                 {
                     archive.WriteString(str, str);
                 }
             }
             archive.EndVector <string>(this.Children, "children");
             archive.WriteRecord(this.Stat, "stat");
             archive.EndRecord(this, string.Empty);
             stream.Position = 0L;
             return(Encoding.UTF8.GetString(stream.ToArray()));
         }
     }
     catch (Exception exception)
     {
         log.Error(exception);
     }
     return("ERROR");
 }
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     try
     {
         System.IO.MemoryStream ms = new System.IO.MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Big, ms, System.Text.Encoding.UTF8))
         {
             BinaryOutputArchive a_ = new BinaryOutputArchive(writer);
             a_.StartRecord(this, string.Empty);
             {
                 a_.StartVector(Children, "children");
                 if (Children != null)
                 {
                     foreach (var e1 in Children)
                     {
                         a_.WriteString(e1, e1);
                     }
                 }
                 a_.EndVector(Children, "children");
             }
             a_.EndRecord(this, string.Empty);
             ms.Position = 0;
             return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
     return("ERROR");
 }
Esempio n. 18
0
   public override String ToString()
   {
       try {
           System.IO.MemoryStream ms = new System.IO.MemoryStream();
           using (ZooKeeperNet.IO.EndianBinaryWriter writer =
                      new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
               BinaryOutputArchive a_ =
                   new BinaryOutputArchive(writer);
               a_.StartRecord(this, string.Empty);
               a_.WriteLong(ClientId, "clientId");
               a_.WriteInt(Cxid, "cxid");
               a_.WriteLong(Zxid, "zxid");
               a_.WriteLong(Time, "time");
               a_.WriteInt(Type, "type");
               a_.EndRecord(this, string.Empty);
               ms.Position = 0;
               return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
           }
       } catch (Exception ex) {
   #if !NET_CORE
           log.Error(ex);
 #endif
       }
       return("ERROR");
   }
Esempio n. 19
0
 public override string ToString()
 {
     try
     {
         MemoryStream stream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Big, stream, Encoding.UTF8))
         {
             BinaryOutputArchive archive = new BinaryOutputArchive(writer);
             archive.StartRecord(this, string.Empty);
             archive.StartVector <Org.Apache.Zookeeper.Txn.Txn>(this.Txns, "txns");
             if (this.Txns != null)
             {
                 foreach (Org.Apache.Zookeeper.Txn.Txn txn in this.Txns)
                 {
                     archive.WriteRecord(txn, "e1");
                 }
             }
             archive.EndVector <Org.Apache.Zookeeper.Txn.Txn>(this.Txns, "txns");
             archive.EndRecord(this, string.Empty);
             stream.Position = 0L;
             return(Encoding.UTF8.GetString(stream.ToArray()));
         }
     }
     catch (Exception exception)
     {
         log.Error(exception);
     }
     return("ERROR");
 }
Esempio n. 20
0
 public override string ToString()
 {
     try
     {
         MemoryStream memoryStream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter((EndianBitConverter)EndianBitConverter.Big, (Stream)memoryStream, Encoding.UTF8))
         {
             BinaryOutputArchive binaryOutputArchive = new BinaryOutputArchive(writer);
             binaryOutputArchive.StartRecord((IRecord)this, string.Empty);
             binaryOutputArchive.WriteInt(this.Type, "type");
             binaryOutputArchive.WriteLong(this.Zxid, "zxid");
             binaryOutputArchive.WriteBuffer(this.Data, "data");
             binaryOutputArchive.StartVector <ZKId>(this.Authinfo, "authinfo");
             if (this.Authinfo != null)
             {
                 foreach (ZKId zkId in this.Authinfo)
                 {
                     binaryOutputArchive.WriteRecord((IRecord)zkId, "e1");
                 }
             }
             binaryOutputArchive.EndVector <ZKId>(this.Authinfo, "authinfo");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         QuorumPacket.log.Error((object)ex);
     }
     return("ERROR");
 }
Esempio n. 21
0
   public override String ToString()
   {
       try {
           System.IO.MemoryStream ms = new System.IO.MemoryStream();
           using (ZooKeeperNet.IO.EndianBinaryWriter writer =
                      new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
               BinaryOutputArchive a_ =
                   new BinaryOutputArchive(writer);
               a_.StartRecord(this, string.Empty);
               a_.WriteInt(ProtocolVersion, "protocolVersion");
               a_.WriteLong(LastZxidSeen, "lastZxidSeen");
               a_.WriteInt(TimeOut, "timeOut");
               a_.WriteLong(SessionId, "sessionId");
               a_.WriteBuffer(Passwd, "passwd");
               a_.EndRecord(this, string.Empty);
               ms.Position = 0;
               return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
           }
       } catch (Exception ex) {
   #if !NET_CORE
           log.Error(ex);
 #endif
       }
       return("ERROR");
   }
Esempio n. 22
0
   public override String ToString()
   {
       try {
           System.IO.MemoryStream ms = new System.IO.MemoryStream();
           using (ZooKeeperNet.IO.EndianBinaryWriter writer =
                      new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
               BinaryOutputArchive a_ =
                   new BinaryOutputArchive(writer);
               a_.StartRecord(this, string.Empty);
               a_.WriteInt(Type, "type");
               a_.WriteLong(Zxid, "zxid");
               a_.WriteBuffer(Data, "data");
               {
                   a_.StartVector(Authinfo, "authinfo");
                   if (Authinfo != null)
                   {
                       foreach (var e1 in Authinfo)
                       {
                           a_.WriteRecord(e1, "e1");
                       }
                   }
                   a_.EndVector(Authinfo, "authinfo");
               }
               a_.EndRecord(this, string.Empty);
               ms.Position = 0;
               return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
           }
       } catch (Exception ex) {
   #if !NET_CORE
           log.Error(ex);
 #endif
       }
       return("ERROR");
   }
Esempio n. 23
0
 public override string ToString()
 {
     try
     {
         MemoryStream memoryStream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter((EndianBitConverter)EndianBitConverter.Big, (Stream)memoryStream, Encoding.UTF8))
         {
             BinaryOutputArchive binaryOutputArchive = new BinaryOutputArchive(writer);
             binaryOutputArchive.StartRecord((IRecord)this, string.Empty);
             binaryOutputArchive.WriteLong(this.ClientId, "clientId");
             binaryOutputArchive.WriteInt(this.Cxid, "cxid");
             binaryOutputArchive.WriteLong(this.Zxid, "zxid");
             binaryOutputArchive.WriteLong(this.Time, "time");
             binaryOutputArchive.WriteInt(this.Type, "type");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         TxnHeader.log.Error((object)ex);
     }
     return("ERROR");
 }
Esempio n. 24
0
 public override string ToString()
 {
     try
     {
         MemoryStream stream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Big, stream, Encoding.UTF8))
         {
             BinaryOutputArchive archive = new BinaryOutputArchive(writer);
             archive.StartRecord(this, string.Empty);
             archive.WriteInt(this.ProtocolVersion, "protocolVersion");
             archive.WriteLong(this.LastZxidSeen, "lastZxidSeen");
             archive.WriteInt(this.TimeOut, "timeOut");
             archive.WriteLong(this.SessionId, "sessionId");
             archive.WriteBuffer(this.Passwd, "passwd");
             archive.EndRecord(this, string.Empty);
             stream.Position = 0L;
             return(Encoding.UTF8.GetString(stream.ToArray()));
         }
     }
     catch (Exception exception)
     {
         log.Error(exception);
     }
     return("ERROR");
 }
Esempio n. 25
0
 public override String ToString()
 {
     try
     {
         System.IO.MemoryStream ms = new System.IO.MemoryStream();
         using (Newegg.EC.Zookeeper.Client.Core.IO.EndianBinaryWriter writer =
                    new Newegg.EC.Zookeeper.Client.Core.IO.EndianBinaryWriter(Newegg.EC.Zookeeper.Client.Core.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8))
         {
             BinaryOutputArchive a_ =
                 new BinaryOutputArchive(writer);
             a_.StartRecord(this, string.Empty);
             a_.WriteLong(RelativeZxid, "relativeZxid");
             {
                 a_.StartVector(DataWatches, "dataWatches");
                 if (DataWatches != null)
                 {
                     foreach (var e1 in DataWatches)
                     {
                         a_.WriteString(e1, e1);
                     }
                 }
                 a_.EndVector(DataWatches, "dataWatches");
             }
             {
                 a_.StartVector(ExistWatches, "existWatches");
                 if (ExistWatches != null)
                 {
                     foreach (var e1 in ExistWatches)
                     {
                         a_.WriteString(e1, e1);
                     }
                 }
                 a_.EndVector(ExistWatches, "existWatches");
             }
             {
                 a_.StartVector(ChildWatches, "childWatches");
                 if (ChildWatches != null)
                 {
                     foreach (var e1 in ChildWatches)
                     {
                         a_.WriteString(e1, e1);
                     }
                 }
                 a_.EndVector(ChildWatches, "childWatches");
             }
             a_.EndRecord(this, string.Empty);
             ms.Position = 0;
             return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
     return("ERROR");
 }
Esempio n. 26
0
 public override string ToString()
 {
     try
     {
         MemoryStream memoryStream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter((EndianBitConverter)EndianBitConverter.Big, (Stream)memoryStream, Encoding.UTF8))
         {
             BinaryOutputArchive binaryOutputArchive = new BinaryOutputArchive(writer);
             binaryOutputArchive.StartRecord((IRecord)this, string.Empty);
             binaryOutputArchive.WriteLong(this.RelativeZxid, "relativeZxid");
             binaryOutputArchive.StartVector <string>(this.DataWatches, "dataWatches");
             if (this.DataWatches != null)
             {
                 foreach (string dataWatch in this.DataWatches)
                 {
                     binaryOutputArchive.WriteString(dataWatch, dataWatch);
                 }
             }
             binaryOutputArchive.EndVector <string>(this.DataWatches, "dataWatches");
             binaryOutputArchive.StartVector <string>(this.ExistWatches, "existWatches");
             if (this.ExistWatches != null)
             {
                 foreach (string existWatch in this.ExistWatches)
                 {
                     binaryOutputArchive.WriteString(existWatch, existWatch);
                 }
             }
             binaryOutputArchive.EndVector <string>(this.ExistWatches, "existWatches");
             binaryOutputArchive.StartVector <string>(this.ChildWatches, "childWatches");
             if (this.ChildWatches != null)
             {
                 foreach (string childWatch in this.ChildWatches)
                 {
                     binaryOutputArchive.WriteString(childWatch, childWatch);
                 }
             }
             binaryOutputArchive.EndVector <string>(this.ChildWatches, "childWatches");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         SetWatches.log.Error((object)ex);
     }
     return("ERROR");
 }
Esempio n. 27
0
 public override string ToString()
 {
     try
     {
         MemoryStream stream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Big, stream, Encoding.UTF8))
         {
             BinaryOutputArchive archive = new BinaryOutputArchive(writer);
             archive.StartRecord(this, string.Empty);
             archive.WriteLong(this.RelativeZxid, "relativeZxid");
             archive.StartVector <string>(this.DataWatches, "dataWatches");
             if (this.DataWatches != null)
             {
                 foreach (string str in this.DataWatches)
                 {
                     archive.WriteString(str, str);
                 }
             }
             archive.EndVector <string>(this.DataWatches, "dataWatches");
             archive.StartVector <string>(this.ExistWatches, "existWatches");
             if (this.ExistWatches != null)
             {
                 foreach (string str2 in this.ExistWatches)
                 {
                     archive.WriteString(str2, str2);
                 }
             }
             archive.EndVector <string>(this.ExistWatches, "existWatches");
             archive.StartVector <string>(this.ChildWatches, "childWatches");
             if (this.ChildWatches != null)
             {
                 foreach (string str3 in this.ChildWatches)
                 {
                     archive.WriteString(str3, str3);
                 }
             }
             archive.EndVector <string>(this.ChildWatches, "childWatches");
             archive.EndRecord(this, string.Empty);
             stream.Position = 0L;
             return(Encoding.UTF8.GetString(stream.ToArray()));
         }
     }
     catch (Exception exception)
     {
         log.Error(exception);
     }
     return("ERROR");
 }
Esempio n. 28
0
 public override String ToString() {
   try {
     System.IO.MemoryStream ms = new System.IO.MemoryStream();
     using(ZooKeeperNet.IO.EndianBinaryWriter writer =
       new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
     BinaryOutputArchive a_ = 
       new BinaryOutputArchive(writer);
     a_.StartRecord(this,string.Empty);
   a_.WriteBuffer(Token,"token");
     a_.EndRecord(this,string.Empty);
     ms.Position = 0;
     return System.Text.Encoding.UTF8.GetString(ms.ToArray());
   }    } catch (Exception ex) {
     log.Error(ex);
   }
   return "ERROR";
 }
Esempio n. 29
0
 public override String ToString()
 {
     try {
         System.IO.MemoryStream ms = new System.IO.MemoryStream();
         IkZooKeeperNet.IO.EndianBinaryWriter writer =
             new IkZooKeeperNet.IO.EndianBinaryWriter(IkZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8);
         BinaryOutputArchive a_ =
             new BinaryOutputArchive(writer);
         a_.StartRecord(this, "");
         a_.WriteInt(Rc, "rc");
         a_.WriteInt(Op, "op");
         a_.WriteBuffer(Response, "response");
         a_.EndRecord(this, "");
         ms.Position = 0;
         return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
     } catch (Exception ex) {
         Console.WriteLine(ex.StackTrace);
     }
     return("ERROR");
 }
Esempio n. 30
0
 public override String ToString() {
   try {
     System.IO.MemoryStream ms = new System.IO.MemoryStream();
     using(ZooKeeperNet.IO.EndianBinaryWriter writer =
       new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
     BinaryOutputArchive a_ = 
       new BinaryOutputArchive(writer);
     a_.StartRecord(this,string.Empty);
   a_.WriteInt(ProtocolVersion,"protocolVersion");
   a_.WriteLong(LastZxidSeen,"lastZxidSeen");
   a_.WriteInt(TimeOut,"timeOut");
   a_.WriteLong(SessionId,"sessionId");
   a_.WriteBuffer(Passwd,"passwd");
     a_.EndRecord(this,string.Empty);
     ms.Position = 0;
     return System.Text.Encoding.UTF8.GetString(ms.ToArray());
   }    } catch (Exception ex) {
     log.Error(ex);
   }
   return "ERROR";
 }
Esempio n. 31
0
 public override string ToString()
 {
     try
     {
         MemoryStream memoryStream = new MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter((EndianBitConverter)EndianBitConverter.Big, (Stream)memoryStream, Encoding.UTF8))
         {
             BinaryOutputArchive binaryOutputArchive = new BinaryOutputArchive(writer);
             binaryOutputArchive.StartRecord((IRecord)this, string.Empty);
             binaryOutputArchive.WriteString(this.Path, "path");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         GetACLRequest.log.Error((object)ex);
     }
     return("ERROR");
 }
Esempio n. 32
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     try
     {
         System.IO.MemoryStream ms = new System.IO.MemoryStream();
         using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Big, ms, System.Text.Encoding.UTF8))
         {
             BinaryOutputArchive a_ = new BinaryOutputArchive(writer);
             a_.StartRecord(this, string.Empty);
             a_.WriteString(Path, "path");
             a_.EndRecord(this, string.Empty);
             ms.Position = 0;
             return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
     return("ERROR");
 }
Esempio n. 33
0
 public override String ToString() {
   try {
     System.IO.MemoryStream ms = new System.IO.MemoryStream();
     using(ZooKeeperNet.IO.EndianBinaryWriter writer =
       new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
     BinaryOutputArchive a_ = 
       new BinaryOutputArchive(writer);
     a_.StartRecord(this,string.Empty);
   {
     a_.StartVector(Children,"children");
     if (Children!= null) {          foreach(var e1 in Children) {
       a_.WriteString(e1,e1);
         }
     }
     a_.EndVector(Children,"children");
   }
     a_.EndRecord(this,string.Empty);
     ms.Position = 0;
     return System.Text.Encoding.UTF8.GetString(ms.ToArray());
   }    } catch (Exception ex) {
     log.Error(ex);
   }
   return "ERROR";
 }
Esempio n. 34
0
 public override String ToString() {
   try {
     System.IO.MemoryStream ms = new System.IO.MemoryStream();
     using(ZooKeeperNet.IO.EndianBinaryWriter writer =
       new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
     BinaryOutputArchive a_ = 
       new BinaryOutputArchive(writer);
     a_.StartRecord(this,string.Empty);
   a_.WriteLong(Czxid,"czxid");
   a_.WriteLong(Mzxid,"mzxid");
   a_.WriteLong(Ctime,"ctime");
   a_.WriteLong(Mtime,"mtime");
   a_.WriteInt(Version,"version");
   a_.WriteInt(Cversion,"cversion");
   a_.WriteInt(Aversion,"aversion");
   a_.WriteLong(EphemeralOwner,"ephemeralOwner");
   a_.WriteInt(DataLength,"dataLength");
   a_.WriteInt(NumChildren,"numChildren");
   a_.WriteLong(Pzxid,"pzxid");
     a_.EndRecord(this,string.Empty);
     ms.Position = 0;
     return System.Text.Encoding.UTF8.GetString(ms.ToArray());
   }    } catch (Exception ex) {
     log.Error(ex);
   }
   return "ERROR";
 }
Esempio n. 35
0
 public override String ToString()
 {
     try {
       System.IO.MemoryStream ms = new System.IO.MemoryStream();
       using(ZooKeeperNet.IO.EndianBinaryWriter writer =
     new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
       BinaryOutputArchive a_ =
     new BinaryOutputArchive(writer);
       a_.StartRecord(this,string.Empty);
     a_.WriteInt(Magic,"magic");
     a_.WriteInt(Version,"version");
     a_.WriteLong(Dbid,"dbid");
       a_.EndRecord(this,string.Empty);
       ms.Position = 0;
       return System.Text.Encoding.UTF8.GetString(ms.ToArray());
     }    } catch (Exception ex) {
     #if !NET_CORE
       log.Error(ex);
       #endif
     }
     return "ERROR";
 }
Esempio n. 36
0
 public override String ToString() {
   try {
     System.IO.MemoryStream ms = new System.IO.MemoryStream();
     using(ZooKeeperNet.IO.EndianBinaryWriter writer =
       new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
     BinaryOutputArchive a_ = 
       new BinaryOutputArchive(writer);
     a_.StartRecord(this,string.Empty);
   a_.WriteInt(Type,"type");
   a_.WriteLong(Zxid,"zxid");
   a_.WriteBuffer(Data,"data");
   {
     a_.StartVector(Authinfo,"authinfo");
     if (Authinfo!= null) {          foreach(var e1 in Authinfo) {
   a_.WriteRecord(e1,"e1");
         }
     }
     a_.EndVector(Authinfo,"authinfo");
   }
     a_.EndRecord(this,string.Empty);
     ms.Position = 0;
     return System.Text.Encoding.UTF8.GetString(ms.ToArray());
   }    } catch (Exception ex) {
     log.Error(ex);
   }
   return "ERROR";
 }
Esempio n. 37
0
 public override String ToString()
 {
     try {
       System.IO.MemoryStream ms = new System.IO.MemoryStream();
       using(ZooKeeperNet.IO.EndianBinaryWriter writer =
     new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
       BinaryOutputArchive a_ =
     new BinaryOutputArchive(writer);
       a_.StartRecord(this,string.Empty);
     a_.WriteLong(RelativeZxid,"relativeZxid");
     {
       a_.StartVector(DataWatches,"dataWatches");
       if (DataWatches!= null) {          foreach(var e1 in DataWatches) {
     a_.WriteString(e1,e1);
       }
       }
       a_.EndVector(DataWatches,"dataWatches");
     }
     {
       a_.StartVector(ExistWatches,"existWatches");
       if (ExistWatches!= null) {          foreach(var e1 in ExistWatches) {
     a_.WriteString(e1,e1);
       }
       }
       a_.EndVector(ExistWatches,"existWatches");
     }
     {
       a_.StartVector(ChildWatches,"childWatches");
       if (ChildWatches!= null) {          foreach(var e1 in ChildWatches) {
     a_.WriteString(e1,e1);
       }
       }
       a_.EndVector(ChildWatches,"childWatches");
     }
       a_.EndRecord(this,string.Empty);
       ms.Position = 0;
       return System.Text.Encoding.UTF8.GetString(ms.ToArray());
     }    } catch (Exception ex) {
     #if !NET_CORE
       log.Error(ex);
       #endif
     }
     return "ERROR";
 }
Esempio n. 38
0
 public override String ToString()
 {
     try {
       System.IO.MemoryStream ms = new System.IO.MemoryStream();
       using(ZooKeeperNet.IO.EndianBinaryWriter writer =
     new ZooKeeperNet.IO.EndianBinaryWriter(ZooKeeperNet.IO.EndianBitConverter.Big, ms, System.Text.Encoding.UTF8)){
       BinaryOutputArchive a_ =
     new BinaryOutputArchive(writer);
       a_.StartRecord(this,string.Empty);
     a_.WriteString(Path,"path");
     {
       a_.StartVector(Acl,"acl");
       if (Acl!= null) {          foreach(var e1 in Acl) {
     a_.WriteRecord(e1,"e1");
       }
       }
       a_.EndVector(Acl,"acl");
     }
     a_.WriteInt(Version,"version");
       a_.EndRecord(this,string.Empty);
       ms.Position = 0;
       return System.Text.Encoding.UTF8.GetString(ms.ToArray());
     }    } catch (Exception ex) {
     #if !NET_CORE
       log.Error(ex);
       #endif
     }
     return "ERROR";
 }