Example #1
0
        private static IEnumerable <string> GetScript(string scriptName)
        {
            var resourceName = GetResourceName(scriptName);
            IEnumerable <string> script;

            if (!_scripts.TryGetValue(resourceName, out script))
            {
                using (var stream = Assembly.GetManifestResourceStream(resourceName))
                {
                    script = SqlScript.ReadScript(stream);
                    _scripts[scriptName] = script;
                }
            }
            return(script);
        }