public IResourceUrl CreateThemedResourceUrl(ResourceType resourceType, string relativeUrl)
        {
            ArgumentUtility.CheckNotNull("resourceType", resourceType);
            ArgumentUtility.CheckNotNullOrEmpty("relativeUrl", relativeUrl);

            return(_resourceUrlFactory.CreateThemedResourceUrl(typeof(InfrastructureResourceUrlFactory), resourceType, relativeUrl));
        }
Esempio n. 2
0
        private IconInfo GetIcon(string resourceUrl, string alternateText)
        {
            var url = _resourceUrlFactory.CreateThemedResourceUrl(typeof(BocListInlineEditingConfigurator), ResourceType.Image, resourceUrl).GetUrl();

            return(new IconInfo(url)
            {
                AlternateText = alternateText
            });
        }
        public void CreateThemedResourceUrl()
        {
            var resourceUrl = _factory.CreateThemedResourceUrl(typeof(ResourceUrlFactoryTest), ResourceType.Image, "theRelativeUrl.img");

            Assert.That(resourceUrl, Is.InstanceOf(typeof(ThemedResourceUrl)));
            Assert.That(((ThemedResourceUrl)resourceUrl).ResourcePathBuilder, Is.SameAs(_resourcePathBuilder));
            Assert.That(((ThemedResourceUrl)resourceUrl).DefiningType, Is.EqualTo(typeof(ResourceUrlFactoryTest)));
            Assert.That(((ThemedResourceUrl)resourceUrl).ResourceType, Is.EqualTo(ResourceType.Image));
            Assert.That(((ThemedResourceUrl)resourceUrl).ResourceTheme, Is.SameAs(_resourceTheme));
            Assert.That(((ThemedResourceUrl)resourceUrl).RelativeUrl, Is.EqualTo("theRelativeUrl.img"));
        }
Esempio n. 4
0
 private IResourceUrl GetIconUrl(string url)
 {
     return(_resourceUrlFactory.CreateThemedResourceUrl(typeof(CollapsedAccessControlConditionsRenderer), ResourceType.Image, url));
 }
 private string GetResourceUrl(string icon)
 {
     return(_resourceUrlFactory.CreateThemedResourceUrl(typeof(BocBooleanValueResourceSetFactory), ResourceType.Image, icon).GetUrl());
 }