コード例 #1
0
        public List <FilePath> GetItemFiles(object obj)
        {
            List <FilePath> col = new List <FilePath> ();
            DotNetProject   mp  = obj as DotNetProject;

            if (mp != null)
            {
                MonoSolutionItemHandler handler = ProjectExtensionUtil.GetItemHandler(mp) as MonoSolutionItemHandler;
                if (handler != null && File.Exists(handler.SourcesFile))
                {
                    col.Add(mp.FileName);
                    col.Add(handler.SourcesFile);
                }
            }
            return(col);
        }
コード例 #2
0
        internal override void SetItemHandler(ISolutionItemHandler handler)
        {
            if (ProjectExtensionUtil.GetItemHandler(this) == null)
            {
                // Initial assignment of the item handler
                base.SetItemHandler(handler);
                return;
            }
            IResourceHandler rh = ResourceHandler;

            base.SetItemHandler(handler);
            resourceHandler = null;
            // A change in the file format may imply a change in the resource naming policy.
            // Make sure that the resource Id don't change.
            MigrateResourceIds(rh, ResourceHandler);
        }
コード例 #3
0
 public UnitTest CreateUnitTest(IWorkspaceObject entry)
 {
     if (entry is DotNetProject)
     {
         DotNetProject           project = (DotNetProject)entry;
         MonoSolutionItemHandler handler = ProjectExtensionUtil.GetItemHandler(project) as MonoSolutionItemHandler;
         if (handler != null)
         {
             if (handler.UnitTest != null)
             {
                 return((UnitTest)handler.UnitTest);
             }
             string   testFileBase = handler.GetTestFileBase();
             UnitTest testSuite    = new MonoTestSuite(project, project.Name, testFileBase);
             handler.UnitTest = testSuite;
             return(testSuite);
         }
     }
     return(null);
 }
コード例 #4
0
        public static bool IsMonoProject(object obj)
        {
            DotNetProject p = obj as DotNetProject;

            return(p != null && (ProjectExtensionUtil.GetItemHandler(p) is MonoSolutionItemHandler));
        }