nl.siegmann.epublib.domain.Resources.getById C# (CSharp) Method

getById() public method

Gets the resource with the given id.
public getById ( string id ) : Resource
id string
return Resource
        public Resource getById(string id)
        {
            if (StringUtil.isBlank(id))
            {
                return null;
            }
            foreach (Resource resource in resources.Values)
            {
                if (id.Equals(resource.getId()))
                {
                    return resource;
                }
            }
            return null;
        }