Dump() public méthode

public Dump ( ) : void
Résultat void
        internal void WriteAssembly(String typeFullName, Type type, String assemblyString, int assemId, bool isNew, bool isInteropType)
        {
            SerTrace.Log(this, "WriteAssembly type ", type, ", id ", assemId, ", name ", assemblyString, ", isNew ", isNew);
            //If the file being tested wasn't built as an assembly, then we're going to get null back
            //for the assembly name.  This is very unfortunate.
            InternalWriteItemNull();
            if (assemblyString == null)
            {
                assemblyString = String.Empty;
            }

            if (isNew)
            {
                if (objectWriter.IsCrossAppDomain())
                {
                    if (crossAppDomainAssembly == null)
                    {
                        crossAppDomainAssembly = new BinaryCrossAppDomainAssembly();
                    }
                    crossAppDomainAssembly.Set(assemId, objectWriter.CrossAppDomainArrayAdd(assemblyString));
                    crossAppDomainAssembly.Dump();
                    crossAppDomainAssembly.Write(this);
                }
                else
                {
                    if (binaryAssembly == null)
                    {
                        binaryAssembly = new BinaryAssembly();
                    }
                    binaryAssembly.Set(assemId, assemblyString);
                    binaryAssembly.Dump();
                    binaryAssembly.Write(this);
                }
            }
        }
        internal void ReadAssembly(BinaryHeaderEnum binaryHeaderEnum)
        {
            SerTrace.Log(this, "ReadAssembly");
            BinaryAssembly record = new BinaryAssembly();

            if (binaryHeaderEnum == BinaryHeaderEnum.CrossAppDomainAssembly)
            {
                BinaryCrossAppDomainAssembly crossAppDomainAssembly = new BinaryCrossAppDomainAssembly();
                crossAppDomainAssembly.Read(this);
                crossAppDomainAssembly.Dump();
                record.assemId        = crossAppDomainAssembly.assemId;
                record.assemblyString = objectReader.CrossAppDomainArray(crossAppDomainAssembly.assemblyIndex) as String;
                if (record.assemblyString == null)
                {
                    throw new SerializationException(String.Format(Environment.GetResourceString("Serialization_CrossAppDomainError"), "String", crossAppDomainAssembly.assemblyIndex));
                }
            }
            else
            {
                record.Read(this);
                record.Dump();
            }

            AssemIdToAssemblyTable[record.assemId] = new BinaryAssemblyInfo(record.assemblyString);
        }
        internal void WriteAssembly(Type type, String assemblyString, int assemId, bool isNew)
        {
            SerTrace.Log(this, "WriteAssembly type ", type, ", id ", assemId, ", name ", assemblyString, ", isNew ", isNew);
            //If the file being tested wasn't built as an assembly, then we're going to get null back
            //for the assembly name.  This is very unfortunate.
            InternalWriteItemNull();
            if (assemblyString == null)
            {
                assemblyString = String.Empty;
            }

            if (isNew)
            {
                if (binaryAssembly == null)
                {
                    binaryAssembly = new BinaryAssembly();
                }
                binaryAssembly.Set(assemId, assemblyString);
                binaryAssembly.Dump();
                binaryAssembly.Write(this);
            }
        }
Exemple #4
0
        internal void ReadAssembly(BinaryHeaderEnum binaryHeaderEnum)
        {
            BinaryAssembly binaryAssembly = new BinaryAssembly();

            if (binaryHeaderEnum == BinaryHeaderEnum.CrossAppDomainAssembly)
            {
                BinaryCrossAppDomainAssembly appDomainAssembly = new BinaryCrossAppDomainAssembly();
                appDomainAssembly.Read(this);
                appDomainAssembly.Dump();
                binaryAssembly.assemId        = appDomainAssembly.assemId;
                binaryAssembly.assemblyString = this.objectReader.CrossAppDomainArray(appDomainAssembly.assemblyIndex) as string;
                if (binaryAssembly.assemblyString == null)
                {
                    throw new SerializationException(Environment.GetResourceString("Serialization_CrossAppDomainError", (object)"String", (object)appDomainAssembly.assemblyIndex));
                }
            }
            else
            {
                binaryAssembly.Read(this);
                binaryAssembly.Dump();
            }
            this.AssemIdToAssemblyTable[binaryAssembly.assemId] = (object)new BinaryAssemblyInfo(binaryAssembly.assemblyString);
        }
        internal void ReadAssembly(BinaryHeaderEnum binaryHeaderEnum)
        {
            SerTrace.Log( this, "ReadAssembly");
            BinaryAssembly record = new BinaryAssembly();
            if (binaryHeaderEnum == BinaryHeaderEnum.CrossAppDomainAssembly)
            {
                BinaryCrossAppDomainAssembly crossAppDomainAssembly = new BinaryCrossAppDomainAssembly();
                crossAppDomainAssembly.Read(this);
                crossAppDomainAssembly.Dump();
                record.assemId = crossAppDomainAssembly.assemId;
                record.assemblyString = objectReader.CrossAppDomainArray(crossAppDomainAssembly.assemblyIndex) as String;
                if (record.assemblyString == null)
                    throw new SerializationException(Environment.GetResourceString("Serialization_CrossAppDomainError","String", crossAppDomainAssembly.assemblyIndex));

            }
            else
            {
                record.Read(this);
                record.Dump();
            }

            AssemIdToAssemblyTable[record.assemId] = new BinaryAssemblyInfo(record.assemblyString);
        }
 internal void ReadAssembly(BinaryHeaderEnum binaryHeaderEnum)
 {
     BinaryAssembly assembly = new BinaryAssembly();
     if (binaryHeaderEnum == BinaryHeaderEnum.CrossAppDomainAssembly)
     {
         BinaryCrossAppDomainAssembly assembly2 = new BinaryCrossAppDomainAssembly();
         assembly2.Read(this);
         assembly2.Dump();
         assembly.assemId = assembly2.assemId;
         assembly.assemblyString = this.objectReader.CrossAppDomainArray(assembly2.assemblyIndex) as string;
         if (assembly.assemblyString == null)
         {
             throw new SerializationException(Environment.GetResourceString("Serialization_CrossAppDomainError", new object[] { "String", assembly2.assemblyIndex }));
         }
     }
     else
     {
         assembly.Read(this);
         assembly.Dump();
     }
     this.AssemIdToAssemblyTable[assembly.assemId] = new BinaryAssemblyInfo(assembly.assemblyString);
 }