refactor: Update Unity to 2022.3.62
This commit is contained in:
@@ -8,15 +8,15 @@ namespace Cryville.Crtr.Browsing.Actions {
|
||||
public abstract bool CanInvoke(Uri uri, T resource);
|
||||
public bool CanInvoke(Uri uri, IResourceMeta resource) {
|
||||
if (resource == null) throw new ArgumentNullException("resource");
|
||||
if (!(resource is T)) throw new ArgumentException("Mismatched resource type.");
|
||||
return CanInvoke(uri, (T)resource);
|
||||
if (resource is not T res) throw new ArgumentException("Mismatched resource type.");
|
||||
return CanInvoke(uri, res);
|
||||
}
|
||||
|
||||
public abstract void Invoke(Uri uri, T resource);
|
||||
public void Invoke(Uri uri, IResourceMeta resource) {
|
||||
if (resource == null) throw new ArgumentNullException("resource");
|
||||
if (!(resource is T)) throw new ArgumentException("Mismatched resource type.");
|
||||
Invoke(uri, (T)resource);
|
||||
if (resource is not T res) throw new ArgumentException("Mismatched resource type.");
|
||||
Invoke(uri, res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user