public static Guid GetFingerprintGUID(this Document doc) { if (doc?.IsValidObject != true) { return(Guid.Empty); } return(ExportUtils.GetGBXMLDocumentId(doc)); }
public static System.Guid DocumentGuid(this Document document) { if (document?.IsValidObject != true) { return(System.Guid.Empty); } return(ExportUtils.GetGBXMLDocumentId(document)); }
private static bool TryGetDocument(this IEnumerable <Document> set, Guid guid, out Document document, Document activeDBDocument = default) { if (guid != Guid.Empty) { // For performance reasons and also in case of conflict the ActiveDBDocument will have priority if (ExportUtils.GetGBXMLDocumentId(activeDBDocument) == guid) { document = activeDBDocument; return(true); } foreach (var doc in set.Where(x => ExportUtils.GetGBXMLDocumentId(x) == guid)) { document = doc; return(true); } } document = default; return(false); }