CmisSync.Lib.Database.Database.GetSyncItem C# (CSharp) Метод

GetSyncItem() публичный Метод

Gets the syncitem from id.
public GetSyncItem ( string id ) : SyncItem
id string Identifier.
Результат SyncItem
        public SyncItem GetSyncItem(string id)
        {
            Dictionary<string, object> parameters = new Dictionary<string, object>();
            parameters.Add("id", id);
            var result = ExecuteOneRecordSQL("SELECT path, localPath FROM files WHERE id=@id", parameters);
            if (result.Count() > 0) {
            string remotePath = (string)result["path"];
            object localPathObj = result["localPath"];
            string localPath = (localPathObj is DBNull) ? remotePath : (string)localPathObj;
            return SyncItemFactory.CreateFromPaths(localPathPrefix, localPath, remotePathPrefix, remotePath, false);
            } else {
                var items = GetAllFoldersWithCmisId(id);

                var item = items.FirstOrDefault();
                return item == null ? null : item;
            }
        }