internal ResponseRendering AddRendering(Item contextItem, LayoutDefinition layoutDefinition, ResponseRendering responseRendering) { var placeholder = _Placeholders.SingleOrDefault(p => p.Name == responseRendering.PlaceholderName); if (placeholder == null) { // TODO: but this would be a NOT FOUND situation? // - basically this means that that placeholder wasn't really on that rendering // - we // TODO: UniqueId isn't the Guid this goes into, it's the Guid of what this is. Or what happened to be the first one found! It needs to be PARENT placeholder = new ResponsePlaceholder(contextItem, layoutDefinition, responseRendering.PlaceholderName, ParentUniqueId, false); _Placeholders.Add(placeholder); } var rendering = placeholder.AddRendering(responseRendering); return(rendering); }
internal ResponseRendering AddRendering(Item contextItem, LayoutDefinition layoutDefinition, ResponseRendering responseRendering) { var placeholder = _Placeholders.SingleOrDefault(p => p.Name == responseRendering.PlaceholderName); if (placeholder == null) { // TODO: but this would be a NOT FOUND situation? // - basically this means that that placeholder wasn't really on that rendering // - we placeholder = new ResponsePlaceholder(contextItem, layoutDefinition, responseRendering.PlaceholderName, "", false); _Placeholders.Add(placeholder); } var rendering = placeholder.AddRendering(responseRendering); return(rendering); }
internal ResponseRendering AddRendering(ResponseRendering responseRendering) { _Renderings.Add(responseRendering); return(responseRendering); }