public static byte[] ReadAllBytes(string resourceName)
        {
            resourceName = EmbeddedResourceUtility.FormatResourceName(resourceName);

            using (BinaryReader br = new BinaryReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)))
            {
                return(br.ReadBytes((int)br.BaseStream.Length));
            }
        }
        public static string ReadAllText(string resourceName)
        {
            resourceName = EmbeddedResourceUtility.FormatResourceName(resourceName);

            using (StreamReader sr = new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)))
            {
                return(sr.ReadToEnd());
            }
        }
        public static string ReadTemplateAndApplyVariables(string resourceName, NameValueCollection values)
        {
            string contents = EmbeddedResourceUtility.ReadAllText(resourceName);

            return(EmbeddedResourceUtility.ApplyVariables(contents, values));
        }