PageRenderTime 122ms CodeModel.GetById 60ms app.highlight 2ms RepoModel.GetById 59ms app.codeStats 0ms

/WorldView/Utilities/Util.cs

#
C# | 24 lines | 22 code | 2 blank | 0 comment | 2 complexity | e9041d67bfd3ff7ba2debdcb9ab025b8 MD5 | raw file
 1using System;
 2using System.Reflection;
 3
 4namespace MoreTerra.Utilities
 5{
 6
 7    public static class Util
 8    {
 9        public static Type GetResourceAssemblyType()
10        {
11            foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
12            {
13                foreach (Type t in assembly.GetTypes())
14                {
15                    if (t.Name == "Resources")
16                    {
17                        return t;
18                    }
19                }
20            }
21            throw new ApplicationException("Cannot find the Resource Assembly");
22        }
23    }
24}