Ejemplo n.º 1
0
        private string GetIncludePath(TranslationUnit translationUnit)
        {
            if (!DriverOptions.UseHeaderDirectories && DriverOptions.GenerateName != null)
            {
                var extension = Path.GetExtension(TranslationUnit.FileName);
                return($"{DriverOptions.GenerateName(translationUnit)}{extension}");
            }

            return(translationUnit.FileName);
        }
Ejemplo n.º 2
0
        public static string GetIncludePath(this DriverOptions driverOptions, TranslationUnit translationUnit)
        {
            if (driverOptions.GenerateName != null)
            {
                var extension = Path.GetExtension(translationUnit.FileName);
                return($"{driverOptions.GenerateName(translationUnit)}{extension}");
            }
            else if (driverOptions.UseHeaderDirectories)
            {
                var path = Path.Combine(translationUnit.FileRelativeDirectory, translationUnit.FileName);
                return(path);
            }

            return(translationUnit.FileName);
        }
Ejemplo n.º 3
0
        private string GetIncludePath(TranslationUnit translationUnit)
        {
            if (!DriverOptions.UseHeaderDirectories && DriverOptions.GenerateName != null)
            {
                var extension = Path.GetExtension(TranslationUnit.FileName);
                return($"{DriverOptions.GenerateName(translationUnit)}{extension}");
            }

            return(translationUnit.FileName);

            var rel = PathHelpers.GetRelativePath(
                TranslationUnit.FileRelativeDirectory,
                translationUnit.FileRelativeDirectory);

            if (string.IsNullOrEmpty(rel))
            {
                return(translationUnit.FileName);
            }

            return(Path.Combine(rel, translationUnit.FileName));
        }