Store compiled regular expressions for #170
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports System.Management
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Public Class mgrProcessDetection
|
||||
|
||||
@@ -12,7 +11,6 @@ Public Class mgrProcessDetection
|
||||
Private oDuplicateGames As New ArrayList
|
||||
Private bDuplicates As Boolean
|
||||
Private bVerified As Boolean = False
|
||||
Private oRegEx As Regex
|
||||
|
||||
Property FoundProcess As Process
|
||||
Get
|
||||
@@ -144,8 +142,7 @@ Public Class mgrProcessDetection
|
||||
Private Function IsMatch(ByRef oGame As clsGame, ByRef sProcessCheck As String) As Boolean
|
||||
If oGame.IsRegEx Then
|
||||
Try
|
||||
oRegEx = New Regex(oGame.ProcessName)
|
||||
If oRegEx.IsMatch(sProcessCheck) Then
|
||||
If oGame.CompiledRegEx.IsMatch(sProcessCheck) Then
|
||||
Return True
|
||||
End If
|
||||
Catch
|
||||
|
||||
Reference in New Issue
Block a user