예제 #1
0
        public BytePattern(BytePatternConfig config)
        {
            Config           = config;
            Bytes            = BytesFromString(config.String);
            MatchedAddresses = new List <ulong>();

            if (ulong.TryParse(config.AddressRangeStart, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out ulong start) &&
                ulong.TryParse(config.AddressRangeEnd, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out ulong end))
            {
                AddressRange = new AddressRange(start, end);
            }
            else
            {
                AddressRange = new AddressRange(0, 0);
                Log.WriteLine($"Failed to parse address range ({config.AddressRangeStart} - {config.AddressRangeEnd}) for pattern: {config.String}");
            }
        }
예제 #2
0
 public BytePattern(BytePatternConfig config)
 {
     Config           = config;
     Bytes            = BytesFromString(config.PatternString);
     MatchedAddresses = new List <ulong>();
 }