Esempio n. 1
0
        //First int is number of instruction, second ints are indexes where to put instruction.
        public Dictionary <int, List <int> > Find()
        {
            var result = new Dictionary <int, List <int> >();

            foreach (Find find in InstructionSet.FindList)
            {
                List <int> positionList = CorruptedHex.AllMatches(find.FindHex);
                if (positionList.Count > 0)
                {
                    result.Add(find.FileIndex, new List <int>(positionList));
                }
            }
            return(result);
        }
Esempio n. 2
0
        public bool Identify()
        {
            Hex identifyRaw = InstructionSet.Identify.RawIdenfityHex;
            Hex identify    = InstructionSet.Identify.IdentifyHex;

            if (identifyRaw.Count != CorruptedHex.Count)
            {
                return(false);
            }

            if (identify.Count == 1 && identify[0] == -1)
            {
                return(true);
            }

            List <int> match = CorruptedHex.AllMatches(identify);

            if (match.Count == 0)
            {
                return(false);
            }

            return(true);
        }