/// <summary> /// Create a singleton instance of the Publish Exclusions Controller /// </summary> public PublishExclusionsController() { string repositoryName = string.Empty; try { repositoryName = Settings.GetSetting("Sitecore.PublishExclusions.RepositoryType", typeof(PublishExclusionsRepository).FullName); Repository = Activator.CreateInstance(Type.GetType(repositoryName)) as IPublishExclusionsRepository; } catch (Exception ex) { //Resort to default repository Log.Error("Sitecore.PublishExclusions : Exclusions Controller could not instantiate repository with type - " + (repositoryName ?? string.Empty), ex, this); Repository = new PublishExclusionsRepository(); } }