Fix silly if statement.
This commit is contained in:
parent
a89e51f5e7
commit
1060d7d73c
@ -47,10 +47,7 @@ namespace ReMime.Platform
|
|||||||
|
|
||||||
public bool TryResolve(string extension, out MediaType? mediaType)
|
public bool TryResolve(string extension, out MediaType? mediaType)
|
||||||
{
|
{
|
||||||
if (_extensionsMap.TryGetValue(extension, out mediaType))
|
return _extensionsMap.TryGetValue(extension, out mediaType);
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly char[] s_delimeters = new char[] { '\t', ' ' };
|
private static readonly char[] s_delimeters = new char[] { '\t', ' ' };
|
||||||
|
@ -52,15 +52,7 @@ namespace ReMime.Platform
|
|||||||
|
|
||||||
public bool TryResolve(string extension, out MediaType? mediaType)
|
public bool TryResolve(string extension, out MediaType? mediaType)
|
||||||
{
|
{
|
||||||
if (_extensionsMap.TryGetValue(extension, out mediaType))
|
return _extensionsMap.TryGetValue(extension, out mediaType);
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mediaType = null;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user