Exemplo n.º 1
0
        private static TaskGroupInfo GetTaskGroupInfoFromRow(IStorePropertyBag row)
        {
            VersionedId id = (VersionedId)row.TryGetProperty(ItemSchema.Id);

            byte[] valueOrDefault  = row.GetValueOrDefault <byte[]>(TaskGroupSchema.GroupClassId, null);
            string valueOrDefault2 = row.GetValueOrDefault <string>(ItemSchema.Subject, string.Empty);

            byte[]     valueOrDefault3       = row.GetValueOrDefault <byte[]>(FolderTreeDataSchema.Ordinal, null);
            ExDateTime valueOrDefault4       = row.GetValueOrDefault <ExDateTime>(StoreObjectSchema.LastModifiedTime, ExDateTime.MinValue);
            Guid       safeGuidFromByteArray = FolderTreeData.GetSafeGuidFromByteArray(valueOrDefault);

            if (safeGuidFromByteArray.Equals(Guid.Empty))
            {
                ExTraceGlobals.StorageTracer.TraceDebug <int>(0L, "Found task group with invalid group class id. ArrayLength: {0}", (valueOrDefault == null) ? -1 : valueOrDefault.Length);
                return(null);
            }
            return(new TaskGroupInfo(valueOrDefault2, id, safeGuidFromByteArray, TaskGroup.GetGroupTypeFromGuid(safeGuidFromByteArray), valueOrDefault3, valueOrDefault4));
        }