Пример #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);
        }
Пример #2
0
 public static WebDownload WebDownload(this EmbeddedFilePathEntity fp, FileTypeSymbol fileType)
 {
     return WebDownloadExpression.Evaluate(fp, fileType);
 }
Пример #3
0
 public static WebImage WebImage(this EmbeddedFilePathEntity efp, FileTypeSymbol fileType)
 {
     return WebImageExpression.Evaluate(efp, fileType);
 }
Пример #4
0
 public EmbeddedFilePathEntity(FileTypeSymbol fileType, string fileName, byte[] fileData)
     : this(fileType)
 {
     this.FileName = fileName;
     this.BinaryFile = fileData;
 }
Пример #5
0
 public EmbeddedFilePathEntity(FileTypeSymbol fileType, string path)
     : this(fileType)
 {
     this.FileName = Path.GetFileName(path);
     this.BinaryFile = File.ReadAllBytes(path);
 }
Пример #6
0
 public EmbeddedFilePathEntity(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
Пример #7
0
 public FilePathEmbedded(FileTypeSymbol fileType, string readFileFrom)
     : this(fileType)
 {
     this.FileName   = Path.GetFileName(readFileFrom) !;
     this.BinaryFile = File.ReadAllBytes(readFileFrom);
 }
Пример #8
0
 public FilePathEmbedded(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
Пример #9
0
 public FilePathEntity(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
Пример #10
0
 public FilePathEntity(FileTypeSymbol fileType, string fileName, byte[] fileData)
     : this(fileType)
 {
     this.FileName   = fileName;
     this.BinaryFile = fileData;
 }
Пример #11
0
 public FilePathEntity(FileTypeSymbol fileType, string path)
     : this(fileType)
 {
     this.FileName   = Path.GetFileName(path) !;
     this.BinaryFile = File.ReadAllBytes(path);
 }
Пример #12
0
 public FilePathEntity(FileTypeSymbol fileType)
 {
     this.FileType = fileType;
 }
 public static void Register(FileTypeSymbol fileTypeSymbol, FileTypeAlgorithm algorithm)
 {
     FileTypes.Add(fileTypeSymbol, algorithm);
 }