private object createInstance(Workspace workspace)
 {
     ConstructorInfo workspaceVersionSpecTypeContstructor = _type.GetConstructor(new Type[] { workspace.Type });
     object workspaceVersionSpec = workspaceVersionSpecTypeContstructor.Invoke(new object[] { workspace.Instance });
     return workspaceVersionSpec;
 }
 public WorkspaceVersionSpec(Assembly versionControlClientAssembly, Workspace workspace)
 {
     _assembly = versionControlClientAssembly;
     _type = _assembly.GetType("Microsoft.TeamFoundation.VersionControl.Client.WorkspaceVersionSpec");
     _instance = createInstance(workspace);
 }