public virtual object ResolveBinding() { try { return(BindingDefinition?.ResolveBinding(DataSource)); } catch (Exception ex) { string message = $"Can't resolve binding for 'BindingDefinition' '{Name}': {ex.Message.EmptyIfNull()}"; log.LogException(LogType.Error, ex, message); return("##Binding Error##"); } }
public object ResolveBinding(object dataSource) { if (dataSource == null) { return(null); } if (BindingDefinition == null) { return(dataSource); } if (BindingDefinition.IsOptional) { BindingDefinition = (BindingDefinition as BindingDefinitionOptional).CreateRealBindingDefinition(dataSource.GetType()); } return(BindingDefinition.ResolveBinding(dataSource)); }