Ejemplo 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_.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_.EndRecord(this, string.Empty);
             ms.Position = 0;
             return(System.Text.Encoding.UTF8.GetString(ms.ToArray()));
         }
     } catch (Exception ex) {
         log.Error(ex);
     }
     return("ERROR");
 }
Ejemplo n.º 2
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.WriteBool(this.Ephemeral, "ephemeral");
             archive.EndRecord(this, string.Empty);
             stream.Position = 0L;
             return(Encoding.UTF8.GetString(stream.ToArray()));
         }
     }
     catch (Exception exception)
     {
         log.Error(exception);
     }
     return("ERROR");
 }
Ejemplo n.º 3
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");
 }
Ejemplo n.º 4
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.WriteBuffer(this.Data, "data");
             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.WriteBool(this.Ephemeral, "ephemeral");
             binaryOutputArchive.WriteInt(this.ParentCVersion, "parentCVersion");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         CreateTxn.log.Error((object)ex);
     }
     return("ERROR");
 }
Ejemplo n.º 5
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_.WriteBool(Watch,"watch");
     a_.EndRecord(this,string.Empty);
     ms.Position = 0;
     return System.Text.Encoding.UTF8.GetString(ms.ToArray());
   }    } catch (Exception ex) {
     log.Error(ex);
   }
   return "ERROR";
 }
Ejemplo 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.WriteString(this.Path, "path");
             archive.WriteBool(this.Watch, "watch");
             archive.EndRecord(this, string.Empty);
             stream.Position = 0L;
             return(Encoding.UTF8.GetString(stream.ToArray()));
         }
     }
     catch (Exception exception)
     {
         log.Error(exception);
     }
     return("ERROR");
 }
Ejemplo n.º 7
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_.WriteBool(Watch, "watch");
               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");
   }
Ejemplo n.º 8
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.WriteBool(this.Watch, "watch");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         GetChildren2Request.log.Error((object)ex);
     }
     return("ERROR");
 }
Ejemplo n.º 9
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.WriteBool(this.Done, "done");
             binaryOutputArchive.WriteInt(this.Err, "err");
             binaryOutputArchive.EndRecord((IRecord)this, string.Empty);
             memoryStream.Position = 0L;
             return(Encoding.UTF8.GetString(memoryStream.ToArray()));
         }
     }
     catch (Exception ex)
     {
         MultiHeader.log.Error((object)ex);
     }
     return("ERROR");
 }
Ejemplo n.º 10
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) {
     log.Error(ex);
   }
   return "ERROR";
 }