private PlatformHeuristics LoadHeuristics(PlatformHeuristics_v1 heuristics) { if (heuristics == null) { return(new PlatformHeuristics { ProcedurePrologs = new BytePattern[0], }); } BytePattern[] prologs; if (heuristics.ProcedurePrologs == null) { prologs = new BytePattern[0]; } else { prologs = heuristics.ProcedurePrologs .Select(p => LoadBytePattern(p)) .Where(p => p.Bytes != null) .ToArray(); } return(new PlatformHeuristics { ProcedurePrologs = prologs }); }
private PlatformHeuristics LoadHeuristics(PlatformHeuristics_v1 heuristics) { if (heuristics == null) { return new PlatformHeuristics { ProcedurePrologs = new BytePattern[0], }; } BytePattern[] prologs; if (heuristics.ProcedurePrologs == null) { prologs = new BytePattern[0]; } else { prologs = heuristics.ProcedurePrologs .Select(p => LoadBytePattern(p)) .Where(p => p.Bytes != null) .ToArray(); } return new PlatformHeuristics { ProcedurePrologs = prologs }; }