Maison >base de données >tutoriel mysql >[tfs]workitemtrackingsourcecode
在编程时经常会遇到一些错误,例如,http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.workitemtracking.client.fieldstatus.aspx 上面所列出的错误,简单的通过描述无法确认真的问题所在,那么你就需要查看server内部是如何实现的。 names
在编程时经常会遇到一些错误,例如,http://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.workitemtracking.client.fieldstatus.aspx 上面所列出的错误,简单的通过描述无法确认真的问题所在,那么你就需要查看server内部是如何实现的。namespace<code class="csharp plain">Microsoft.TeamFoundation.WorkItemTracking.Client
<code class="csharp plain">{
<code class="csharp plain">
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">Microsoft.TeamFoundation;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">Microsoft.TeamFoundation.Client;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">Microsoft.TeamFoundation.Common;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">Microsoft.TeamFoundation.WorkItemTracking.Proxy;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">System;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">System.Collections;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">System.Collections.Generic;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">System.Globalization;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">System.IO;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">System.Reflection;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">System.Runtime.InteropServices;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">System.Threading;
<code class="csharp spaces"> <code class="csharp keyword">using<code class="csharp plain">System.Xml;
<code class="csharp spaces"> <code class="csharp keyword">public<code class="csharp keyword">sealed
<code class="csharp keyword">class<code class="csharp plain">WorkItem : IRevisionInternal
<code class="csharp spaces"> <code class="csharp plain">{
<code class="csharp spaces"> <code class="csharp keyword">internal<code class="csharp keyword">const
<code class="csharp keyword">int<code class="csharp plain">c_revisionHistory = -4;
<code class="csharp spaces"> <code class="csharp keyword">internal<code class="csharp keyword">const
<code class="csharp keyword">int<code class="csharp plain">c_revisionLatest = -3;
<code class="csharp spaces"> <code class="csharp keyword">internal<code class="csharp keyword">const
<code class="csharp keyword">int<code class="csharp plain">c_revisionNull = -1;
<code class="csharp spaces"> <code class="csharp keyword">internal<code class="csharp keyword">const
<code class="csharp keyword">int<code class="csharp plain">c_revisionUpdate = -2;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">DateTime? m_asof;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">AttachmentCollection m_attachments;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">int
<code class="csharp plain">m_dataVersion;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">bool<code class="csharp plain">? m_dirty;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">FieldCollection m_fields;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">WorkItemFieldData m_fieldsData;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">int
<code class="csharp plain">m_id;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">int
<code class="csharp plain">m_index;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">bool
<code class="csharp plain">m_IsUpdating;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">LinkCollection m_links;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">WorkItemLinkData m_linksData;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">WorkItemCollection m_list;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">int
<code class="csharp plain">m_metadataVersion;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">OpenState m_openState;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">Microsoft.TeamFoundation.WorkItemTracking.Client.Project m_project;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">bool<code class="csharp plain">? m_readonly;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">RevisionCollection m_revisions;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">WorkItemStore m_store;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">int
<code class="csharp plain">m_tempId;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">WorkItemType m_type;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">WorkItemLinkCollection m_wlinks;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp plain">WorkItemLinkCollection m_wlinksHistory;
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">static
<code class="csharp keyword">int<code class="csharp plain">[] s_areaDependentFieldIds =<code class="csharp keyword">new
<code class="csharp keyword">int<code class="csharp plain">[] { -12, -42, -43, -44, -45, -46, -47, -48, -49 };
<code class="csharp spaces"> <code class="csharp keyword">internal<code class="csharp keyword">static
<code class="csharp keyword">int<code class="csharp plain">[] s_internallyCalculatedFieldIds =<code class="csharp keyword">new
<code class="csharp keyword">int<code class="csharp plain">[] {
<code class="csharp spaces"> <code class="csharp plain">-7, -12, -42, -43, -44, -45, -46, -47, -48, -49, -105, -50, -51, -52, -53, -54,
<code class="csharp spaces"> <code class="csharp plain">-55, -56
<code class="csharp spaces"> <code class="csharp plain">};
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">static
<code class="csharp keyword">int<code class="csharp plain">[] s_iterationDependentFieldIds =<code class="csharp keyword">new
<code class="csharp keyword">int<code class="csharp plain">[] { -50, -51, -52, -53, -54, -55, -56 };
<code class="csharp spaces"> <code class="csharp keyword">private<code class="csharp keyword">static
<code class="csharp keyword">int<code class="csharp plain">s_tempId = 0;
<code class="csharp spaces"> <code class="csharp keyword">public<code class="csharp keyword">event
<code class="csharp plain">WorkItemFieldChangeEventHandler FieldChanged;
<code class="csharp spaces"> <code class="csharp keyword">public<code class="csharp plain">WorkItem(WorkItemType type)
<code class="csharp spaces"> <code class="csharp plain">{
<code class="csharp spaces"> <code class="csharp keyword">this<code class="csharp plain">.m_dirty =<code class="csharp keyword">false<code class="csharp plain">;
<code class="csharp spaces"> <code class="csharp keyword">this<code class="csharp plain">.m_readonly =<code class="csharp keyword">null<code class="csharp plain">;
<code class="csharp spaces"> <code class="csharp keyword">this<code class="csharp plain">.m_asof =<code class="csharp keyword">null<code class="csharp plain">;
<code class="csharp spaces"> <code class="csharp plain">Microsoft.TeamFoundation.Common.Marker.Process(Microsoft.TeamFoundation.Common.Mark.OMWorkItemNewBegin);
<code class="csharp spaces"> <code class="csharp plain">TeamFoundationTrace.Verbose(<code class="csharp string">"Entering WorkItem(WorkItemStore store, WorkItemType type)"<code class="csharp plain">);
<code class="csharp spaces"> <code class="csharp keyword">if<code class="csharp plain">(type ==
<code class="csharp keyword">null<code class="csharp plain">)
<code class="csharp spaces"> <code class="csharp plain">{
<code class="csharp spaces"> <code class="csharp keyword">throw<code class="csharp keyword">new
<code class="csharp plain">ArgumentNullException(<code class="csharp string">"type"<code class="csharp plain">);
<code class="csharp spaces"> <code class="csharp plain">}
<code class="csharp spaces"> <code class="csharp keyword">this<code class="csharp plain">.m_fieldsData =<code class="csharp keyword">new
<code class="csharp plain">WorkItemFieldData(<code class="csharp keyword">this<code class="csharp plain">);
<code class="csharp spaces"> <code class="csharp keyword">this<code class="csharp plain">.m_linksData =<code class="csharp keyword">new
<code class="csharp plain">WorkItemLinkData(<code class="csharp keyword">this<code class="csharp plain">);
<code class="csharp spaces"> <code class="csharp keyword">this<code class="csharp plain">.m_store = type.Store;
<code class="csharp spaces"> <code class="csharp keyword">this<code class="csharp plain">.m_id = 0;
<code class="csharp spaces"> <code class="csharp keyword">this<code class="csharp plain">.m_tempId = Interlocked.Decrement(<code class="csharp keyword">ref<code class="csharp plain">s_tempId);
<code class="csharp spaces"> <code class="csharp keyword">this<code class="csharp plain">.m_openState = OpenState.New;