Version 3.0.0.2

BaseValueResolver<TResolver, TContext, TResult> class

Namespace: Sirenix.OdinInspector.Editor.ValueResolver
Assembly: Sirenix.OdinInspector.Editor
public abstract class BaseValueResolver<TResolver, TContext, TResult> : IValueResolver<TContext, TResult>, IValueResolver<TResult>, IValueResolver where TResolver : BaseValueResolver<TResolver, TContext, TResult> where TContext : ResolverContext
Inheritance
  • System.Object
  • BaseValueResolver<TResolver, TContext, TResult>

Type Parameters

TResolver

TContext

TResult

Constructors

BaseValueResolver(ValueResolverSettings)
public BaseValueResolver(ValueResolverSettings settings)
Parameters
ValueResolverSettings settings

Properties

ContextType
public Type ContextType { get; }
Count
public int Count { get; }
ResultType
public Type ResultType { get; }

Methods

Add(ProviderEvaluator<TContext, TResult>)
public TResolver Add(ProviderEvaluator<TContext, TResult> resolver)
Parameters
ProviderEvaluator<TContext, TResult> resolver

Returns
TResolver

CatchFailures()
public TResolver CatchFailures()
Returns
TResolver

ConstantRaw(TResult)
public TResolver ConstantRaw(TResult value)
Parameters
TResult value

Returns
TResolver

ConstantValue(Func<TContext, TResult>)
public TResolver ConstantValue(Func<TContext, TResult> getValue)
Parameters
System.Func<TContext, TResult> getValue

Returns
TResolver

Func(Func<TContext, TResult>)
public TResolver Func(Func<TContext, TResult> getValue)
Parameters
System.Func<TContext, TResult> getValue

Returns
TResolver

Resolve(TContext, String)
public ValueProvider<TResult> Resolve(TContext context, string reference)
Parameters
TContext context

System.String reference

Returns
ValueProvider<TResult>

Resolve(TContext, String, TResult)
public ValueProvider<TResult> Resolve(TContext context, string reference, TResult defaultValue)
Parameters
TContext context

System.String reference

TResult defaultValue

Returns
ValueProvider<TResult>

TryExpression()
public TResolver TryExpression()
Returns
TResolver

TryMemberReference()
public TResolver TryMemberReference()
Returns
TResolver

TryMethodReference()
public TResolver TryMethodReference()
Returns
TResolver

TryMethodReference(Type, Func<TContext, Func<Object, TResult>, TResult>)
public TResolver TryMethodReference(Type param, Func<TContext, Func<object, TResult>, TResult> callMethod)
Parameters
System.Type param

System.Func<TContext, System.Func<System.Object, TResult>, TResult> callMethod

Returns
TResolver

TryMethodReference<TParam>(Func<TContext, Func<TParam, TResult>, TResult>)
public TResolver TryMethodReference<TParam>(Func<TContext, Func<TParam, TResult>, TResult> callMethod)
Parameters
System.Func<TContext, System.Func<TParam, TResult>, TResult> callMethod

Returns
TResolver

Type Parameters
TParam

TryMethodReference<TParam1, TParam2>(Func<TContext, Func<TParam1, TParam2, TResult>, TResult>)
public TResolver TryMethodReference<TParam1, TParam2>(Func<TContext, Func<TParam1, TParam2, TResult>, TResult> callMethod)
Parameters
System.Func<TContext, System.Func<TParam1, TParam2, TResult>, TResult> callMethod

Returns
TResolver

Type Parameters
TParam1

TParam2