mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-23 08:48:21 -05:00
32 lines
956 B
C#
32 lines
956 B
C#
|
using JetBrains.Annotations;
|
|||
|
|
|||
|
namespace TriInspector.Resolvers
|
|||
|
{
|
|||
|
public abstract class ActionResolver
|
|||
|
{
|
|||
|
public static ActionResolver Resolve(TriPropertyDefinition propertyDefinition, string method)
|
|||
|
{
|
|||
|
if (InstanceActionResolver.TryResolve(propertyDefinition, method, out var iar))
|
|||
|
{
|
|||
|
return iar;
|
|||
|
}
|
|||
|
|
|||
|
return new ErrorActionResolver(propertyDefinition, method);
|
|||
|
}
|
|||
|
|
|||
|
[PublicAPI]
|
|||
|
public abstract bool TryGetErrorString(out string error);
|
|||
|
|
|||
|
[PublicAPI]
|
|||
|
public abstract void InvokeForTarget(TriProperty property, int targetIndex);
|
|||
|
|
|||
|
[PublicAPI]
|
|||
|
public void InvokeForAllTargets(TriProperty property)
|
|||
|
{
|
|||
|
for (var targetIndex = 0; targetIndex < property.PropertyTree.TargetObjects.Length; targetIndex++)
|
|||
|
{
|
|||
|
InvokeForTarget(property, targetIndex);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|