예제 #1
0
        public void Delete()
        {
            if (pageDefinition.IsNull())
            {
                return;
            }

            log.DebugFormat("Deleting page definition named {0} from page type with id {1}",
                            pageDefinition.Name,
                            pageDefinition.PageTypeID);
            context.PageDefinitionRepository.Delete(pageDefinition);
        }
예제 #2
0
        public PageDefinitionAction PageDefinition(string name)
        {
            PageDefinition pageDefinition = null;

            if (pageType.IsNotNull())
            {
                pageDefinition = pageType.Definitions.Find(d => d.Name == name);
                if (pageDefinition.IsNull())
                {
                    log.WarnFormat(
                        "Tried to retrieve page definition named {0} from page type {1} but the page type"
                        + " does not have a page definition by that name.",
                        name,
                        pageDefinition);
                }
            }

            return(new PageDefinitionAction(pageDefinition, context));
        }