Example #1
0
 internal override void CreateFromStream(BinaryReader reader)
 {
     base.CreateFromStream(reader);
     buildItems = null;
     if (reader.ReadByte() != 0)
     {
         int sizeOfArray = reader.ReadInt32();
         buildItems = new BuildItem[sizeOfArray];
         for (int j = 0; j < sizeOfArray; j++)
         {
             BuildItem itemToAdd = null;
             if (reader.ReadByte() != 0)
             {
                 itemToAdd = new BuildItem(null, string.Empty);
                 itemToAdd.CreateFromStream(reader);
             }
             buildItems[j] = itemToAdd;
         }
     }
 }
Example #2
0
 internal static BuildResult CreateFromStream(BinaryReader reader)
 {
     BuildResult buildResult = new BuildResult();
     #region OutputsByTarget
     if (reader.ReadByte() == 0)
     {
         buildResult.outputsByTarget = null;
     }
     else
     {
         int numberOfElements = reader.ReadInt32();
         buildResult.outputsByTarget = new Hashtable(numberOfElements, StringComparer.OrdinalIgnoreCase);
         for (int i = 0; i < numberOfElements; i++)
         {
             string key = reader.ReadString();
             BuildItem[] value = null;
             if (reader.ReadByte() != 0)
             {
                 int sizeOfArray = reader.ReadInt32();
                 value = new BuildItem[sizeOfArray];
                 for (int j = 0; j < sizeOfArray; j++)
                 {
                     BuildItem itemToAdd = null;
                     if (reader.ReadByte() != 0)
                     {
                         itemToAdd = new BuildItem(null, string.Empty);
                         itemToAdd.CreateFromStream(reader);
                     }
                     value[j] = itemToAdd;
                 }
             }
             buildResult.outputsByTarget.Add(key, value);
         }
     }
     #endregion
     #region ResultsByTarget
     //Write Number of HashItems
     int numberOfHashKeyValuePairs = reader.ReadInt32();
     buildResult.resultByTarget = new Hashtable(numberOfHashKeyValuePairs, StringComparer.OrdinalIgnoreCase);
     for (int i = 0; i < numberOfHashKeyValuePairs; i++)
     {
         string key = reader.ReadString();
         int value = reader.ReadInt32();
         buildResult.resultByTarget.Add(key, (Target.BuildState)value);
     }
     #endregion
     buildResult.flags = reader.ReadByte();
     buildResult.handleId = reader.ReadInt32();
     buildResult.requestId = reader.ReadInt32();
     buildResult.projectId = reader.ReadInt32();
     #region DefaultTargets
     if (reader.ReadByte() == 0)
     {
         buildResult.defaultTargets = null;
     }
     else
     {
         buildResult.defaultTargets = reader.ReadString();
     }
     #endregion
     #region InitialTargets
     if (reader.ReadByte() == 0)
     {
         buildResult.initialTargets = null;
     }
     else
     {
         buildResult.initialTargets = reader.ReadString();
     }
     #endregion
     #region Timing data
     buildResult.totalTime = reader.ReadInt32();
     buildResult.engineTime = reader.ReadInt32();
     buildResult.taskTime = reader.ReadInt32();
     #endregion
     return buildResult;
 }
Example #3
0
        internal static BuildResult CreateFromStream(BinaryReader reader)
        {
            BuildResult buildResult = new BuildResult();

            #region OutputsByTarget
            if (reader.ReadByte() == 0)
            {
                buildResult.outputsByTarget = null;
            }
            else
            {
                int numberOfElements = reader.ReadInt32();
                buildResult.outputsByTarget = new Hashtable(numberOfElements, StringComparer.OrdinalIgnoreCase);
                for (int i = 0; i < numberOfElements; i++)
                {
                    string      key   = reader.ReadString();
                    BuildItem[] value = null;
                    if (reader.ReadByte() != 0)
                    {
                        int sizeOfArray = reader.ReadInt32();
                        value = new BuildItem[sizeOfArray];
                        for (int j = 0; j < sizeOfArray; j++)
                        {
                            BuildItem itemToAdd = null;
                            if (reader.ReadByte() != 0)
                            {
                                itemToAdd = new BuildItem(null, string.Empty);
                                itemToAdd.CreateFromStream(reader);
                            }
                            value[j] = itemToAdd;
                        }
                    }
                    buildResult.outputsByTarget.Add(key, value);
                }
            }
            #endregion
            #region ResultsByTarget
            //Write Number of HashItems
            int numberOfHashKeyValuePairs = reader.ReadInt32();
            buildResult.resultByTarget = new Hashtable(numberOfHashKeyValuePairs, StringComparer.OrdinalIgnoreCase);
            for (int i = 0; i < numberOfHashKeyValuePairs; i++)
            {
                string key   = reader.ReadString();
                int    value = reader.ReadInt32();
                buildResult.resultByTarget.Add(key, (Target.BuildState)value);
            }
            #endregion
            buildResult.flags     = reader.ReadByte();
            buildResult.handleId  = reader.ReadInt32();
            buildResult.requestId = reader.ReadInt32();
            buildResult.projectId = reader.ReadInt32();
            #region DefaultTargets
            if (reader.ReadByte() == 0)
            {
                buildResult.defaultTargets = null;
            }
            else
            {
                buildResult.defaultTargets = reader.ReadString();
            }
            #endregion
            #region InitialTargets
            if (reader.ReadByte() == 0)
            {
                buildResult.initialTargets = null;
            }
            else
            {
                buildResult.initialTargets = reader.ReadString();
            }
            #endregion
            #region Timing data
            buildResult.totalTime  = reader.ReadInt32();
            buildResult.engineTime = reader.ReadInt32();
            buildResult.taskTime   = reader.ReadInt32();
            #endregion
            return(buildResult);
        }
Example #4
0
 internal override void CreateFromStream(BinaryReader reader)
 {
     base.CreateFromStream(reader);
     buildItems = null;
     if (reader.ReadByte() != 0)
     {
         int sizeOfArray = reader.ReadInt32();
         buildItems = new BuildItem[sizeOfArray];
         for (int j = 0; j < sizeOfArray; j++)
         {
             BuildItem itemToAdd = null;
             if (reader.ReadByte() != 0)
             {
                 itemToAdd = new BuildItem(null, string.Empty);
                 itemToAdd.CreateFromStream(reader);
             }
             buildItems[j] = itemToAdd;
         }
     }
 }