mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
🎨REFACTOR: Plugins do not need to expose their methods as virtual.
This commit is contained in:
@@ -69,10 +69,10 @@ namespace DiscImageChef.Filters
|
||||
AppleSingleEntry rsrcFork;
|
||||
Stream stream;
|
||||
|
||||
public virtual string Name => "AppleSingle";
|
||||
public virtual Guid Id => new Guid("A69B20E8-F4D3-42BB-BD2B-4A7263394A05");
|
||||
public string Name => "AppleSingle";
|
||||
public Guid Id => new Guid("A69B20E8-F4D3-42BB-BD2B-4A7263394A05");
|
||||
|
||||
public virtual void Close()
|
||||
public void Close()
|
||||
{
|
||||
bytes = null;
|
||||
stream?.Close();
|
||||
@@ -82,22 +82,22 @@ namespace DiscImageChef.Filters
|
||||
opened = false;
|
||||
}
|
||||
|
||||
public virtual string GetBasePath()
|
||||
public string GetBasePath()
|
||||
{
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public virtual DateTime GetCreationTime()
|
||||
public DateTime GetCreationTime()
|
||||
{
|
||||
return creationTime;
|
||||
}
|
||||
|
||||
public virtual long GetDataForkLength()
|
||||
public long GetDataForkLength()
|
||||
{
|
||||
return dataFork.length;
|
||||
}
|
||||
|
||||
public virtual Stream GetDataForkStream()
|
||||
public Stream GetDataForkStream()
|
||||
{
|
||||
if(dataFork.length == 0) return null;
|
||||
|
||||
@@ -110,37 +110,37 @@ namespace DiscImageChef.Filters
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual string GetFilename()
|
||||
public string GetFilename()
|
||||
{
|
||||
return Path.GetFileName(basePath);
|
||||
}
|
||||
|
||||
public virtual DateTime GetLastWriteTime()
|
||||
public DateTime GetLastWriteTime()
|
||||
{
|
||||
return lastWriteTime;
|
||||
}
|
||||
|
||||
public virtual long GetLength()
|
||||
public long GetLength()
|
||||
{
|
||||
return dataFork.length + rsrcFork.length;
|
||||
}
|
||||
|
||||
public virtual string GetParentFolder()
|
||||
public string GetParentFolder()
|
||||
{
|
||||
return Path.GetDirectoryName(basePath);
|
||||
}
|
||||
|
||||
public virtual string GetPath()
|
||||
public string GetPath()
|
||||
{
|
||||
return basePath;
|
||||
}
|
||||
|
||||
public virtual long GetResourceForkLength()
|
||||
public long GetResourceForkLength()
|
||||
{
|
||||
return rsrcFork.length;
|
||||
}
|
||||
|
||||
public virtual Stream GetResourceForkStream()
|
||||
public Stream GetResourceForkStream()
|
||||
{
|
||||
if(rsrcFork.length == 0) return null;
|
||||
|
||||
@@ -153,12 +153,12 @@ namespace DiscImageChef.Filters
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual bool HasResourceFork()
|
||||
public bool HasResourceFork()
|
||||
{
|
||||
return rsrcFork.length > 0;
|
||||
}
|
||||
|
||||
public virtual bool Identify(byte[] buffer)
|
||||
public bool Identify(byte[] buffer)
|
||||
{
|
||||
if(buffer == null || buffer.Length < 26) return false;
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace DiscImageChef.Filters
|
||||
(header.version == AppleSingleVersion || header.version == AppleSingleVersion2);
|
||||
}
|
||||
|
||||
public virtual bool Identify(Stream stream)
|
||||
public bool Identify(Stream stream)
|
||||
{
|
||||
if(stream == null || stream.Length < 26) return false;
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace DiscImageChef.Filters
|
||||
(header.version == AppleSingleVersion || header.version == AppleSingleVersion2);
|
||||
}
|
||||
|
||||
public virtual bool Identify(string path)
|
||||
public bool Identify(string path)
|
||||
{
|
||||
FileStream fstream = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
if(fstream.Length < 26) return false;
|
||||
@@ -197,12 +197,12 @@ namespace DiscImageChef.Filters
|
||||
(header.version == AppleSingleVersion || header.version == AppleSingleVersion2);
|
||||
}
|
||||
|
||||
public virtual bool IsOpened()
|
||||
public bool IsOpened()
|
||||
{
|
||||
return opened;
|
||||
}
|
||||
|
||||
public virtual void Open(byte[] buffer)
|
||||
public void Open(byte[] buffer)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream(buffer);
|
||||
ms.Seek(0, SeekOrigin.Begin);
|
||||
@@ -280,7 +280,7 @@ namespace DiscImageChef.Filters
|
||||
bytes = buffer;
|
||||
}
|
||||
|
||||
public virtual void Open(Stream stream)
|
||||
public void Open(Stream stream)
|
||||
{
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
@@ -357,7 +357,7 @@ namespace DiscImageChef.Filters
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
public virtual void Open(string path)
|
||||
public void Open(string path)
|
||||
{
|
||||
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
|
||||
fs.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
Reference in New Issue
Block a user