Code restyling.

This commit is contained in:
2020-02-29 18:03:35 +00:00
parent 4ea327f0c6
commit f7e173710e
855 changed files with 43605 additions and 38045 deletions

View File

@@ -31,8 +31,8 @@
// ****************************************************************************/
using System;
using Claunia.RsrcFork;
using Aaru.CommonTypes.Interfaces;
using Claunia.RsrcFork;
namespace Aaru.DiscImages
{
@@ -40,18 +40,26 @@ namespace Aaru.DiscImages
{
public bool Identify(IFilter imageFilter)
{
if(!imageFilter.HasResourceFork() || imageFilter.GetResourceForkLength() == 0) return false;
if(!imageFilter.HasResourceFork() ||
imageFilter.GetResourceForkLength() == 0)
return false;
try
{
ResourceFork rsrcFork = new ResourceFork(imageFilter.GetResourceForkStream());
if(!rsrcFork.ContainsKey(NDIF_RESOURCE)) return false;
var rsrcFork = new ResourceFork(imageFilter.GetResourceForkStream());
if(!rsrcFork.ContainsKey(NDIF_RESOURCE))
return false;
Resource rsrc = rsrcFork.GetResource(NDIF_RESOURCE);
if(rsrc.ContainsId(NDIF_RESOURCEID)) return true;
if(rsrc.ContainsId(NDIF_RESOURCEID))
return true;
}
catch(InvalidCastException)
{
return false;
}
catch(InvalidCastException) { return false; }
return false;
}