Ejemplo n.º 1
0
        public Dictionary <string, string> GetResourcesForId(string resourceID, string resourceSet)
        {
            DbResourceDataManager manager = new DbResourceDataManager();
            var resourceStrings           = manager.GetResourceStrings(resourceID, resourceSet);

            return(resourceStrings);
        }
Ejemplo n.º 2
0
        public object GetResourceStrings(string ResourceId, string ResourceSet)
        {
            Dictionary <string, string> Resources = Manager.GetResourceStrings(ResourceId, ResourceSet);

            if (Resources == null)
            {
                throw new ApplicationException(Manager.ErrorMessage);
            }

            return(Resources);
        }
        protected IEnumerable<ResourceString> GetResourceStringsInternal(string resourceId, string resourceSet)        
        {
            Dictionary<string, string> resources = Manager.GetResourceStrings(resourceId, resourceSet, true);

            if (resources == null)
                throw new ApplicationException(Manager.ErrorMessage);

            // transform into an array
            return resources.Select(kv => new ResourceString
            {
                LocaleId = kv.Key,
                Value = kv.Value
            });
        }