コード例 #1
0
        public override Stream GetResourceStream(ManagedResourceInfo resource)
        {
            if (resource.Source != this)
            {
                throw new ArgumentException("The specified ManagedResourceInfo did not originate from this ResourceSource", "resource");
            }

            return(_assembly.GetManifestResourceStream(resource.Name));
        }
コード例 #2
0
        public override ManagedResourceInfo[] GetResourceInfo()
        {
            String[] names = _assembly.GetManifestResourceNames();

            List <ManagedResourceInfo> res = new List <ManagedResourceInfo>();

            foreach (String name in names)
            {
                ManifestResourceInfo manInfo = _assembly.GetManifestResourceInfo(name);

                ManagedResourceInfo info = new ManagedResourceInfo(this, name, manInfo.ResourceLocation);

                res.Add(info);
            }

            return(res.ToArray());
        }
コード例 #3
0
 public abstract Stream GetResourceStream(ManagedResourceInfo resource);