public static void Register(FileTypeSymbol fileTypeSymbol, FileTypeAlgorithm algorithm)
        {
            if (fileTypeSymbol == null)
                throw AutoInitAttribute.ArgumentNullException(typeof(FileTypeSymbol), nameof(fileTypeSymbol));

            if (algorithm == null)
                throw new ArgumentNullException(nameof(algorithm));

            FileTypes.Add(fileTypeSymbol, algorithm);
        }
 public static WebDownload WebDownload(this EmbeddedFilePathEntity fp, FileTypeSymbol fileType)
 {
     return WebDownloadExpression.Evaluate(fp, fileType);
 }
 public static WebImage WebImage(this EmbeddedFilePathEntity efp, FileTypeSymbol fileType)
 {
     return WebImageExpression.Evaluate(efp, fileType);
 }
 public EmbeddedFilePathEntity(FileTypeSymbol fileType, string fileName, byte[] fileData)
     : this(fileType)
 {
     this.FileName = fileName;
     this.BinaryFile = fileData;
 }
 public EmbeddedFilePathEntity(FileTypeSymbol fileType, string path)
     : this(fileType)
 {
     this.FileName = Path.GetFileName(path);
     this.BinaryFile = File.ReadAllBytes(path);
 }
 public EmbeddedFilePathEntity(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
Exemple #7
0
 public FilePathEmbedded(FileTypeSymbol fileType, string readFileFrom)
     : this(fileType)
 {
     this.FileName   = Path.GetFileName(readFileFrom) !;
     this.BinaryFile = File.ReadAllBytes(readFileFrom);
 }
Exemple #8
0
 public FilePathEmbedded(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
Exemple #9
0
 public FilePathEntity(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
Exemple #10
0
 public FilePathEntity(FileTypeSymbol fileType, string fileName, byte[] fileData)
     : this(fileType)
 {
     this.FileName   = fileName;
     this.BinaryFile = fileData;
 }
Exemple #11
0
 public FilePathEntity(FileTypeSymbol fileType, string path)
     : this(fileType)
 {
     this.FileName   = Path.GetFileName(path) !;
     this.BinaryFile = File.ReadAllBytes(path);
 }
Exemple #12
0
 public FilePathEntity(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
 public static void Register(FileTypeSymbol fileTypeSymbol, FileTypeAlgorithm algorithm)
 {
     FileTypes.Add(fileTypeSymbol, algorithm);
 }