FolkerKinzel.VCards
3.0.0-alpha.1
Prefix Reserved
See the version list below for details.
dotnet add package FolkerKinzel.VCards --version 3.0.0-alpha.1
NuGet\Install-Package FolkerKinzel.VCards -Version 3.0.0-alpha.1
<PackageReference Include="FolkerKinzel.VCards" Version="3.0.0-alpha.1" />
paket add FolkerKinzel.VCards --version 3.0.0-alpha.1
#r "nuget: FolkerKinzel.VCards, 3.0.0-alpha.1"
// Install FolkerKinzel.VCards as a Cake Addin #addin nuget:?package=FolkerKinzel.VCards&version=3.0.0-alpha.1&prerelease // Install FolkerKinzel.VCards as a Cake Tool #tool nuget:?package=FolkerKinzel.VCards&version=3.0.0-alpha.1&prerelease
FolkerKinzel.VCards
.NET library to read, write and convert VCF files that match the vCard standards 2.1, 3.0 and 4.0.
It allows
- to load VCF files from the file system and to save them there,
- to serialize VCF files from and to Streams and
- to convert VCF files, that match the vCard versions 2.1, 3.0 and 4.0, to each other.
FolkerKinzel.VCards is used as a dependency in FolkerKinzel.Contacts.IO - an easy to use .NET-API to manage contact data of organizations and natural persons.
Project Reference and Release Notes
Overview
The Data Model Explained
The data model used by this API is aligned to the vCard 4.0 standard (RFC6350). This means, every read vCard of version 2.1 and 3.0 is internally converted to vCard 4.0. When saved and serialized, they are converted back. A vCard is represented by the VCard
class.
The VCardProperty
Class
The data model of the VCard
class based on classes, that are derived from VCardProperty
.
VCardProperty
exposes the following members:
public abstract class VCardProperty
{
public string? Group { get; set; }
public ParameterSection Parameters { get; }
public virtual object? Value { get; protected set; }
}
This reflects the structure of a data row in a VCF file:
group1.TEL;TYPE=home,voice;VALUE=uri:tel:+49-123-4567
In this example corresponds
group1
to VCardProperty.Group,TEL;TYPE=home,voice;VALUE=uri
to VCardProperty.Parameters andtel:+49-123-4567
to VCardProperty.Value.
(Classes that are derived from VCardProperty
hide the generic implementation of VCardProperty.Value
in order to return derived classes instead of System.Object?
.)
Naming Conventions
Most properties of the VCard
class are collections. It has to do with, that many properties are allowed to have more than one instance per vCard (e.g. phone numbers, e-mail addresses). Such properties are named in Plural.</para>
A special feature are properties whose name ends with "Views": These are properties, which actually is only one instance per vCard allowed, but vCard 4.0 enables you to have different versions of that single instance (e.g. in different languages). You must set the same AltID
parameter on each of them.
Usage of the Namespaces
The following code example provides tips for using the namespaces of the library.
// Publish this namespace - it contains the VCard class:
using FolkerKinzel.VCards;
// It's recommended to publish also this namespace -
// it contains useful extension methods:
using FolkerKinzel.VCards.Extensions;
// These two namespaces may be published, but it's not
// recommended as they contain lots of classes and enums:
// using FolkerKinzel.VCards.Models;
// using FolkerKinzel.VCards.Models.Enums;
// Instead of publishing the two namespaces above
// better use a namespace alias:
using VC = FolkerKinzel.VCards.Models;
namespace NameSpaceAliasDemos
{
public static class NameSpaceAliasDemo
{
public static void HowToUseTheNameSpaceAlias() =>
_ = new VC::RelationTextProperty("Folker", VC::Enums.RelationTypes.Contact);
}
}
How the Library Handles Data Errors
Parse errors, caused by not well-formed VCF files, are silently ignored by the library: It reads as much as it can from such files.
The same is for errors caused by incompliant data when serializing the vCard: Because of the different vCard standards are not completely compliant, incompliant data is silently ignored when converting from one vCard standard to another. To minimize this kind of data loss, the library tries to preserve incompliant data using well-known x-name properties. The usage of such x-name properties can be controlled via options (VcfOptions).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.6.1
- FolkerKinzel.Strings (>= 3.2.0-beta.1)
-
.NETStandard 2.0
- FolkerKinzel.Strings (>= 3.2.0-beta.1)
-
.NETStandard 2.1
- FolkerKinzel.Strings (>= 3.2.0-beta.1)
-
net5.0
- FolkerKinzel.Strings (>= 3.2.0-beta.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FolkerKinzel.VCards:
Package | Downloads |
---|---|
FolkerKinzel.Contacts.IO
Small and easy to use framework for .NET to manage contact data of organizations and natural persons, including a data model and classes to persist it as vCard (*.vcf) or CSV. |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on FolkerKinzel.VCards:
Repository | Stars |
---|---|
ONLYOFFICE/CommunityServer
Free open source office suite with business productivity tools: document and project management, CRM, mail aggregator.
|
|
shr670377723/CommunityServer-master
|
Version | Downloads | Last updated |
---|---|---|
7.4.3 | 38 | 11/14/2024 |
7.4.2 | 143 | 11/9/2024 |
7.4.1 | 193 | 11/3/2024 |
7.4.0 | 73 | 11/2/2024 |
7.4.0-beta.1 | 44 | 10/27/2024 |
7.3.0 | 298 | 10/20/2024 |
7.3.0-beta.2 | 41 | 10/17/2024 |
7.3.0-beta.1 | 51 | 10/13/2024 |
7.2.2 | 1,707 | 10/6/2024 |
7.2.1 | 831 | 9/14/2024 |
7.2.0 | 2,988 | 7/21/2024 |
7.2.0-beta.2 | 52 | 7/16/2024 |
7.2.0-beta.1 | 52 | 7/13/2024 |
7.1.2 | 2,220 | 6/17/2024 |
7.1.1 | 1,654 | 6/5/2024 |
7.1.0 | 126 | 6/2/2024 |
7.1.0-beta.2 | 62 | 5/26/2024 |
7.1.0-beta.1 | 59 | 5/23/2024 |
7.0.0 | 595 | 5/4/2024 |
7.0.0-beta.2 | 90 | 4/28/2024 |
7.0.0-beta.1 | 83 | 4/14/2024 |
6.2.1 | 1,388 | 4/11/2024 |
6.2.0 | 392 | 3/18/2024 |
6.2.0-beta.3 | 65 | 3/10/2024 |
6.2.0-beta.2 | 63 | 3/10/2024 |
6.2.0-beta.1 | 55 | 3/10/2024 |
6.1.0 | 2,808 | 11/7/2023 |
6.0.0 | 116 | 11/5/2023 |
6.0.0-beta.2 | 79 | 10/30/2023 |
6.0.0-beta.1 | 80 | 10/25/2023 |
5.0.0-beta.3 | 119 | 7/11/2023 |
5.0.0-beta.2 | 89 | 7/2/2023 |
5.0.0-beta.1 | 86 | 6/24/2023 |
4.0.0 | 49,726 | 1/30/2022 |
3.1.1 | 2,462 | 1/23/2022 |
3.1.0 | 3,708 | 12/25/2021 |
3.0.0 | 1,289 | 11/14/2021 |
3.0.0-beta.1 | 264 | 10/30/2021 |
3.0.0-alpha.2 | 175 | 9/8/2021 |
3.0.0-alpha.1 | 155 | 8/30/2021 |
2.2.0 | 9,062 | 6/11/2021 |
2.1.1 | 594 | 4/4/2021 |
2.1.0 | 854 | 3/6/2021 |
2.1.0-rc | 257 | 2/27/2021 |
2.1.0-beta | 274 | 2/10/2021 |
2.0.2-alpha | 208 | 2/7/2021 |
2.0.0 | 629 | 1/30/2021 |
2.0.0-rc | 794 | 1/25/2021 |
2.0.0-beta.2 | 204 | 1/20/2021 |
2.0.0-beta | 256 | 1/8/2021 |
2.0.0-alpha | 248 | 1/5/2021 |
1.4.4 | 737 | 9/19/2020 |
1.4.3 | 708 | 5/25/2020 |
1.4.2 | 715 | 5/5/2020 |