Last active
August 29, 2015 14:10
-
-
Save marcduiker/95d14b8fb50300bb45b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using Sitecore.Data; | |
using Sitecore.Data.Items; | |
using Sitecore.Diagnostics; | |
using SitecorePlayground.Common.Interfaces.Adapters; | |
namespace SitecorePlayground.Common.Adapters | |
{ | |
public class ItemAdapter : IItemAdapter | |
{ | |
public ItemAdapter(Item item) | |
{ | |
Assert.ArgumentNotNull(item, "item"); | |
this.InnerItem = item; | |
} | |
public string DisplayName | |
{ | |
get { return InnerItem.DisplayName; } | |
} | |
public ID Id | |
{ | |
get { return InnerItem.ID; } | |
} | |
public Item InnerItem | |
{ | |
get; | |
private set; | |
} | |
public ID TemplateId | |
{ | |
get { return InnerItem.TemplateID; } | |
} | |
public string this[string fieldName] | |
{ | |
get { return InnerItem.Fields[fieldName].Value; } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment