Skip to content
Browse files

Get VS2008 to build.

  • Loading branch information...
1 parent 0f83db0 commit d47352058340c77bec4cedae957ec2b259b7e87b @spraints spraints committed Jan 8, 2013
View
3 GitTfs.Vs11/GitTfs.Vs11.csproj
@@ -66,6 +66,9 @@
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
+ <Compile Include="..\GitTfs.VsCommon\Wrappers.PostVs2010.cs">
+ <Link>Wrappers.PostVs2010.cs</Link>
+ </Compile>
<Compile Include="..\Version.cs">
<Link>Properties\Version.cs</Link>
</Compile>
View
3 GitTfs.Vs2010/GitTfs.Vs2010.csproj
@@ -104,6 +104,9 @@
<Compile Include="..\GitTfs.VsCommon\Wrappers.cs">
<Link>Wrappers.cs</Link>
</Compile>
+ <Compile Include="..\GitTfs.VsCommon\Wrappers.PostVs2010.cs">
+ <Link>Wrappers.PostVs2010.cs</Link>
+ </Compile>
<Compile Include="..\Version.cs">
<Link>Properties\Version.cs</Link>
</Compile>
View
46 GitTfs.VsCommon/Wrappers.PostVs2010.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.TeamFoundation.VersionControl.Client;
+using Sep.Git.Tfs.Core.TfsInterop;
+
+namespace Sep.Git.Tfs.VsCommon
+{
+ public class WrapperForBranch : IBranch
+ {
+ private readonly BranchObject branch;
+
+ public WrapperForBranch(BranchObject branch, IEnumerable<IBranch> children)
+ {
+ this.branch = branch;
+ this.ChildBranches = children;
+ }
+
+ public BranchObject WrappedBranch { get { return this.branch; } }
+
+ public IEnumerable<IBranch> ChildBranches { get; private set; }
+
+ public DateTime DateCreated { get { return branch.DateCreated; } }
+
+ public string Path { get { return branch.Properties.RootItem.Item; } }
+
+ public override string ToString()
+ {
+ return string.Format("{0} [{1} children]", this.Path, this.ChildBranches.Count());
+ }
+ }
+
+ public class WrapperForBranchFactory
+ {
+ public static WrapperForBranch Wrap(BranchObject branch, IList<BranchObject> related)
+ {
+ var children =
+ related.Where(c => c.Properties.ParentBranch.Item == branch.Properties.RootItem.Item)
+ .Select(c => WrapperForBranchFactory.Wrap(c, related));
+
+ var wrapper = new WrapperForBranch(branch, children);
+
+ return wrapper;
+ }
+ }
+}
View
38 GitTfs.VsCommon/Wrappers.cs
@@ -56,44 +56,6 @@ public IItem[] GetItems(string itemPath, int changesetNumber, TfsRecursionType r
}
}
- public class WrapperForBranch : IBranch
- {
- private readonly BranchObject branch;
-
- public WrapperForBranch(BranchObject branch, IEnumerable<IBranch> children)
- {
- this.branch = branch;
- this.ChildBranches = children;
- }
-
- public BranchObject WrappedBranch { get { return this.branch; } }
-
- public IEnumerable<IBranch> ChildBranches { get; private set; }
-
- public DateTime DateCreated { get { return branch.DateCreated; } }
-
- public string Path { get { return branch.Properties.RootItem.Item; } }
-
- public override string ToString()
- {
- return string.Format("{0} [{1} children]", this.Path, this.ChildBranches.Count());
- }
- }
-
- public class WrapperForBranchFactory
- {
- public static WrapperForBranch Wrap(BranchObject branch, IList<BranchObject> related)
- {
- var children =
- related.Where(c => c.Properties.ParentBranch.Item == branch.Properties.RootItem.Item)
- .Select(c => WrapperForBranchFactory.Wrap(c, related));
-
- var wrapper = new WrapperForBranch(branch, children);
-
- return wrapper;
- }
- }
-
public class WrapperForChangeset : WrapperFor<Changeset>, IChangeset
{
private readonly TfsApiBridge _bridge;

0 comments on commit d473520

Please sign in to comment.
Something went wrong with that request. Please try again.