예제 #1
0
 //- ~CreateBlank -//
 internal static SequenceData CreateBlank()
 {
     var data = new SequenceData();
     data.ViewList = new ViewDataList();
     data.VersionList = new VersionDataList();
     data.Name = String.Empty;
     //+
     return data;
 }
예제 #2
0
 //- ~LoadSequenceData -//
 internal static void LoadSequenceData(SequenceDataList data, SequenceCollection collection)
 {
     List<SequenceElement> elementList = collection.ToList();
     foreach (SequenceElement element in elementList)
     {
         if (data.Any(p => p.Name == element.Name))
         {
             throw new ConfigurationErrorsException(String.Format(CultureInfo.CurrentCulture, Resource.Sequence_DuplicateNameInConfig, element.Name));
         }
         var sequenceData = new SequenceData
                            {
                                Name = element.Name
                            };
         sequenceData.ViewList = new ViewDataList();
         data.Add(sequenceData);
         foreach (ViewElement viewElement in element.Views)
         {
             var viewData = new ViewData
                            {
                                Name = viewElement.Name,
                                ViewUsed = viewElement.ViewUsed
                            };
             sequenceData.ViewList.Add(viewData);
         }
         sequenceData.VersionList = new VersionDataList();
         sequenceData.VersionList.ExplicitVersion = element.ExplicitVersion;
         foreach (VersionElement versionElement in element.Versions)
         {
             sequenceData.VersionList.Add(new VersionData
                                          {
                                              Name = versionElement.Name,
                                              Weight = versionElement.Weight
                                          });
         }
     }
 }