Example #1
0
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

        /// <summary>
        /// Gets the destination current value.
        /// </summary>
        /// <param name="source">The node for which the value is requested.</param>
        public virtual TValue GetDestinationObject(TSource source)
        {
            TValue Result = TemplateHelper.GetPropertyPathValue <TSource, TValue>(source, StartingPoint, PropertyPath, out bool IsInterrupted);

            Debug.Assert(!IsInterrupted);

            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);
        }
Example #3
0
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

        /// <summary>
        /// Gets the source's current value.
        /// </summary>
        /// <param name="source">The node for which the value is requested.</param>
        /// <param name="isInterrupted">True is progressing through the path was interrupted.</param>
        public virtual TValue GetSourceObject(TSource source, out bool isInterrupted)
        {
            return(TemplateHelper.GetPropertyPathValue <TSource, TValue>(source, StartingPoint, PropertyPath, out isInterrupted));
        }