private bool ItemSupportsTransforms()

in src/Microsoft.VisualStudio.SlowCheetah.VS/Package/AddTransformCommand.cs [246:272]


        private bool ItemSupportsTransforms(IVsProject project, uint itemid)
        {
            if (ErrorHandler.Failed(project.GetMkDocument(itemid, out string itemFullPath)))
            {
                return false;
            }

            if (!PackageUtilities.IsExtensionSupportedForFile(itemFullPath))
            {
                return false;
            }

            if (this.package.IsItemTransformItem(project, itemid))
            {
                return false;
            }

            // web.config has its own transform support
            if (string.Compare("web.config", Path.GetFileName(itemFullPath), StringComparison.OrdinalIgnoreCase) == 0)
            {
                return false;
            }

            // All quick checks done, ask if this is any transformer supports this.
            // This may hit the disk, which is costly for a context menu check and preferably avoided.
            return TransformerFactory.IsSupportedFile(itemFullPath);
        }