Created CultureDictionaryFactoryResolver for use in the new MVC views which returns a ICultureDictionary.

This allows us in the future to use any type of data source for the dictionary. Have obsoleted the old
ICultureDictionary in the macro engines project (where it doesn't belong anyways). The new one doesn't expose
the 'Language' property to the front-end because this is a business logic class which means designers can just delete
a whole language from the db by calling 'Delete' on the object !
This commit is contained in:
Shannon Deminick
2012-08-15 23:20:37 +06:00
parent 91e9392992
commit 4e9f9b77f4
15 changed files with 216 additions and 65 deletions

View File

@@ -2,31 +2,31 @@ using Umbraco.Core.ObjectResolution;
namespace Umbraco.Web
{
/// <summary>
/// An object resolver to return the IContentStore
/// </summary>
internal class ContentStoreResolver : SingleObjectResolverBase<ContentStoreResolver, IContentStore>
{
internal ContentStoreResolver(IContentStore contentStore)
: base(contentStore)
{
}
/// <summary>
/// Can be used by developers at runtime to set their IContentStore at app startup
/// An object resolver to return the IContentStore
/// </summary>
/// <param name="contentStore"></param>
public void SetContentStore(IContentStore contentStore)
internal class ContentStoreResolver : SingleObjectResolverBase<ContentStoreResolver, IContentStore>
{
Value = contentStore;
}
internal ContentStoreResolver(IContentStore contentStore)
: base(contentStore)
{
}
/// <summary>
/// Returns the IContentStore
/// </summary>
public IContentStore ContentStore
{
get { return Value; }
/// <summary>
/// Can be used by developers at runtime to set their IContentStore at app startup
/// </summary>
/// <param name="contentStore"></param>
public void SetContentStore(IContentStore contentStore)
{
Value = contentStore;
}
/// <summary>
/// Returns the IContentStore
/// </summary>
public IContentStore ContentStore
{
get { return Value; }
}
}
}
}