public void RefreshExtendedStatus(ExtendedItem[][] status, Workspace ws, DateTime time, List <TfsFileStatus> updated = null)
 {
     foreach (var item in status)
     {
         foreach (var eachItem in item)
         {
             var           assetPath = GetAssetPath(eachItem.LocalItem, eachItem.SourceServerItem, eachItem.ItemType, ws);
             TfsFileStatus result;
             if (cache.TryGetValue(assetPath, out result))
             {
                 result.RefreshExtendedItem(eachItem, time);
                 if (updated != null)
                 {
                     updated.Add(result);
                 }
             }
             else
             {
                 result = new TfsFileStatus(eachItem.SourceServerItem, assetPath);
                 result.RefreshExtendedItem(eachItem, time);
                 cache[assetPath] = result;
                 if (updated != null)
                 {
                     updated.Add(result);
                 }
             }
         }
     }
 }
        public static TfsFileStatus CreateFromLocalPath(Workspace ws, string localPath)
        {
            var items = ws.GetExtendedItems(new[] { new ItemSpec(localPath, RecursionType.None) }, DeletedState.Any, ItemType.Any);

            foreach (var item in items)
            {
                foreach (var each in item)
                {
                    var result = new TfsFileStatus(each.SourceServerItem, localPath);
                    result.RefreshExtendedItem(each, DateTime.Now);
                    return(result);
                }
            }

            return(null);
        }