示例#1
0
 /// <summary>
 /// Creates dependency chain of <see cref="DependencyNode{T}"/> instances for a given
 /// expression.
 /// </summary>
 /// <typeparam name="T">The type of the expression's compiled return value.</typeparam>
 /// <param name="settings">Settings that define the dependency graph, change listeners
 /// and monitoring behaviour.</param>
 /// <returns>The root dependency node, that links to the targeted item.</returns>
 public static DependencyNode <T> Create <T>(DependencyNodeSettings <T> settings)
 {
     return(DependencyBuilder.CreateDependency(settings));
 }
示例#2
0
 /// <summary>
 /// Creates dependency chain of <see cref="DependencyNode{T}"/> instances for a given
 /// expression.
 /// </summary>
 /// <typeparam name="T">The type of the expression's compiled return value.</typeparam>
 /// <param name="target">The expression that declares the dependency chain from root
 /// to the target item or value.</param>
 /// <param name="changeHandler">An optional event listener that is being invoked if the
 /// target value changes either through direct change, or because the dependency graph
 /// was changed because of a changed intermediary node.</param>
 /// <returns>The root dependency node, that links to the targeted item.</returns>
 /// <exception cref="ArgumentNullException">If <paramref name="target"/>
 /// is a null reference.</exception>
 public static DependencyNode <T> Create <T>(Expression <Func <T> > target,
                                             EventHandler <DependencyChangeEventArgs <T> > changeHandler)
 {
     return(DependencyBuilder.CreateDependency(target, changeHandler));
 }