Example #1
0
        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;
 }
Example #7
0
 public FilePathEmbedded(FileTypeSymbol fileType, string readFileFrom)
     : this(fileType)
 {
     this.FileName   = Path.GetFileName(readFileFrom) !;
     this.BinaryFile = File.ReadAllBytes(readFileFrom);
 }
Example #8
0
 public FilePathEmbedded(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
Example #9
0
 public FilePathEntity(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
Example #10
0
 public FilePathEntity(FileTypeSymbol fileType, string fileName, byte[] fileData)
     : this(fileType)
 {
     this.FileName   = fileName;
     this.BinaryFile = fileData;
 }
Example #11
0
 public FilePathEntity(FileTypeSymbol fileType, string path)
     : this(fileType)
 {
     this.FileName   = Path.GetFileName(path) !;
     this.BinaryFile = File.ReadAllBytes(path);
 }
Example #12
0
 public FilePathEntity(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
 public static void Register(FileTypeSymbol fileTypeSymbol, FileTypeAlgorithm algorithm)
 {
     FileTypes.Add(fileTypeSymbol, algorithm);
 }