Breaking Changes
Listing all the breaking changes.
Last updated
Listing all the breaking changes.
Last updated
There are new releases of VisualCard that cause breaking changes, so you'll need to take them into consideration when upgrading your program to use later versions of VisualCard. Here are the version upgrade paths:
During the v0.x upgrade to v1.0, you'll need to consider the following:
-1
0
0
N
-1
In earlier versions of VisualCard, it allowed any and all of the types, even those that are not supported in all the RFC documents as specified in the How to use page. Starting from VisualCard v1.0, the following base types are supported:
HOME
, WORK
, and PREF
X-nonstandard
types
The extra types are written in a separate page, Card Parts.
If the type that is specified is not supported by a property, such as warehouse
type in the address property, VisualCard will throw an exception. This will break cards that are generated in a non-standard way.
During the v1.x upgrade to v3.0, you'll need to consider the following:
We've moved extra features that just make use of the VisualCard base library to its own library, VisualCard.Extras
. As a result, the above classes have been moved to their appropriate namespace defined by that library.
VisualCard.Converters
-> VisualCard.Extras.Converters
VisualCard.Extras
-> VisualCard.Extras.Misc
Due to missing parts from the vCalendar 1.0 original specification text output, we've had to change NoteAlarm
's name to MailAlarm
so that it doesn't mislead developers. As a result, MALARM
is now considered as a proper alarm with mail as alarm method. We've also changed the class name like so:
We've changed the date definitions from DateTime
to DateTimeOffset
as there is confusion when dealing with time offsets as explained here. VisualCard deals with date and time which may be described as local time according to a specific time zone.
Recurrence date information can be get from either a date and time pair or a date/time and a duration string representation. We've used an array of TimePeriod
instead of DateTimeOffset
to give better support for vCalendar files that contain recurrence periods.
Amidst the recent improvements that affected how the strings and the integers are returned, we needed to add support for extra properties, type parsing, and value type parsing. As a result, we've changed these functions so that they return the corresponding ValueInfo classes:
Cards: CardValueInfo
Calendars: CalendarValueInfo
ArgumentInfo
provided a class instance that allowed you to have a better look at the arguments after either a vCard or a vCalendar has been parsed. The property is still there, but we've changed it to become an array of ArgumentInfo
so that you can handle the arguments with more care.
As a result, we've removed the ArgumentValues
property as it's been replaced with the ArgumentInfo
class instance.
We've introduced the CardKind
enumeration, so we've decided to make the above property return that enumeration.
During the v3.0 upgrade to v3.1, you'll need to consider the following:
The following classes are affected with this change:
BaseCardPartInfo
CardValueInfo
BaseCalendarPartInfo
CalendarValueInfo
The above property has been edited so that it points to the relevant PropertyInfo
instance that contains the Arguments
property, which has exactly the same amount of information that you'd obtain from there.
During the v3.1 upgrade to v3.2, you'll need to consider the following:
We have merged the two above classes into the ValueInfo
class found in the main VisualCard library as we have spotted common properties that are found in both the above classes. As we want to get rid of redundancy, we've merged them together.
During the v3.2 upgrade to v4.0, you'll need to consider the following:
As part of the API refinement that was planned for v4.0, we've migrated the following component-agnostic code to the common library, which is VisualCard.Common
:
ArgumentInfo
[class]
PropertyInfo
[class]
RecurrenceParser
[class]
RecurrenceRule
[class]
RecurrenceRuleFrequency
[enum]
VcardCommonTools
-> CommonTools
[class]
TimePeriod
[class]
PartType
[enum]
ExtraInfo
[class]
XNameInfo
[class]
ValueInfo
[class]
In addition to that, we've introduced the BasePartInfo
that BaseCardPartInfo
and BaseCalendarPartInfo
inherit from to reduce code repetition, such as the X-nonstandard and the extra part info classes that are component-agnostic.
We've separated the IANA and the non-standard properties as a result of the above breaking change related to VisualCard.Common
, because IANA and non-standard properties can be found in both the card and the calendar instances.
You can no longer use the GetPartsArray()
function and the PartsArray
property to get IANA and non-standard properties. You should use the GetExtraPartsArray()
function and the ExtraParts
property instead.
PropertyInfo
used to hold several property information properties that allowed you to get more information about a property, such as a number of arguments.
Over time, while we were making major structural changes to simplify the codebase, PropertyInfo
was an obstacle that got in our way, so we had to basically move relevant properties to ValueInfo
and base part classes. The following properties have been moved:
AltId
Group
NestedGroups
Arguments
Encoding
Type
namespace VisualCard.Converters
{
public static class AndroidContactsDb
public static class MeCard
}
namespace VisualCard.Extras
{
public static class CardGenerator
}
public enum CalendarPartsArrayEnum
{
(...)
NoteAlarm,
(...)
}
- public class NoteAlarmInfo : BaseCalendarPartInfo, IEquatable<NoteAlarmInfo>
+ public class MailAlarmInfo : BaseCalendarPartInfo, IEquatable<MailAlarmInfo>
// This also applies to all type instances that used DateTime
public DateTime Anniversary { get; }
public DateTimeOffset[]? RecDates { get; }
public string GetString(StringsEnum key)
public string GetString(CalendarStringsEnum key)
public double GetInteger(CalendarIntegersEnum key)
public virtual string[] Arguments { get; internal set; } = [];
public virtual string[]? Arguments { get; internal set; }
public string CardKind
public virtual ArgumentInfo[] Arguments { get; internal set; } = [];
public class CardValueInfo<TValue> : IEquatable<CardValueInfo<TValue>>
{
(...)
}
public class CalendarValueInfo<TValue> : IEquatable<CalendarValueInfo<TValue>>
{
(...)
}
public enum PartsArrayEnum
public enum StringsEnum
public class PropertyInfo : IEquatable<PropertyInfo?>
N:Navasquillo;Neville;Neville\,Nevile;Mr.;Jr.
N;ALTID=0;LANGUAGE=de:NAVASQUILLO;Neville;Neville\,Nevile;Mr.;Jr.