Skip to content

Instantly share code, notes, and snippets.

@glcheetham
Created January 29, 2017 11:39
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 glcheetham/a0acdb350ae24846f3f622c323d7a532 to your computer and use it in GitHub Desktop.
Save glcheetham/a0acdb350ae24846f3f622c323d7a532 to your computer and use it in GitHub Desktop.
Example instantiation of loosely-coupled class which depends on UmbracoHelper
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
// Or from any other environment that comes with UmbracoHelper already available https://our.umbraco.org/documentation/reference/querying/umbracohelper/
// UmbracoHelper.ContentQuery implements the ITypedContentQuery interface
var resourceService = new ResourceService(umbracoHelper.ContentQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment