Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented missing Journal constructor so Initialize method is called. #310

Merged
merged 5 commits into from
Sep 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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