This file contains hidden or 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
| using FileSignatures; | |
| if (args.Length != 1) | |
| { | |
| Console.WriteLine($"Usage: [path-to-file]"); | |
| return; | |
| } | |
| var pathToFile = args[0]; | |
| var allowedExtensions = new string[] { "jpg", "xls", "doc", "pdf" }; |
This file contains hidden or 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
| using FileSignatures.Formats; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Text; | |
| using Xunit; | |
| namespace FileSignatures.Tests | |
| { |
This file contains hidden or 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
| /// <summary> | |
| /// Enables the efficient, dynamic composition of query predicates. | |
| /// </summary> | |
| public static class PredicateBuilder | |
| { | |
| /// <summary> | |
| /// Creates a predicate that evaluates to true. | |
| /// </summary> | |
| public static Expression<Func<T, bool>> True<T>() { return param => true; } | |