EWSoftware PDI Class Library
The EWSoftware Personal Data Interchange (PDI) Library presents you
with a complete set of classes that let you have access to all objects,
properties, parameter types, and data types as defined by the vCard (RFC
2426), vCalendar, and iCalendar (RFC 2445) specifications. Using these
classes, you can read and write data files in a well-defined format used by
many applications on various platforms to exchange personal information
such as business cards, telephone numbers, addresses, dates and times of
appointments, etc. A recurrence engine is also provided that allows you to
easily and reliably calculate occurrence dates and times for even the most
complex recurrence patterns. The classes can be used in both Windows Forms
applications and ASP.NET web applications.
For flexibility, a number of the data type classes such as
Recurrence class are implemented as standalone classes
that can be used independently of the PDI calendar and vCard classes. This
lets you take advantage of their features without including any unnecessary
The library contains the following features:
Click the images for a larger view.
- The library is built in 100% .NET managed code written in C# and
provides a complete implementation of the vCard 2.1, vCard 3.0 (RFC 2426),
vCalendar 1.0, and iCalendar 2.0 (RFC 2445) specifications.
- Objects can be created by parsing them from a data stream such as a
string, text file, or a URL or in code using a rich, consistent object
- Type-safe, enumerable, searchable, sortable collection classes are
provided for all of the objects that need a collection class. Almost all
of the collections also have overloaded
AddRange methods to quickly and easily add values to the them.
Collections containing objects with unique IDs (vCard, event, journal, to
do, and free/busy items) can be indexed using a unique ID value.
- PDI object collections support standard data binding on the collection,
top level properties, and child properties up to three levels deep.
- Some of the classes like
support serialization (XML, SOAP, and binary).
- The recurrence engine which supports all iCalendar 2.0 recurrence
patterns and options is separate from the PDI data classes. As such, if
all you need is recurrence pattern generation without support for
exceptions or other features provided by the calendar classes, you only
need to reference one assembly containing just those classes that you need.
- The recurrence engine is very fast and supports the full date/time
range of the .NET
DateTime data type (01/01/0001 12:00:00AM to
Recurrence class provides a type-safe enumerator
so that you can use a recurrence object in a
foreach loop to
iterate over the entire set of date/times generated by a recurrence
pattern. Alternately, you can use various class methods to obtain a
DateTimeCollection for all instances or a range of instances
generated by the pattern.
- Additional classes are provided to define and determine the dates on
which holidays fall (
can be used in conjunction with the recurrence engine to filter out
recurrence dates when they fall on a holiday. They can also be used by
themselves for any other purpose you may have that requires tracking
- Holidays can be defined as fixed (occurring on a specific month and day
with optional support for moving them to the preceeding Friday if they fall
on a Saturday or the following Monday if they fall on a Sunday) or as
floating (occurring on a specific instance of a day of the week in a given
month). As with the recurrence engine, the holiday classes supports the
full date/time range of the .NET
DateTime data type.
- When the recurrence engine is used in conjunction with the PDI calendar
VJournal), full support is
provided for multiple recurrence rules, recurrence dates, exception rules,
and exception dates so that very complex recurrence sets can be generated.
Instances can be generated in local time or the time zone of the component.
- Parser classes are provided to read vCard, vCalendar, and iCalendar
files. The parsers are fast and flexible enough to handle PDI data in any
format regardless of spacing, line folding, text case, and object,
property, or parameter order. Simply pass them a string, filename, URL, or
TextReader-derived stream class and they will do all of the work
necessary to load the objects.
- All PDI classes are able to write themselves out in the appropriate
format based on the specification version including encoding and folding
lines where appropriate. Simply use their
ToString method or use
WriteToStream method to save them to a
- Encoding and decoding support is built into the property classes and
they can handle all defined types including inline quoted-printable and
Base64 encoded binary data.
- Switching between specification versions is achieved by setting the
Version property on a top-level object such as
- Support for iCalendar 2.0 time zones is provided. The
VTimeZoneCollection classes contain information about time zone
objects found in an iCalendar file. For calender properties that utilize
TimeZoneID (TZID) parameter, their date/time values are
converted to/from local time automatically. You can also access the
underlying date/time for the time zone itself.
- Utility methods are provided in the
VCalendar class to convert
date/times from one time zone to another and between a time zone and local
time. The methods are Daylight Saving Time aware and will take it into
account when necessary based on the observance rules defined in the
- Other methods are provided in the components to apply a time zone with
date/time adjustment to the calendar as a whole or to individual components
and to set a time zone ID without changing the date/time values in the
calendar as a whole or in individual components.
- Some Windows Forms controls are provided for interacting with the PDI
classes (i.e. a holiday manager user control, holiday properties dialog,
recurrence pattern user controls, and a recurrence properties dialog).
- An ASP.NET web server control is provided for editing recurrence patterns
in a user-friendly fashion similar to the Windows Forms Recurrence Pattern
HolidayManager control is used to maintain a set of holidays.
The set can optionally be saved to and loaded from an XML file. The
HolidayPropertiesDlg is used to edit the properties of the holiday items.
RecurrencePropertiesDlg uses the
to allow the editing of recurrence rule patterns. In simple mode (shown on the
left), the control uses a simple set of controls to allow you to edit patterns
in a fashion similar to Microsoft Outlook. When the Advanced checkbox
is checked, it switches to a more complete set of options to allow you finer
control over all of the possible recurrence rule parts. When initially opened,
the control examines the supplied pattern to determine the best mode to start
in based on the rule parts present in the pattern. Advanced mode can be
disabled to lock the control into only allowing the creation of simple patterns
Various demo applications are included to show you how the classes can be used.
The vCard Browser shown below demonstrates how to load a vCard file and
edit vCard properties. Some sample vCard files are included the download.
The Calendar Browser shown below demonstrates how to load a
vCalendar or an iCalendar file and edit the various component properties.
Some sample calendar files are included the download.
The web application demonstrates various aspects of the EWSoftware
PDI classes (a C# and a VB.NET version are included in the download).
It covers most of the same areas as the other Windows Forms applications
included in the download and shows several examples of data binding with
the collection objects. It also demonstrates the recurrence pattern editor
web server control. You can try it out by
The shareware version of the EWSoftware PDI Library can be downloaded here:
NOTE: The recurrence class in the shareware version will not
generate any instances past May 31st, 2007. The vCard and
vCalendar/iCalendar classes also add a custom shareware tag to all output
files and the web server control displays a link to this page. In the
licensed version, the recurrence class supports all future dates and the
shareware tags are not output to the PDI files or in the web server control.
See above for a live demo.
The supplied demo projects are Visual Studio 2005 projects but can be
opened and converted to Visual Studio 2008 projects without any problems.
New Feature Requests
The components in this library provide an extensive set of features. However,
everyone has different needs, some of which might not have been anticipated.
If you find that these controls are missing features that you need, please
feel free to make a request to have them added. Every effort will be made
to work them into a future release.
A single user license or a site license can be purchased. The single user
license is for a single developer on a single PC. The site license is for
any number of developers at a single location. The licensed version
contains fully commented C# source code for all classes and controls in the
library. Technical support and bug fixes will be supplied to licensed users
free of charge. Once purchased, distribution of the assemblies containing
the classes and controls with your applications is royalty-free (see
the enclosed license agreement for full details).
Payment and Delivery
For fastest delivery, please choose a payment option below. Payment is
handled via PayPal and you will be e-mailed a URL within two (2) business
days that allows you to download the licensed version from this site. If
you would prefer to pay by an alternate method such as check or money
order, please contact the author directly at
NOTE: The download URL will be sent to the e-mail address on the
PayPal invoice. If you would like it sent to an alternate e-mail address,
please e-mail a note containing the alternate e-mail address at the same
time payment is made.
For a full list of all changes in prior versions see the help file supplied
with the download.
||22.214.171.124 - Minor update: Fixed some issues in the
VCalendar time zone conversion methods that caused incorrect
times or time zone names when crossing a standard to daylight saving time
boundary and vice versa.
Added support for parsing vNote objects defined in the IrMC 1.1
BodyProperty). A new
section for vNote was added to the PDI Road Map help file topic.
||126.96.36.199 - Changes in this release:
- General Changes
- Added a
TryParse method to the
- Added a
UtcDateTime property to
BaseDateTimeProperty to get or set the value as a date/time
value expressed in Universal Time.
- Added the
EWSoftware.PDI.Binding namespace that
contains a generic base collection class along with some supporting
- All collections in the library now derive from a generic base
ExtendedBindingList<T> is bindable and contains several
utility methods for searching and sorting the collection using predicates.
- Fixed vCard 2.1 and vCalendar 1.0 properties so that they did
not escape commas unnecessarily.
- Added a topic to the help file to clarify the various time
formats used by the calendar objects and how to work with them.
- Added a topic to the help file to describe the data binding
capabilities of the
- Updated the time zone information file used by the web demos to
reflect recent changes in Daylight Saving Time.
- PDI Object and Property Classes
- Child properties in
VToDo are now bindable as well.
In order to bind to a child property, separate its name from the parent
property using an underscore (i.e.
TimeZoneId_Value). The demo applications contain examples.
The child property binding mechanism can be extended to other classes at
runtime by adding their type to the description provider by passing the type
to the static
- Breaking Change: The
delegate has been removed. Use the generic form
- Breaking Change: The use of
System.Collections.Specialized.StringCollection has been
replaced with the use of
may cause some conflicts. Update any affected code to use the new
PDI library string collection class instead.
- Web controls
- The recurrence pattern control now renders a fully
client-side DHTML implementation of the recurrence pattern editor with no
- Breaking Change: The
property has been replaced by the
MaximumPattern property. This
lets you specify a
RecurFrequency option that determines the
maximum pattern type that will be editable.
- Breaking Change: The
method had been renamed
Focus to match the .NET 2.0 method in the
standard web controls.
- Windows Forms Controls
- Breaking Change: The
RecurrencePropertiesDlg.ShowTimePatterns properties have been
replaced by the
MaximumPattern property. This lets you specify a
RecurFrequency option that determines the maximum pattern type
that will be editable.
- Breaking Change: The
been rewritten to utilize standard data binding using a
This greatly simplifies the code needed to edit collection items. If you
currently make use of this control to edit the PDI collections. See the
demos for examples on how to use the updated browse control.
- Demo Applications
- The demos have been updated to make use of the new features
available in the .NET 2.0 version of the library. Much of the code related
to sorting and binding has been eliminated and those operations have been
greatly simplified. The collections now contain built-in generic search
and sort methods and they also contain improved data binding support.
||188.8.131.52 - Minor Update: Fixed a couple of vCard 2.1 properties
so that they did not escape special characters twice under certain
||184.108.40.206 - Minor Update: Added static
methods to convert time zone date/times to/from universal time. Fixed
VCalendar.TimeZoneToTimeZone so that it correctly converts times between
time zones near the standard time/daylight saving time shift.
||220.127.116.11 - Minor Update: Made another adjustment to the parser's
handling of line folds so that it handles soft line breaks in quoted printable
text with no data on the next line.