private object CreateInstance(Workspace workspace)
        {
            ConstructorInfo workspaceVersionSpecTypeContstructor = _type.GetConstructor(new[] { workspace.Type });
            object workspaceVersionSpec = workspaceVersionSpecTypeContstructor.Invoke(new[] { workspace.Instance });

            return workspaceVersionSpec;
        }
 public WorkspaceVersionSpec(Assembly versionControlClientAssembly, Workspace workspace)
 {
     _assembly = versionControlClientAssembly;
     _type = _assembly.GetType("Microsoft.TeamFoundation.VersionControl.Client.WorkspaceVersionSpec");
     _instance = CreateInstance(workspace);
 }