Example #1
0
        public override IUnit LoadUnitFrom(string location)
        {
            var result = reader.OpenModule(BinaryDocument.GetBinaryDocumentForFile(location, this));

            RegisterAsLatest(result);
            return(result);
        }
Example #2
0
        public override IUnit LoadUnitFrom(string location)
        {
            if (!System.IO.File.Exists(location))
            {
                return(Dummy.Unit);
            }
            var result = PeReader.OpenModule(BinaryDocument.GetBinaryDocumentForFile(location, this));

            if (result == Dummy.Module)
            {
                return(Dummy.Unit);
            }
            RegisterAsLatest(result);
            return(result);
        }