You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm really happy to see PDI open-sourced now. I bought a PDI license long-long ago.
So, I've migrated some legacy code to use the NuGet lib and have a couple of unit tests that are failing.
In particular, I noticed Recurrence.ToStringWithStartDateTime() includes custom properties into the recurrence rule. However, creating a new recurrence (from the original serialization) won't include the custom properties. For example, the following unit test fails:
var source = new Recurrence
{
StartDateTime = DateTime.Parse("1/1/2008 4:30 AM"),
RecurUntil = DateTime.Parse("1/5/2008 5:30 AM")
};
source.RecurDaily( 1 );
source.CustomProperties.Add("hello");
var ruleAsString = source.ToStringWithStartDateTime();
Console.WriteLine( ruleAsString );
//FREQ=DAILY;UNTIL=20080105T133000Z;hello;X-EWSOFTWARE-DTSTART=20080101T123000Z
var target = new Recurrence( ruleAsString );
target.CustomProperties.Count.Should().Be(1);
//Expected 1, but found 0.
I'd be happy to send you a pull request that fixes the issue. Thanks!
The text was updated successfully, but these errors were encountered:
bchavez
changed the title
Custom Properties Not Parsed
Recurrence Custom Properties Not Parsed
May 25, 2015
Although not enforced when adding them, custom properties are expected to be in the form "X-NAME=Value" per the specification. Since a name alone without a value doesn't conform to what is being parsed, it does end up being ignored. It can be extended to support non-standard properties that are names alone so if you've got a patch, I can merge it.
Ah yes, thank you. The unit test is passing now with "X-NAME=Value". I should have looked more closely at the parsing method. Sorry I missed that. It's probably okay the way it is currently. Thanks Eric.
Hi,
I'm really happy to see PDI open-sourced now. I bought a PDI license long-long ago.
So, I've migrated some legacy code to use the NuGet lib and have a couple of unit tests that are failing.
In particular, I noticed
Recurrence.ToStringWithStartDateTime()
includes custom properties into the recurrence rule. However, creating a new recurrence (from the original serialization) won't include the custom properties. For example, the following unit test fails:I'd be happy to send you a pull request that fixes the issue. Thanks!
The text was updated successfully, but these errors were encountered: