//using Loxodon.Framework.Binding.Contexts; //using Loxodon.Framework.Binding.Converters; //using System; //namespace Loxodon.Framework.Binding.Builder //{ // public class ILRuntimeBindingBuilder : BindingBuilderBase where TTarget : class // { // //private static readonly ILog log = LogManager.GetLogger(typeof(ILRuntimeBindingBuilder)); // public ILRuntimeBindingBuilder(IBindingContext context, TTarget target) : base(context, target) // { // } // public ILRuntimeBindingBuilder For(string targetName) // { // this.description.TargetName = targetName; // this.description.UpdateTrigger = null; // return this; // } // public ILRuntimeBindingBuilder For(string targetName, string updateTrigger) // { // this.description.TargetName = targetName; // this.description.UpdateTrigger = updateTrigger; // return this; // } // public ILRuntimeBindingBuilder To(string path) // { // this.SetMemberPath(path); // return this; // } // public ILRuntimeBindingBuilder ToExpression(Func expression, params string[] paths) // { // //this.SetExpression(expression); // this.OneWay(); // return this; // } // public ILRuntimeBindingBuilder ToExpression(Func expression) // { // //this.SetExpression(expression); // this.OneWay(); // return this; // } // public ILRuntimeBindingBuilder ToStatic(string path) // { // this.SetStaticMemberPath(path); // return this; // } // public ILRuntimeBindingBuilder ToValue(object value) // { // this.SetLiteral(value); // return this; // } // public ILRuntimeBindingBuilder TwoWay() // { // this.SetMode(BindingMode.TwoWay); // return this; // } // public ILRuntimeBindingBuilder OneWay() // { // this.SetMode(BindingMode.OneWay); // return this; // } // public ILRuntimeBindingBuilder OneWayToSource() // { // this.SetMode(BindingMode.OneWayToSource); // return this; // } // public ILRuntimeBindingBuilder OneTime() // { // this.SetMode(BindingMode.OneTime); // return this; // } // public ILRuntimeBindingBuilder CommandParameter(object parameter) // { // this.SetCommandParameter(parameter); // return this; // } // public ILRuntimeBindingBuilder WithConversion(string converterName) // { // var converter = this.ConverterByName(converterName); // return this.WithConversion(converter); // } // public ILRuntimeBindingBuilder WithConversion(IConverter converter) // { // this.description.Converter = converter; // return this; // } // public ILRuntimeBindingBuilder WithScopeKey(object scopeKey) // { // this.SetScopeKey(scopeKey); // return this; // } // } // // public class BindingBuilder : BindingBuilderBase where TTarget : class // // { // // //private static readonly ILog log = LogManager.GetLogger(typeof(BindingBuilder)); // // public BindingBuilder(IBindingContext context, TTarget target) : base(context, target) // // { // // } // // public BindingBuilder For(string targetPropertyName) // // { // // this.description.TargetName = targetPropertyName; // // this.description.UpdateTrigger = null; // // return this; // // } // // public BindingBuilder For(string targetPropertyName, string updateTrigger) // // { // // this.description.TargetName = targetPropertyName; // // this.description.UpdateTrigger = updateTrigger; // // return this; // // } // // public BindingBuilder For(Expression> memberExpression) // // { // // string targetName = this.PathParser.ParseMemberName(memberExpression); // // this.description.TargetName = targetName; // // this.description.UpdateTrigger = null; // // return this; // // } // // public BindingBuilder For(Expression> memberExpression, string updateTrigger) // // { // // string targetName = this.PathParser.ParseMemberName(memberExpression); // // this.description.TargetName = targetName; // // this.description.UpdateTrigger = updateTrigger; // // return this; // // } // // public BindingBuilder For(Expression> memberExpression, Expression> updateTriggerExpression) // // { // // string targetName = this.PathParser.ParseMemberName(memberExpression); // // string updateTrigger = this.PathParser.ParseMemberName(updateTriggerExpression); // // this.description.TargetName = targetName; // // this.description.UpdateTrigger = updateTrigger; // // return this; // // } // // public BindingBuilder For(Expression>> memberExpression) // // { // // string targetName = this.PathParser.ParseMemberName(memberExpression); // // this.description.TargetName = targetName; // // this.description.UpdateTrigger = null; // // this.OneWayToSource(); // // return this; // // } // //#if UNITY_2019_1_OR_NEWER // // public BindingBuilder For(Expression> memberExpression, Expression>, bool>>> updateTriggerExpression) // // { // // string targetName = this.PathParser.ParseMemberName(memberExpression); // // string updateTrigger = this.PathParser.ParseMemberName(updateTriggerExpression); // // this.description.TargetName = targetName; // // this.description.UpdateTrigger = updateTrigger; // // return this; // // } // // public BindingBuilder For(Expression>, bool>>> memberExpression) // // { // // string targetName = this.PathParser.ParseMemberName(memberExpression); // // this.description.TargetName = targetName; // // this.description.UpdateTrigger = null; // // this.OneWayToSource(); // // return this; // // } // //#endif // // public BindingBuilder To(string path) // // { // // this.SetStaticMemberPath(path); // // this.OneWay(); // // return this; // // } // // public BindingBuilder To(Expression> path) // // { // // this.SetStaticMemberPath(this.PathParser.ParseStaticPath(path)); // // this.OneWay(); // // return this; // // } // // public BindingBuilder To(Expression>> path) // // { // // this.SetStaticMemberPath(this.PathParser.ParseStaticPath(path)); // // return this; // // } // // public BindingBuilder To(Expression> path) // // { // // this.SetStaticMemberPath(this.PathParser.ParseStaticPath(path)); // // return this; // // } // // public BindingBuilder ToValue(object value) // // { // // this.SetLiteral(value); // // return this; // // } // // public BindingBuilder ToExpression(Expression> expression) // // { // // this.SetExpression(expression); // // this.OneWay(); // // return this; // // } // // public BindingBuilder TwoWay() // // { // // this.SetMode(BindingMode.TwoWay); // // return this; // // } // // public BindingBuilder OneWay() // // { // // this.SetMode(BindingMode.OneWay); // // return this; // // } // // public BindingBuilder OneWayToSource() // // { // // this.SetMode(BindingMode.OneWayToSource); // // return this; // // } // // public BindingBuilder OneTime() // // { // // this.SetMode(BindingMode.OneTime); // // return this; // // } // // public BindingBuilder CommandParameter(object parameter) // // { // // this.SetCommandParameter(parameter); // // return this; // // } // // public BindingBuilder WithConversion(string converterName) // // { // // var converter = ConverterByName(converterName); // // return this.WithConversion(converter); // // } // // public BindingBuilder WithConversion(IConverter converter) // // { // // this.description.Converter = converter; // // return this; // // } // // public BindingBuilder WithScopeKey(object scopeKey) // // { // // this.SetScopeKey(scopeKey); // // return this; // // } // // } // //public class BindingBuilder : BindingBuilderBase // //{ // // //private static readonly ILog log = LogManager.GetLogger(typeof(BindingBuilder)); // // public BindingBuilder(IBindingContext context, object target) : base(context, target) // // { // // } // // public BindingBuilder For(string targetName, string updateTrigger = null) // // { // // this.description.TargetName = targetName; // // this.description.UpdateTrigger = updateTrigger; // // return this; // // } // // public BindingBuilder To(string path) // // { // // this.SetMemberPath(path); // // return this; // // } // // public BindingBuilder ToStatic(string path) // // { // // this.SetStaticMemberPath(path); // // return this; // // } // // public BindingBuilder ToValue(object value) // // { // // this.SetLiteral(value); // // return this; // // } // // public BindingBuilder TwoWay() // // { // // this.SetMode(BindingMode.TwoWay); // // return this; // // } // // public BindingBuilder OneWay() // // { // // this.SetMode(BindingMode.OneWay); // // return this; // // } // // public BindingBuilder OneWayToSource() // // { // // this.SetMode(BindingMode.OneWayToSource); // // return this; // // } // // public BindingBuilder OneTime() // // { // // this.SetMode(BindingMode.OneTime); // // return this; // // } // // public BindingBuilder CommandParameter(object parameter) // // { // // this.SetCommandParameter(parameter); // // return this; // // } // // public BindingBuilder WithConversion(string converterName) // // { // // var converter = this.ConverterByName(converterName); // // return this.WithConversion(converter); // // } // // public BindingBuilder WithConversion(IConverter converter) // // { // // this.description.Converter = converter; // // return this; // // } // // public BindingBuilder WithScopeKey(object scopeKey) // // { // // this.SetScopeKey(scopeKey); // // return this; // // } // //} //}