Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@islaytitans
Last active December 7, 2015 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save islaytitans/e6802988266136a4e338 to your computer and use it in GitHub Desktop.
Save islaytitans/e6802988266136a4e338 to your computer and use it in GitHub Desktop.
Class defining the KeyInteraction Facet that will be creaated in Sitecore's Experience Database
[Serializable]
public class KeyInteractionsFacet : Facet, IKeyInteractionsFacet
{
public static readonly string FacetName = "KeyInteractions";
public const string SwatchesDownloadedName = "SwatchesDownloaded";
public const string VideosPlayedName = "VideosPlayed";
public const string SampleOrderName = "SampleOrder";
public KeyInteractionsFacet()
{
EnsureCollection<ISwatchDownloadedElement>(SwatchesDownloadedName);
EnsureCollection<IVideoPlayedElement>(VideosPlayedName);
EnsureCollection<ISampleOrderElement>(SampleOrderName);
}
public IElementCollection<ISwatchDownloadedElement> SwatchesDownloaded
{
get { return GetCollection<ISwatchDownloadedElement>(SwatchesDownloadedName); }
}
public IElementCollection<IVideoPlayedElement> VideosPlayed
{
get { return GetCollection<IVideoPlayedElement>(VideosPlayedName); }
}
public IElementCollection<ISampleOrderElement> SampleOrders
{
get { return GetCollection<ISampleOrderElement>(SampleOrderName); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment