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

            return(_assembly.GetManifestResourceStream(resource.Name));
        }
Beispiel #2
0
        public override ManagedResourceInfo[] GetResourceInfo()
        {
            var names = _assembly.GetManifestResourceNames();

            var res = new List <ManagedResourceInfo>();

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

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

                res.Add(info);
            }

            return(res.ToArray());
        }
Beispiel #3
0
 public abstract Stream GetResourceStream(ManagedResourceInfo resource);