using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace ScriptNET.Runtime
{
///
/// Public interface for Object Bind. It is used to bind arguments to:
/// * indexers
/// * constructors
/// * methods
/// * interfaces
///
public interface IObjectBinder
{
///
/// Binds to constructor
///
///
///
///
IObjectBind BindToConstructor(Type target, object[] arguments);
///
/// Binds to method
///
///
///
///
///
///
IObjectBind BindToMethod(object target, string methodName, Type[] genericParameters, object[] arguments);
///
/// Binds to method
///
///
///
///
///
IObjectBind BindToMethod(object target, MethodInfo method, object[] arguments);
///
/// Binds to Field, Property of Event of a given object
///
///
///
///
IMemberBind BindToMember(object target, string memberName, bool throwNotFound);
///
/// Binds to the indexer property
///
/// target object
/// parameters
/// if true binds to setter, elsewise binds to getter
/// IObjectBind or null
IObjectBind BindToIndex(object target, object[] arguments, bool setter);
//object Get(string name, object instance, bool throwNotFound, params object[] arguments);
//object Set(string name, object instance, object value, bool throwNotFound, params object[] arguments);
///
/// Converts value to target type
///
///
///
///
object ConvertTo(object value, Type targetType);
///
/// Evaluates if object binder could run binding procedure for the given member.
/// Default object binders uses BindableAttribute.
///
///
///
bool CanBind(MemberInfo member);
}
}