public int CreateFileCodeModel(
     string fileName,
     object parent,
     out EnvDTE.FileCodeModel ppFileCodeModel
     )
 {
     ppFileCodeModel = ProjectCodeModel.GetOrCreateFileCodeModel(fileName, parent);
     return(VSConstants.S_OK);
 }
예제 #2
0
        public EnvDTE.FileCodeModel GetFileCodeModel(EnvDTE.ProjectItem item)
        {
            if (!item.TryGetFullPath(out var filePath))
            {
                return(null);
            }

            return(ProjectCodeModel.GetOrCreateFileCodeModel(filePath, item));
        }