Ejemplo n.º 1
0
        private static void InitBlogGroupActivityImageGroupCollectionsOnce()
        {
            var blogsGroupsActivities = GetAllInformationObjects(null, io => io is Activity || io is Blog || io is GroupContainer).ToArray();
            var blogs           = blogsGroupsActivities.Where(ba => ba is Blog).Cast <Blog>().ToArray();
            var activities      = blogsGroupsActivities.Where(ba => ba is Activity).Cast <Activity>().ToArray();
            var groupContainers = blogsGroupsActivities.Where(ba => ba is GroupContainer).Cast <GroupContainer>().ToArray();

            foreach (var blog in blogs.Where(bl => bl.ImageGroupCollection == null))
            {
                blog.ImageGroupCollection = ImageGroupCollection.CreateDefault();
                blog.StoreInformation();
                blog.ReconnectMastersAndCollections(false);
            }
            foreach (var activity in activities.Where(act => act.ImageGroupCollection == null))
            {
                activity.ImageGroupCollection = ImageGroupCollection.CreateDefault();
                activity.StoreInformation();
                activity.ReconnectMastersAndCollections(false);
            }
            foreach (var groupContainer in groupContainers.Where(grpC => grpC.ImageGroupCollection == null))
            {
                groupContainer.ImageGroupCollection = ImageGroupCollection.CreateDefault();
                groupContainer.StoreInformation();
                groupContainer.ReconnectMastersAndCollections(false);
            }
        }
Ejemplo n.º 2
0
 internal static void Update_Activity_ImageSets(Activity activity, ImageGroupCollection localCollection, ImageGroupCollection masterCollection)
 {
     localCollection.CollectionContent = masterCollection.CollectionContent;
     if (localCollection.OrderFilterIDList == null)
     {
         localCollection.OrderFilterIDList = new List <string>();
     }
 }
 internal static void Update_Activity_ImageGroupCollection(Activity activity, ImageGroupCollection localCollection, ImageGroupCollection masterCollection)
 {
     if (localCollection == null)
     {
         activity.ImageGroupCollection = ImageGroupCollection.CreateDefault();
         localCollection = activity.ImageGroupCollection;
     }
     localCollection.CollectionContent = masterCollection.CollectionContent;
     if (localCollection.OrderFilterIDList == null)
         localCollection.OrderFilterIDList = new List<string>();
 }
Ejemplo n.º 4
0
 internal static void Update_Activity_ImageGroupCollection(Activity activity, ImageGroupCollection localCollection, ImageGroupCollection masterCollection)
 {
     if (localCollection == null)
     {
         activity.ImageGroupCollection = ImageGroupCollection.CreateDefault();
         localCollection = activity.ImageGroupCollection;
     }
     localCollection.CollectionContent = masterCollection.CollectionContent;
     if (localCollection.OrderFilterIDList == null)
     {
         localCollection.OrderFilterIDList = new List <string>();
     }
 }
Ejemplo n.º 5
0
 internal static void Update_Blog_ImageGroupCollection(Blog blog, ImageGroupCollection localCollection, ImageGroupCollection masterCollection)
 {
     if (localCollection == null)
     {
         blog.ImageGroupCollection = ImageGroupCollection.CreateDefault();
         localCollection           = blog.ImageGroupCollection;
     }
     localCollection.CollectionContent = masterCollection.CollectionContent;
     if (localCollection.OrderFilterIDList == null)
     {
         localCollection.OrderFilterIDList = new List <string>();
     }
 }
Ejemplo n.º 6
0
 internal static void Update_GroupContainer_ImageGroupCollection(GroupContainer groupContainer, ImageGroupCollection localCollection, ImageGroupCollection masterCollection)
 {
     if (localCollection == null)
     {
         groupContainer.ImageGroupCollection = ImageGroupCollection.CreateDefault();
         localCollection = groupContainer.ImageGroupCollection;
     }
     localCollection.CollectionContent = masterCollection.CollectionContent;
     if (localCollection.OrderFilterIDList == null)
     {
         localCollection.OrderFilterIDList = new List <string>();
     }
 }
Ejemplo n.º 7
0
 internal static void Update_ImageGroupContainer_ImageGroups(ImageGroupContainer imageGroupContainer, ImageGroupCollection localCollection, ImageGroupCollection masterCollection)
 {
     localCollection.CollectionContent = masterCollection.CollectionContent;
     if (localCollection.OrderFilterIDList == null)
     {
         localCollection.OrderFilterIDList = new List <string>();
     }
 }
 internal static void Update_ImageGroupContainer_ImageGroups(ImageGroupContainer imageGroupContainer, ImageGroupCollection localCollection, ImageGroupCollection masterCollection)
 {
     localCollection.CollectionContent = masterCollection.CollectionContent;
     if (localCollection.OrderFilterIDList == null)
         localCollection.OrderFilterIDList = new List<string>();
 }
 internal static void Update_Group_ImageSets(Group group, ImageGroupCollection localCollection, ImageGroupCollection masterCollection)
 {
     localCollection.CollectionContent = masterCollection.CollectionContent;
     if (localCollection.OrderFilterIDList == null)
         localCollection.OrderFilterIDList = new List<string>();
 }
Ejemplo n.º 10
0
 internal static void Update_GroupContainer_ImageGroupCollection(GroupContainer groupContainer, ImageGroupCollection localCollection, ImageGroupCollection masterCollection)
 {
     if(localCollection == null)
     {
         groupContainer.ImageGroupCollection = ImageGroupCollection.CreateDefault();
         localCollection = groupContainer.ImageGroupCollection;
     }
     localCollection.CollectionContent = masterCollection.CollectionContent;
     if(localCollection.OrderFilterIDList == null)
         localCollection.OrderFilterIDList = new List<string>();
 }
Ejemplo n.º 11
0
 internal static void Update_Blog_ImageGroupCollection(Blog blog, ImageGroupCollection localCollection, ImageGroupCollection masterCollection)
 {
     if (localCollection == null)
     {
         blog.ImageGroupCollection = ImageGroupCollection.CreateDefault();
         localCollection = blog.ImageGroupCollection;
     }
     localCollection.CollectionContent = masterCollection.CollectionContent;
     if (localCollection.OrderFilterIDList == null)
         localCollection.OrderFilterIDList = new List<string>();
 }