private static FileProcessingData CreateFileProcessingData(XElement fileProcessingElement)
        {
            const String includeElement = "include";
            const String excludeElement = "exclude";
            const String onlyElement    = "only";
            IDictionary <String, FileProcessingMode> fileProcessModeMap = new Dictionary <String, FileProcessingMode>
            {
                { includeElement, FileProcessingMode.Include },
                { excludeElement, FileProcessingMode.Exclude },
                { onlyElement, FileProcessingMode.Only }
            };
            const String       maskAttribute = "file";
            FileProcessingMode mode          = fileProcessModeMap[fileProcessingElement.Name.LocalName];
            String             mask          = fileProcessingElement.Attribute(maskAttribute).Value;

            return(new FileProcessingData(mode, mask));
        }
Exemple #2
0
 public FileProcessingData(FileProcessingMode mode, String mask)
 {
     Mode = mode;
     Mask = mask;
 }