/// <summary>
        /// Get the result of the CSharp code for the start node query
        /// </summary>
        /// <param name="dataTypeId"> </param>
        /// <param name="ds"></param>
        /// <param name="nodeId"></param>
        /// <param name="backOfficeRequestContext"> </param>
        /// <returns></returns>
        internal static HiveId GetStartNodeQueryResult(IBackOfficeRequestContext backOfficeRequestContext, HiveId dataTypeId, INodeSelectorDataSource ds, HiveId nodeId)
        {
            var virtualPathId = SetupCodeDelegateForQuery(backOfficeRequestContext, dataTypeId);

            var instance = GetClassInstance <AbstractStartNodeQuery>(virtualPathId);

            if (instance != null)
            {
                var entity = ds.GetEntity(nodeId);
                var root   = ds.GetEntity(ds.GetRootNodeId());
                return(instance.StartNodeId(backOfficeRequestContext, entity, root));
            }
            return(HiveId.Empty);
        }
        /// <summary>
        /// Get the result of the CSharp code for the node filter
        /// </summary>
        /// <param name="dataTypeId"> </param>
        /// <param name="ds"></param>
        /// <param name="nodeId"></param>
        /// <param name="backOfficeRequestContext"> </param>
        /// <returns></returns>
        internal static bool GetNodeFilterResult(IBackOfficeRequestContext backOfficeRequestContext, HiveId dataTypeId, INodeSelectorDataSource ds, HiveId nodeId)
        {
            var virtualPathId = SetupCodeDelegateForFilter(backOfficeRequestContext, dataTypeId);

            var instance = GetClassInstance <AbstractNodeFilter>(virtualPathId);

            if (instance != null)
            {
                var entity = ds.GetEntity(nodeId);
                return(instance.IsMatch(backOfficeRequestContext, entity));
            }
            return(true);
        }