示例#1
0
        public virtual ModelNode GetWebWithDefaultListsAndContentTypes()
        {
            var webWithLists = new ModelNode {
                Value = new WebDefinition()
            };

            webWithLists
            .AddList(DynamicListModels.DocumentLibrary, list =>
            {
                list
                .AddContentTypeLink(DynamicContentTypeModels.DocumentContentType);
            })
            .AddList(DynamicListModels.AnnouncementsList)
            .AddList(DynamicListModels.ContactsList)
            .AddList(DynamicListModels.EventsList)
            .AddList(DynamicListModels.GenericList, list =>
            {
                list
                .AddContentTypeLink(DynamicContentTypeModels.ItemContentType)
                .AddContentTypeLink(DynamicContentTypeModels.LinkContentType);
            })
            .AddList(DynamicListModels.LinksList, list =>
            {
                list
                .AddContentTypeLink(DynamicContentTypeModels.LinkContentType);
            })
            .AddList(DynamicListModels.TasksList, list =>
            {
                list
                .AddContentTypeLink(DynamicContentTypeModels.TaskContentType);
            });

            return(webWithLists);
        }
示例#2
0
        public virtual ModelNode GetWebWithDefaultListsAndSecurityGroups()
        {
            var webWithLists = new ModelNode {
                Value = new WebDefinition()
            };

            webWithLists
            .AddList(DynamicListModels.DocumentLibrary, list =>
            {
                list
                .AddSecurityGroupLink(DynamicSecurityGroupModels.Contractors, group =>
                {
                    group
                    .AddSecurityRoleLink(DynamicSecurityRoleModels.ContractorRole)
                    .AddSecurityRoleLink(DynamicSecurityRoleModels.StudentRole);
                });
            })
            .AddList(DynamicListModels.AnnouncementsList)
            .AddList(DynamicListModels.ContactsList)
            .AddList(DynamicListModels.EventsList)
            .AddList(DynamicListModels.GenericList, list =>
            {
                list
                .AddSecurityGroupLink(DynamicSecurityGroupModels.Students, group =>
                {
                    group
                    .AddSecurityRoleLink(DynamicSecurityRoleModels.WorkerRole)
                    .AddSecurityRoleLink(DynamicSecurityRoleModels.StudentRole);
                });
            })
            .AddList(DynamicListModels.LinksList, list =>
            {
                list
                .AddSecurityGroupLink(DynamicSecurityGroupModels.Workers, group =>
                {
                    group
                    .AddSecurityRoleLink(DynamicSecurityRoleModels.WorkerRole)
                    .AddSecurityRoleLink(DynamicSecurityRoleModels.StudentRole);
                });
            })
            .AddList(DynamicListModels.TasksList, list =>
            {
            });

            return(webWithLists);
        }
示例#3
0
        public virtual ModelNode GetWebWithDefaultLists()
        {
            var webWithLists = new ModelNode {
                Value = new WebDefinition()
            };

            webWithLists
            .AddList(DynamicListModels.DocumentLibrary)
            .AddList(DynamicListModels.AnnouncementsList)
            .AddList(DynamicListModels.ContactsList)
            .AddList(DynamicListModels.EventsList)
            .AddList(DynamicListModels.GenericList)
            .AddList(DynamicListModels.LinksList)
            .AddList(DynamicListModels.TasksList);

            return(webWithLists);
        }
        public virtual ModelNode GetWebWithDefaultLists()
        {
            var webWithLists = new ModelNode { Value = new WebDefinition() };

            webWithLists
                .AddList(DynamicListModels.DocumentLibrary)
                .AddList(DynamicListModels.AnnouncementsList)
                .AddList(DynamicListModels.ContactsList)
                .AddList(DynamicListModels.EventsList)
                .AddList(DynamicListModels.GenericList)
                .AddList(DynamicListModels.LinksList)
                .AddList(DynamicListModels.TasksList);

            return webWithLists;
        }
        public virtual ModelNode GetWebWithDefaultListsContentTypesAndViews()
        {
            var webWithLists = new ModelNode { Value = new WebDefinition() };

            webWithLists
                .AddList(DynamicListModels.DocumentLibrary, list =>
                {
                    list
                       .AddContentTypeLink(DynamicContentTypeModels.DocumentContentType)
                       .AddView(DynamicListViewModels.AllDocuments);
                })
                .AddList(DynamicListModels.AnnouncementsList)
                .AddList(DynamicListModels.ContactsList)
                .AddList(DynamicListModels.EventsList)
                .AddList(DynamicListModels.GenericList, list =>
                {
                    list
                       .AddContentTypeLink(DynamicContentTypeModels.ItemContentType)
                       .AddContentTypeLink(DynamicContentTypeModels.LinkContentType)
                       .AddView(DynamicListViewModels.AllItems);
                })
                .AddList(DynamicListModels.LinksList, list =>
                {
                    list
                       .AddContentTypeLink(DynamicContentTypeModels.LinkContentType)
                       .AddView(DynamicListViewModels.AllItems);
                })
                .AddList(DynamicListModels.TasksList, list =>
                {
                    list
                    .AddContentTypeLink(DynamicContentTypeModels.TaskContentType)
                    .AddView(DynamicListViewModels.AllTasks);
                });

            return webWithLists;
        }
        public virtual ModelNode GetWebWithDefaultListsAndSecurityGroups()
        {
            var webWithLists = new ModelNode { Value = new WebDefinition() };

            webWithLists
                .AddList(DynamicListModels.DocumentLibrary, list =>
                {
                    list
                       .AddSecurityGroupLink(DynamicSecurityGroupModels.Contractors, group =>
                       {
                           group
                               .AddSecurityRoleLink(DynamicSecurityRoleModels.ContractorRole)
                               .AddSecurityRoleLink(DynamicSecurityRoleModels.StudentRole);
                       });
                })
                .AddList(DynamicListModels.AnnouncementsList)
                .AddList(DynamicListModels.ContactsList)
                .AddList(DynamicListModels.EventsList)
                .AddList(DynamicListModels.GenericList, list =>
                {
                    list
                       .AddSecurityGroupLink(DynamicSecurityGroupModels.Students, group =>
                       {
                           group
                               .AddSecurityRoleLink(DynamicSecurityRoleModels.WorkerRole)
                               .AddSecurityRoleLink(DynamicSecurityRoleModels.StudentRole);
                       });
                })
                .AddList(DynamicListModels.LinksList, list =>
                {
                    list
                      .AddSecurityGroupLink(DynamicSecurityGroupModels.Workers, group =>
                      {
                          group
                              .AddSecurityRoleLink(DynamicSecurityRoleModels.WorkerRole)
                              .AddSecurityRoleLink(DynamicSecurityRoleModels.StudentRole);
                      });
                })
                .AddList(DynamicListModels.TasksList, list =>
                {

                });

            return webWithLists;
        }