void AddOpenDocumentTimerMetadata(OpenDocumentMetadata metadata, FileOpenInformation info, Document document, bool result) { if (document != null) { metadata.EditorType = document.DocumentController.GetType().FullName; } if (info.Owner != null) { metadata.OwnerProjectGuid = (info.Owner as SolutionItem)?.ItemId; } metadata.Extension = info.FileName.Extension; metadata.ResultString = result ? "Success" : "Failure"; }