~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Misc/PackageManagement/Project/Src/EnvDTE/ProjectPropertyFactory.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.Collections.Generic;
 
6
using ICSharpCode.SharpDevelop.Project;
 
7
using Microsoft.Build.Construction;
 
8
 
 
9
namespace ICSharpCode.PackageManagement.EnvDTE
 
10
{
 
11
        public class ProjectPropertyFactory : IPropertyFactory
 
12
        {
 
13
                Project project;
 
14
                
 
15
                public ProjectPropertyFactory(Project project)
 
16
                {
 
17
                        this.project = project;
 
18
                }
 
19
                
 
20
                public Property CreateProperty(string name)
 
21
                {
 
22
                        return new ProjectProperty(project, name);
 
23
                }
 
24
                
 
25
                public IEnumerator<Property> GetEnumerator()
 
26
                {
 
27
                        foreach (string propertyName in project.GetAllPropertyNames()) {
 
28
                                yield return CreateProperty(propertyName);
 
29
                        }
 
30
                }
 
31
        }
 
32
}