Code Monkey home page Code Monkey logo

vcardlib's Introduction

vCardLib

Build status Coverage Status NET Standard NuGet Badge License: MIT

Documentation can be found at documentation site

T this library supports reading multiple contacts from a single vcf file, a stream or a contact string and returns the contact objects in a List. The library currently supports only vCard version 2.1 and 3.0 (a curated list of properties supported can be seen on the documentation site).

How to use the library:

First get this package from nuget via your package manager:

Install-Package vCardLib.dll

or

dotnet add package vCardLib.dll

For Deserialization

Import the namespaces:

using vCardLib.Deserializers;

In your class you call the static method 'FromFile' and pass a string containing a path to it:

string filePath = //path to vcf file;

var contacts = Deserializer.FromFile(filePath);

Or read your contacts from a Stream:

var stream = //generate a stream somehow;
var contacts = Deserializer.FromStream(stream);

Or read your contacts from a string:

var contactDetails = @"BEGIN:VCARD
N:John;Doe;;;
END:VCARD";
var contacts = Deserializer.FromString(contactDetails);

Iterate over the contact collection and pick the vCard objects:

foreach(var contact in contacts)
{
  Console.WriteLine(contact.FormattedName);
}

complete documentation on github.io

vcardlib's People

Contributors

crowar avatar rmja avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.