public static bool CreateFlagCapturePatternInfo(ref udtPatternInfo pattern, ArgumentResources resources, udtCutByFlagCaptureArg rules) { var pinnedRules = new PinnedObject(rules); resources.PinnedObjects.Add(pinnedRules); pattern.Type = (UInt32)udtPatternType.FlagCaptures; pattern.TypeSpecificInfo = pinnedRules.Address; return true; }
public static bool CutDemosByFlagCapture(ref udtParseArg parseArg, List<string> filePaths, udtCutByFlagCaptureArg rules, CutByPatternOptions options) { var resources = new ArgumentResources(); var patterns = new udtPatternInfo[1]; if(!CreateFlagCapturePatternInfo(ref patterns[0], resources, rules)) { return false; } return CutDemosByPattern(resources, ref parseArg, filePaths, patterns, options); }
public static udtCutByFlagCaptureArg CreateCutByFlagCaptureArg(UdtConfig config) { var rules = new udtCutByFlagCaptureArg(); rules.MinCarryTimeMs = (UInt32)config.FlagCaptureMinCarryTimeMs; rules.MaxCarryTimeMs = (UInt32)config.FlagCaptureMaxCarryTimeMs; return rules; }