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}"); } }
public BytePattern(BytePatternConfig config) { Config = config; Bytes = BytesFromString(config.PatternString); MatchedAddresses = new List <ulong>(); }