public override string ToString() { var TypeName = $"Revit {((IGH_Goo) this).TypeName}"; if (!IsReferencedElement) { return($"{TypeName} : {DisplayName}"); } var tip = IsValid ? ( IsElementLoaded ? $"{TypeName} : {DisplayName}" : $"Unresolved {TypeName} : {UniqueID}" ) : $"Invalid {TypeName}" + (Id is object?$" : {Id.IntegerValue}" : string.Empty); using (var Documents = Revit.ActiveDBApplication.Documents) { return ( Documents.Size > 1 ? $"{tip} @ {Document?.Title ?? DocumentGUID.ToString()}" : tip ); } }
public override int GetHashCode() => DocumentGUID.GetHashCode() ^ UniqueID.GetHashCode();