Пример #1
0
        private string GetContentFilesIncludePath(ITaskItem taskItem)
        {
            PackageDirectory packageDirectory;
            string           includePath;

            taskItem.GetTargetPackageDirectory(out packageDirectory, out includePath);
            if (packageDirectory != PackageDirectory.ContentFiles)
            {
                Log.LogError($"File '{taskItem.ItemSpec}' has unexpected PackageDirectory metadata. Expected '{PackageDirectory.ContentFiles}', actual '{packageDirectory}'.");
            }

            return(includePath);
        }
Пример #2
0
        private ITaskItem SetPackageDirectory(ITaskItem taskItem)
        {
            PackageDirectory targetPackageDirectory;
            string targetDirectoryPath;
            taskItem.GetTargetPackageDirectory(out targetPackageDirectory, out targetDirectoryPath);

            var packageDirectory = taskItem.GetPackageDirectory(targetPackageDirectory);

            if (packageDirectory != targetPackageDirectory)
            {
                Log.LogError($"File '{taskItem.ItemSpec}' has unexpected PackageDirectory metadata. Expected '{targetPackageDirectory}', actual '{packageDirectory}'.");
            }

            taskItem.SetMetadata(Metadata.PackageDirectory, targetPackageDirectory.ToString());
            return taskItem;

        }
Пример #3
0
        private ITaskItem SetPackageDirectory(ITaskItem taskItem)
        {
            PackageDirectory targetPackageDirectory;
            string           targetDirectoryPath;

            taskItem.GetTargetPackageDirectory(out targetPackageDirectory, out targetDirectoryPath);

            var packageDirectory = taskItem.GetPackageDirectory(targetPackageDirectory);

            if (packageDirectory != targetPackageDirectory)
            {
                Log.LogError($"File '{taskItem.ItemSpec}' has unexpected PackageDirectory metadata. Expected '{targetPackageDirectory}', actual '{packageDirectory}'.");
            }

            taskItem.SetMetadata(Metadata.PackageDirectory, targetPackageDirectory.ToString());
            return(taskItem);
        }
Пример #4
0
        private string GetContentFilesIncludePath(ITaskItem taskItem)
        {
            PackageDirectory packageDirectory;
            string includePath;
            taskItem.GetTargetPackageDirectory(out packageDirectory, out includePath);
            if (packageDirectory != PackageDirectory.ContentFiles)
            {
                Log.LogError($"File '{taskItem.ItemSpec}' has unexpected PackageDirectory metadata. Expected '{PackageDirectory.ContentFiles}', actual '{packageDirectory}'.");
            }

            return includePath;
        }