-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49a2a48
commit 852fea1
Showing
7 changed files
with
138 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Collections.Generic; | ||
using WowPacketParser.Proto; | ||
using WowPacketParser.Proto.Processing; | ||
|
||
namespace WowPacketParser.Parsing.Proto; | ||
|
||
public abstract class BaseProtoQueryBuilder : PacketProcessor<VoidType>, IProtoQueryBuilder | ||
{ | ||
public abstract bool IsEnabled(); | ||
|
||
public string Process(IReadOnlyList<Packets> packetsList) | ||
{ | ||
foreach (var sniffFile in packetsList) | ||
{ | ||
// more complex logic is possible, i.e. clear state after each file | ||
foreach (var packet in sniffFile.Packets_) | ||
{ | ||
Process(packet); | ||
} | ||
} | ||
|
||
return GenerateQuery(); | ||
} | ||
|
||
protected abstract string GenerateQuery(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Collections.Generic; | ||
using WowPacketParser.Proto; | ||
|
||
namespace WowPacketParser.Parsing.Proto; | ||
|
||
public interface IProtoQueryBuilder | ||
{ | ||
bool IsEnabled(); | ||
string Process(IReadOnlyList<Packets> packets); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace WowPacketParser.Parsing.Proto; | ||
|
||
public struct VoidType { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters