// note that we don't add more default parameters here // - otherwise this overrides the other existing methods public static void BindLanguage <TTarget>(this IMvxBindingContextOwner owner , TTarget target , string sourceKey) { var targetPath = MvxBindingSingletonCache.Instance?.DefaultBindingNameLookup.DefaultFor(typeof(TTarget)); owner.BindLanguage(target, targetPath, sourceKey); }
public static void BindLanguage(this IMvxBindingContextOwner owner , string targetPropertyName , string sourceKey , string sourcePropertyName = null , string fallbackValue = null , string converterName = null) { owner.BindLanguage(owner, targetPropertyName, sourceKey, sourcePropertyName, fallbackValue, converterName); }
public static void BindLanguage <TTarget>(this IMvxBindingContextOwner owner , TTarget target , string sourceKey , MvxBindingMode bindingMode) { var parser = PropertyExpressionParser; var targetPath = MvxBindingSingletonCache.Instance.DefaultBindingNameLookup.DefaultFor(typeof(TTarget)); owner.BindLanguage(target, targetPath, sourceKey, bindingMode: bindingMode); }
public static void BindLanguage <TTarget, TViewModel>(this IMvxBindingContextOwner owner , TTarget target , string sourceKey , Expression <Func <TViewModel, IMvxTextProvider> > textProvider) { var parser = PropertyExpressionParser; var targetPath = MvxBindingSingletonCache.Instance.DefaultBindingNameLookup.DefaultFor(typeof(TTarget)); var sourcePath = parser.Parse(textProvider).Print(); owner.BindLanguage(target, targetPath, sourceKey, sourcePath); }
public static void BindLanguage <TTarget>(this IMvxBindingContextOwner owner , TTarget target , Expression <Func <TTarget, object> > targetPropertyExpression , string sourceKey , string sourcePropertyName = null , string fallbackValue = null , string converterName = null) { var parser = PropertyExpressionParser; var parsedTargetPath = parser.Parse(targetPropertyExpression); var parsedTargetPathText = parsedTargetPath.Print(); owner.BindLanguage(target, parsedTargetPathText, sourceKey, sourcePropertyName, fallbackValue, converterName); }
public static void BindLanguage <TTarget, TViewModel>(this IMvxBindingContextOwner owner , TTarget target , Expression <Func <TTarget, object> > targetPropertyExpression , string sourceKey , Expression <Func <TViewModel, IMvxLanguageBinder> > sourcePropertyExpression , string fallbackValue = null , string converterName = null , MvxBindingMode bindingMode = MvxBindingMode.OneTime) { var parser = PropertyExpressionParser; var parsedTargetPath = parser.Parse(targetPropertyExpression); var parsedTargetPathText = parsedTargetPath.Print(); var parsedSourcePath = parser.Parse(sourcePropertyExpression); var sourcePropertyName = parsedSourcePath.Print(); owner.BindLanguage(target, parsedTargetPathText, sourceKey, sourcePropertyName, fallbackValue, converterName, bindingMode); }