public static void Link(Result result, ProcessingLevel processingLevel) { result.ProcessingLevel = processingLevel; result.ProcessingLevelID = processingLevel.ProcessingLevelID; processingLevel.Results.Add(result); }
public ProcessingLevel CanBeProcessed(MuxableType[] inputTypes, out List <MuxableType> handledInputTypes, out List <MuxableType> unhandledInputTypes) { handledInputTypes = new List <MuxableType>(); unhandledInputTypes = new List <MuxableType>(); int[] filesOfType = new int[4]; foreach (MuxableType inputType in inputTypes) { int type = getSupportedType(inputType); if (type >= 0) { if (maxFilesOfType[type] < 0 || // We ignore it in this case filesOfType[type] < maxFilesOfType[type]) { handledInputTypes.Add(inputType); filesOfType[type]++; } else { unhandledInputTypes.Add(inputType); } } else { unhandledInputTypes.Add(inputType); } } ProcessingLevel retval = ProcessingLevel.NONE; if (handledInputTypes.Count > 0) { retval = ProcessingLevel.SOME; } if (unhandledInputTypes.Count == 0 || inputTypes.Length == 0) { retval = ProcessingLevel.ALL; } return(retval); }