Skip to content

Commit

Permalink
Debug statement cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Oren Nachman committed Oct 21, 2021
1 parent befc648 commit 755ba91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions ChimeHelper/ChimeOutlookHelper/ChimeOutlookHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,17 @@ private static HashSet<string> GetPins(AppointmentItem appointment)
{
var rv = new List<string>();

Debug.WriteLine(appointment.Start + " -> " + appointment.End + ": " + appointment.Subject + "\n\tLocation: " + appointment.Location +
"\n\tRequired Attendees: " + appointment.RequiredAttendees + "\n\tOptional Attendees: " + appointment.OptionalAttendees);

rv.AddRange(Chime.GetPinsFromAttendees(appointment.OptionalAttendees));
rv.AddRange(Chime.GetPinsFromAttendees(appointment.RequiredAttendees));

rv.AddRange(Chime.GetPinsFromText(appointment.Location));
rv.AddRange(Chime.GetPinsFromText(appointment.Body));

/*
Debug.WriteLine(appointment.Start + " -> " + appointment.End + ": " + appointment.Subject + "\n\tLocation: " + appointment.Location +
"\n\tRequired Attendees: " + appointment.RequiredAttendees + "\n\tOptional Attendees: " + appointment.OptionalAttendees);
Debug.WriteLine("\tPins: " + string.Join("\n\t", rv));
*/

return new HashSet<string>(rv);
}
Expand Down
6 changes: 4 additions & 2 deletions ChimeHelper/ChimeOutlookHelper/OutlookHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ internal static class OutlookHelper
catch (Exception e)
{
// Not every root folder has a calendar (for example, Public folders), so this exception can be ignored
// This also catches cases where store cannot be retrieved from a specific index (even though the API
// says it is there. In those cases you'll see something like:
// System.Runtime.InteropServices.COMException (0x80040119): Outlook cannot start because a data file to
// send and receive messages cannot be found. Check your settings in this Microsoft Outlook profile. <snip>
Debug.WriteLine($"Failed to get Calendar for {store?.DisplayName} type: {store?.ExchangeStoreType}:\n{e}");
}
}
Expand Down Expand Up @@ -162,8 +166,6 @@ private static async Task EnsureOutlookIsRunningAsync()
foreach (Outlook.AppointmentItem item in restricted)
{
rv.Add(item);

Debug.WriteLine("++: " + item.Start + " -> " + item.End + ": " + item.Subject);
}

return rv;
Expand Down

0 comments on commit 755ba91

Please sign in to comment.