T4Scaffolding.Cmdlets.InvokeScaffoldTemplateCmdlet.FindTemplateAssertExists C# (CSharp) Method

FindTemplateAssertExists() private static method

private static FindTemplateAssertExists ( Project project, IFileSystem fileSystem, string template ) : string
project Project
fileSystem IFileSystem
template string
return string
        private static string FindTemplateAssertExists(Project project, IFileSystem fileSystem, string template)
        {
            string templateFullPath = template;
            if (!Path.IsPathRooted(templateFullPath)) {
                var templateProjectItem = project.GetProjectItem(templateFullPath);
                if (templateProjectItem != null)
                    templateFullPath = templateProjectItem.GetFullPath();
            }
            if (!fileSystem.FileExists(templateFullPath)) {
                throw new FileNotFoundException(string.Format("Cannot find template at '{0}'", templateFullPath));
            }
            return templateFullPath;
        }