/// <summary> /// Implements <see cref="IORMToolServices.GetVerbalizationSnippetsDictionary"/> /// </summary> protected IDictionary <Type, IVerbalizationSets> GetVerbalizationSnippetsDictionary(string target) { VerbalizationManager mgr = myVerbalizationManager; if (mgr == null) { return(null); } IDictionary <Type, IVerbalizationSets> retVal = null; IDictionary <string, IDictionary <Type, IVerbalizationSets> > targetedSnippets = myTargetedVerbalizationSnippets; bool loadTarget = false; if (targetedSnippets == null) { loadTarget = true; myTargetedVerbalizationSnippets = targetedSnippets = new Dictionary <string, IDictionary <Type, IVerbalizationSets> >(); } else if (targetedSnippets != null) { loadTarget = !targetedSnippets.TryGetValue(target, out retVal); } if (loadTarget) { IList <VerbalizationSnippetsIdentifier> identifiers = mgr.CustomSnippetsIdentifiers; targetedSnippets[target] = retVal = VerbalizationSnippetSetsManager.LoadSnippetsDictionary( this, target, mgr.SnippetsDirectory, (identifiers != null && identifiers.Count != 0) ? identifiers : null); } return(retVal); }
/// <summary> /// Create a new model loader with support for extension models and verbalization /// </summary> /// <param name="extensionLoader">The <see cref="ExtensionLoader"/> to use with this model load.</param> /// <param name="verbalizationManager">Create a loader with verbalization support.</param> public ModelLoader(ExtensionLoader extensionLoader, VerbalizationManager verbalizationManager) { myExtensionLoader = extensionLoader; myVerbalizationManager = verbalizationManager; }
/// <summary> /// Create a new <see cref="ORMStandaloneStore"/> /// </summary> /// <param name="serviceProvider">The <see cref="IServiceProvider"/>. Can be <see langword="null"/>.</param> /// <param name="verbalizationManager">The <see cref="VerbalizationManager"/> used to support verbalization /// methods on the <see cref="IORMToolServices"/> interface supported by this store.</param> public ORMStandaloneStore(IServiceProvider serviceProvider, VerbalizationManager verbalizationManager) : base(serviceProvider) { myVerbalizationManager = verbalizationManager; }
/// <summary> /// Create a new model loader with support for extension models and verbalization /// </summary> /// <param name="extensionLoader">The <see cref="ExtensionLoader"/> to use with this model load.</param> /// <param name="verbalizationManager">Create a loader with verbalization support.</param> /// <param name="skipNonGenerativeExtensions">Do not load non-generative extensions.</param> public ModelLoader(ExtensionLoader extensionLoader, VerbalizationManager verbalizationManager, bool skipNonGenerativeExtensions) { myExtensionLoader = extensionLoader; myVerbalizationManager = verbalizationManager; mySkipNonGenerativeExtensions = skipNonGenerativeExtensions; }