コード例 #1
0
 public static ModuleDefinition ReadModule(Stream stream, ReaderParameters parameters)
 {
     ModuleDefinition.CheckStream(stream);
     if (!stream.CanRead || !stream.CanSeek)
     {
         throw new ArgumentException();
     }
     Mixin.CheckParameters(parameters);
     return(ModuleReader.CreateModuleFrom(ImageReader.ReadImageFrom(stream), parameters));
 }
コード例 #2
0
 public void Write(Stream stream, WriterParameters parameters)
 {
     ModuleDefinition.CheckStream(stream);
     if (!stream.CanWrite || !stream.CanSeek)
     {
         throw new ArgumentException();
     }
     Mixin.CheckParameters(parameters);
     ModuleWriter.WriteModuleTo(this, stream, parameters);
 }