Skip to content

Commit

Permalink
Merge pull request #310 from HitTheDrum/master
Browse files Browse the repository at this point in the history
Implemented missing Journal constructor so Initialize method is called.
  • Loading branch information
rianjs authored Sep 19, 2017
2 parents 2e1fa3b + 7a3f471 commit 2b1a176
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
11 changes: 7 additions & 4 deletions net-core/Ical.Net/Ical.Net/Components/Journal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@ public JournalStatus Status
set => Properties.Set("STATUS", value);
}

private void Initialize()
/// <summary>
/// Constructs an Journal object, with an iCalObject
/// (usually an iCalendar object) as its parent.
/// </summary>
public Journal()
{
Name = Components.Journal;
}

protected override bool EvaluationIncludesReferenceDate => true;

protected override void OnDeserializing(StreamingContext context)
{
base.OnDeserializing(context);
Initialize();
}

protected bool Equals(Journal other) => Start.Equals(other.Start) && Equals(other as RecurringComponent);
Expand Down
9 changes: 6 additions & 3 deletions v2/ical.NET/Components/Journal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ public JournalStatus Status
set { Properties.Set("STATUS", value); }
}

private void Initialize()
/// <summary>
/// Constructs an Journal object, with an iCalObject
/// (usually an iCalendar object) as its parent.
/// </summary>
public Journal()
{
Name = Components.Journal;
}

protected override bool EvaluationIncludesReferenceDate => true;

protected override void OnDeserializing(StreamingContext context)
{
base.OnDeserializing(context);
Initialize();
}

protected bool Equals(Journal other) => Start.Equals(other.Start) && Equals(other as RecurringComponent);
Expand Down

0 comments on commit 2b1a176

Please sign in to comment.