Esempio n. 1
0
 private static void Guard(string path)
 {
     if (!File.Exists(path))
     {
         throw ResourceException.FileNotFound(path);
     }
 }
Esempio n. 2
0
 private void GuardExistence(string originalfilePath)
 {
     if (!(Exists(originalfilePath + STUDIO_EXTENSION) || Exists(originalfilePath + COMPILED_EXTENSION)))
     {
         throw ResourceException.ResourceBundleNotFound(PreFixed(originalfilePath));
     }
 }
        public Stream FindResource(string path)
        {
            Stream stream = TryFindResource(path);

            if (stream == null)
            {
                throw ResourceException.ResourceNotFound(path, _assembly);
            }
            return(stream);
        }
        public ResourceManager LoadBundle(string filePath)
        {
            if (!Exists(filePath + ".resources"))
            {
                throw ResourceException.ResourceBundleNotFound(filePath);
            }
//            Console.WriteLine(_assembly.GetName().Name+"."+PreFixed(filePath));
//            if (!Exists(filePath + ".resources"))
//            {
//                throw ResourceException.ResourceBundleNotFound(filePath);
//            }
            return(new ResourceManager(_assembly.GetName().Name + "." + PreFixed(filePath), _assembly));
        }