Ejemplo n.º 1
0
 public void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     if (info == null)
     {
         throw new ArgumentNullException("info");
     }
     using (CimSerializer cimSerializer = CimSerializer.Create())
     {
         byte[] serializedBytes  = cimSerializer.Serialize(this, InstanceSerializationOptions.IncludeClasses);
         string serializedString = Encoding.Unicode.GetString(serializedBytes);
         info.AddValue(serializationId_MiXml, serializedString);
     }
     info.AddValue(serializationId_CimSessionComputerName, this.GetCimSessionComputerName());
 }
Ejemplo n.º 2
0
 public void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     if (info != null)
     {
         CimSerializer cimSerializer = CimSerializer.Create();
         using (cimSerializer)
         {
             byte[] numArray = cimSerializer.Serialize(this, InstanceSerializationOptions.IncludeClasses);
             string str      = Encoding.Unicode.GetString(numArray);
             info.AddValue("MI_XML", str);
         }
         info.AddValue("CSCN", this.GetCimSessionComputerName());
         return;
     }
     else
     {
         throw new ArgumentNullException("info");
     }
 }