/// <summary> /// Initializes a new instance of the <b>PagesController</b> class. /// </summary> /// <param name="structureInfo">The structure info.</param> /// <param name="currentPage">The current page.</param> /// <param name="session">The session.</param> /// <param name="content">The content.</param> public PagesController(IStructureInfo structureInfo, IPageModel currentPage, IDocumentSession session, IContent content) { _structureInfo = structureInfo; _currentPage = currentPage; _session = session; _content = content; }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.SecuredStructure == null)) { IStructureInfo securedStructureCasted = item.As <IStructureInfo>(); if ((securedStructureCasted != null)) { this._parent.SecuredStructure = securedStructureCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IStructureInfo structureInfosCasted = item.As <IStructureInfo>(); if ((structureInfosCasted != null)) { this._parent.StructureInfos.Add(structureInfosCasted); } IMountingPoint mountingPointsCasted = item.As <IMountingPoint>(); if ((mountingPointsCasted != null)) { this._parent.MountingPoints.Add(mountingPointsCasted); } }
public static string PageList(this HtmlHelper helper, IStructureInfo structureInfo, Func<IPageModel, MvcHtmlString> itemContent) { var node = structureInfo.Hierarchy.SingleOrDefault(x => x.Entity.Id == structureInfo.CurrentModel.Id); if(node == null || node.ChildNodes == null || node.ChildNodes.Count() == 0) { return string.Empty; } var sb = new StringBuilder(); sb.AppendLine("<table>"); foreach (var child in node.ChildNodes) { RenderLi(sb, "<li>{0}</li>", child.Entity, itemContent); } sb.AppendLine("</table>"); return sb.ToString(); }
/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { IStructureInfo structureInfoItem = item.As <IStructureInfo>(); if (((structureInfoItem != null) && this._parent.StructureInfos.Remove(structureInfoItem))) { return(true); } IMountingPoint mountingPointItem = item.As <IMountingPoint>(); if (((mountingPointItem != null) && this._parent.MountingPoints.Remove(mountingPointItem))) { return(true); } return(false); }
/// <summary> /// Applies the current structure info. /// </summary> /// <param name="data">The data.</param> /// <param name="structureInfo">The structure info.</param> /// <returns></returns> public static RouteData ApplyCurrentStructureInfo(this RouteData data, IStructureInfo structureInfo) { data.Values[PageRoute.StructureInfoKey] = structureInfo; return(data); }
public GuestBookController(IPageRepository pageRepository, IStructureInfo structureInfo,IPageModel currentPage) { _currentPage = currentPage as GuestBook; _pageRepository = pageRepository; _structureInfo = structureInfo; }
/// <summary> /// Initializes a new instance of the <b>PagesController</b> class. /// </summary> /// <param name="structureInfo">The structure info.</param> /// <param name="currentPage">The current page.</param> /// <param name="session">The session.</param> public PagesController(IStructureInfo structureInfo, IPage currentPage, IDocumentSession session) { _structureInfo = structureInfo; _currentPage = currentPage; _session = session; }
/// <summary> /// Initializes a new instance of the <see cref="WeblogController"/> class. /// </summary> /// <param name="structureInfo">The structure info.</param> public WeblogController(IStructureInfo structureInfo) { _structureInfo = structureInfo; }
public ImageGalleryController(IStructureInfo structureInfo) { _structureInfo = structureInfo; }
public PageController(IStructureInfo structureInfo) { _structureInfo = structureInfo; }
/// <summary> /// Initializes a new instance of the <see cref="WeblogController"/> class. /// </summary> /// <param name="structureInfo">The structure info.</param> public WeblogController(IStructureInfo structureInfo) { _structureInfo = structureInfo; }
/// <summary> /// Initializes a new instance of the <see cref="PageController"/> class. /// </summary> /// <param name="currentPage">The current page.</param> /// <param name="structureInfo">The structure info.</param> public PageController(Page currentPage, IStructureInfo structureInfo) { _currentPage = currentPage; _structureInfo = structureInfo; }
/// <summary> /// Initializes a new instance of the <see cref="HomeController"/> class. /// </summary> /// <param name="documentSession">The documentSession.</param> /// <param name="structureInfo">The structure info.</param> public HomeController(IDocumentSession documentSession, IStructureInfo structureInfo) { _documentSession = documentSession; _structureInfo = structureInfo; }
/// <summary> /// Creates a new observable property access proxy /// </summary> /// <param name="modelElement">The model instance element for which to create the property access proxy</param> public MaterialKindProxy(IStructureInfo modelElement) : base(modelElement, "materialKind") { }
/// <summary> /// Initializes a new instance of the <see cref="HomeController"/> class. /// </summary> /// <param name="documentSession">The documentSession.</param> /// <param name="structureInfo">The structure info.</param> public HomeController(IDocumentSession documentSession, IStructureInfo structureInfo) { _documentSession = documentSession; _structureInfo = structureInfo; }
/// <summary> /// Initializes a new instance of the <see cref="ContactController"/> class. /// </summary> /// <param name="structureInfo">The structure info.</param> public ContactController(IStructureInfo structureInfo) { _structureInfo = structureInfo; }
/// <summary> /// Initializes a new instance of the <see cref="PortfolioController"/> class. /// </summary> /// <param name="structureInfo">The structure info.</param> public PortfolioController(IStructureInfo structureInfo) { _structureInfo = structureInfo; }
/// <summary> /// Initializes a new instance of the <see cref="PortfolioController"/> class. /// </summary> /// <param name="structureInfo">The structure info.</param> public PortfolioController(IStructureInfo structureInfo) { _structureInfo = structureInfo; }
/// <summary> /// Initializes a new instance of the <see cref="ContactController"/> class. /// </summary> /// <param name="structureInfo">The structure info.</param> public ContactController(IStructureInfo structureInfo) { _structureInfo = structureInfo; }
public AjaxController(IStructureInfo structureInfo) { _structureInfo = structureInfo; }
/// <summary> /// Initializes a new instance of the <see cref="PageController"/> class. /// </summary> /// <param name="currentPage">The current page.</param> /// <param name="structureInfo">The structure info.</param> public PageController(Page currentPage, IStructureInfo structureInfo) { _currentPage = currentPage; _structureInfo = structureInfo; }