This project is read-only.

Shouldn't this be different?

Oct 28, 2007 at 12:14 AM

Sorry if this is not the right place to post this, but, is this a bug?

/// <summary>
/// Base class for a WorkItem controller.
/// </summary>
public abstract class WorkItemController : IWorkItemController{


/// <summary>
/// Shows a specific smart part in the workspace. If a smart part with the specified id
/// is not found in the <see cref="WorkItem.SmartParts"/> collection, a new instance
/// will be created; otherwise, the existing instance will be re used.
/// </summary>
/// <typeparam name="TView">The type of the smart part to show.</typeparam>
/// <param name="viewId">The id of the smart part in the <see cref="WorkItem.SmartParts"/> collection.</param>
/// <param name="workspaceName">The name of the workspace in which to show the smart part.</param>
/// <returns>The smart part instance.</returns>
protected virtual TView ShowViewInWorkspace<TView>(string viewId, string workspaceName)
TView view = default(TView);
if (WorkItem.SmartParts.Contains(viewId))
view = WorkItem.SmartParts.Get<TView>(viewId);
view = WorkItem.SmartParts.AddNew<TView>(); // Shouldn't this be view = WorkItem.SmartParts.AddNew<TView>(viewId)


return view;

Oct 28, 2007 at 1:26 AM
Yes that's a bug on SCSF. We cannot do anything about that. You can either change it and recompile the dll or create a new MyWorkItemController with the correct behavior.