SenseNet.ContentRepository.Storage.AppModel.ApplicationResolver.ResolveFirstByPaths C# (CSharp) Метод

ResolveFirstByPaths() статический приватный Метод

static private ResolveFirstByPaths ( IEnumerable paths ) : NodeHead
paths IEnumerable
Результат NodeHead
        internal static NodeHead ResolveFirstByPaths(IEnumerable<string> paths)
        {
            if (StorageContext.Search.IsOuterEngineEnabled)
                return ResolveFirstByPathsFromIndexedEngine(paths);

            var script = DataProvider.GetAppModelScript(paths, false, false);

            var proc = DataProvider.CreateDataProcedure(script);
            proc.CommandType = System.Data.CommandType.Text;

            using (var reader = proc.ExecuteReader())
            {
                while (reader.Read())
                    return NodeHead.Get(reader.GetInt32(0));
            }
            return null;
        }
        private static NodeHead ResolveFirstByPathsFromIndexedEngine(IEnumerable<string> paths)

Usage Example

Пример #1
0
 public NodeHead ResolveFirstByPaths(IEnumerable <string> paths)
 {
     if (UseCache && AppCache != null)
     {
         return(ResolveByPathsFromCache(paths, false, false).FirstOrDefault());
     }
     return(ApplicationResolver.ResolveFirstByPaths(paths));
 }