示例#1
0
        public T Resolve <T>(ResourceRef <T> reference) where T : Resource
        {
            if (reference == null)
            {
                throw new NullResourceReferenceException();
            }

            Resource res;

            if (_resById.TryGetValue(reference.ResourceId, out res))
            {
                return(res as T);
            }

            return(null);
        }
示例#2
0
 public bool Equals(ResourceRef <T> other)
 {
     return(ResourceId.Equals(other.ResourceId));
 }