Esempio n. 1
0
 public static Sequential Load(string folderName, string urlName, EdxLoadOptions options)
 {
     return(Load <Sequential>(folderName, "sequential", urlName, options, seq =>
     {
         seq.Verticals = seq.VerticalReferences.Select(x => Vertical.Load(folderName, x.UrlName, options)).ExceptNulls().ToArray();
         seq.VerticalReferences = seq.Verticals.Select(v => v.GetReference()).ToArray();
     }));
 }
Esempio n. 2
0
 public static Sequential Load(string folderName, string urlName)
 {
     try
     {
         var sequential = new FileInfo(string.Format("{0}/sequential/{1}.xml", folderName, urlName)).DeserializeXml <Sequential>();
         sequential.UrlName   = urlName;
         sequential.Verticals = sequential.VerticalReferences.Select(x => Vertical.Load(folderName, x.UrlName)).ToArray();
         return(sequential);
     }
     catch (Exception e)
     {
         throw new Exception(string.Format("Sequential {0} load error", urlName), e);
     }
 }