/// <summary> /// Gets the starting point. /// </summary> /// <param name="source">The node for which a value is requested.</param> public virtual ISource GetStart(TSource source) { INodeWithResult Result = null; if (source.EmbeddingFeature is IPropertyFeature AsPropertyFeature) { Result = AsPropertyFeature; } else if (source.EmbeddingFeature is IIndexerFeature AsIndexerFeature) { Result = AsIndexerFeature; } else if (source.EmbeddingOverload is IQueryOverload AsQueryOverload) { Result = AsQueryOverload; } return(Result); }
/// <summary> /// Checks if a node source is ready. /// </summary> /// <param name="node">The node for which the value is checked.</param> /// <param name="data">Optional data returned to the caller.</param> public override bool IsReady(TSource node, out object data) { data = null; bool Result = false; INodeWithResult EmbeddingNode = StartingPoint.GetStart(node) as INodeWithResult; if (EmbeddingNode != null) { OnceReference <TRef> Value = TemplateHelper.GetPropertyPathValue <INodeWithResult, OnceReference <TRef> >(EmbeddingNode, TemplateNodeStart <INodeWithResult> .Default, PropertyPath, out bool IsInterrupted); if (!IsInterrupted && Value.IsAssigned) { data = Value.Item; Result = true; } } else { Result = true; } return(Result); }