public void SetUp() { FSharp.Helpers.Init(); var itemId = Guid.NewGuid().ToString(); _itemWithFields = new SitecoreItem { Id = itemId, Name = "Item With Fields", ParentPath = "/item/path/", Language = "en", TemplatePath = "/template/path/", TemplateName = "Template", Fields = new[] { new SitecoreField {Name = "Field Name 1", Value = "Field Value 1"}, new SitecoreField {Name = "Field Name 2", Value = "Field Value 2"}, new SitecoreField {Name = "Field Name 3", Value = ""} }.ToList() }; _itemWithNoFields = new SitecoreItem { Id = itemId, Name = "Item With No Fields", ParentPath = "/item/path/", Language = "en", TemplatePath = "/template/path/", TemplateName = "Template" }; }
public void SetUp() { var itemId = Guid.NewGuid().ToString(); _subItem1 = new SitecoreItem { Id = itemId, Name = "Sub Item 1", ParentPath = "/item/path/", Language = "en", TemplatePath = "/template/path/", TemplateName = "Template", Fields = new[] { new SitecoreField {Name = "Field Name 1", Value = "Field Value 1"}, new SitecoreField {Name = "Field Name 2", Value = "Field Value 2"} } }; _subItem2 = new SitecoreItem { Id = itemId, Name = "Sub Item 2", ParentPath = "/item/path/", Language = "en", TemplatePath = "/template/path/", TemplateName = "Template", Fields = new[] { new SitecoreField {Name = "Field Name 1", Value = "Field Value 1"}, new SitecoreField {Name = "Field Name 2", Value = "Field Value 2"} } }; _itemWithSubItems = new SitecoreItem { Children = new[] { _subItem1, _subItem2 }.ToList() }; }
public void SetUp() { var templateId = Guid.NewGuid().ToString(); _itemWithFields = new SitecoreItem { Name = "Item With Fields", TemplateId = templateId, Fields = new[] { new SitecoreField {Name = "Field Name 1", Value = "Field Value 1"}, new SitecoreField {Name = "Field Name 2", Value = "Field Value 2"}, } }; _itemWithNoFields = new SitecoreItem { Name = "Item With No Fields", TemplateId = templateId }; _itemWithChildren = new SitecoreItem { Name = "Item With Children", TemplateId = templateId, Children = new[] { new SitecoreItem { TemplateName = "first child" }, new SitecoreItem { TemplateName = "second child" } } }; }
protected override void ExecuteInner(SitecoreItem item) { var template = GetTemplate(TemplateType.SitecoreItem); CopyToClipboard(template, item); }
protected abstract void ExecuteInner(SitecoreItem item);