internal void CountResourceDictionaryAndSetSource(string url) { var target = new ResourceDictionary(); var packUri = ResourceDictionaryUtilities.ToPackUri(url); target.Source = packUri; }
public void FixDesignTimeUri(string inUrl, string outUrl) { var inUri = ResourceDictionaryUtilities.ToPackUri(inUrl); var outUri = SharedDictionaryManager.FixDesignTimeUri(inUri); Assert.That(outUri.ToString(), Is.EqualTo(outUrl)); }
public void SetInLoadContext(string url) { var target = new LoadingResourceDictionary(); var packUri = ResourceDictionaryUtilities.ToPackUri(url); target.Source = packUri; Assert.That(target.MergedDictionaries.Count, Is.GreaterThan(0)); }
public void ReturnsResourceDictionary() { using (var factory = new SharedDictionaryManager.CachingFactory()) { var uri = ResourceDictionaryUtilities.ToPackUri(Urls.Test_SharedDictionary_PackUrl); var owner = new ResourceDictionary(); var resourceDictionary = factory.GetOrCreateResourceDictionary(owner, uri); Assert.That(resourceDictionary, Is.Not.Null); } }
public void IsEqualToSet(string url) { using (SharedDictionaryManager.CachingFactory.GetInstanceForDomain()) { var uri = ResourceDictionaryUtilities.ToPackUri(url); var target = new SharedDictionaryManager(); target.Source = uri; Assert.That(target.Source, Is.EqualTo(uri)); } }
public void SetInLoadFromContext(string url) { var setup = new AppDomainSetup { ApplicationBase = "NOTHING_HERE" }; AppDomainContext.Invoke(setup, () => { var target = new LoadingResourceDictionary(); var packUri = ResourceDictionaryUtilities.ToPackUri(url); target.Source = packUri; Assert.That(target.MergedDictionaries.Count, Is.GreaterThan(0)); }); }