Example #1
0
        /// <summary>
        /// Read a file
        /// </summary>
        /// <param name="reader"></param>
        /// <returns></returns>
        public override bool Read(GH_IO.Serialization.GH_IReader reader)
        {
            var hisChunk = reader.FindChunk("historicData");
            var genChunk = reader.FindChunk("genoData");

            if (hisChunk != null)
            {
                var data = new GH_Structure <GH_Number>();
                data.Read(hisChunk);
                Value.historicData = new GH_Structure <GH_Number>(data, true);
            }

            if (genChunk != null)
            {
                var data = new GH_Structure <GH_Guid>();
                data.Read(genChunk);
                Value.genoGuids = new GH_Structure <GH_Guid>(data, true);
            }

            if (reader.ItemExists("popCount"))
            {
                Value.PopCount = reader.GetInt32("popCount");
            }

            return(true);
        }