• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class VCardBuilder

Builder for constructing VCard instances for writing.

Inheritance
object
VCardBuilder
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Mail.Rfc.VCard
Assembly: DRIT.Mail.dll
Syntax
public sealed class VCardBuilder

Methods

View Source

Address(Action<VCardAddressBuilder>)

Adds a delivery address (ADR) configured by the specified callback.

Declaration
public VCardBuilder Address(Action<VCardAddressBuilder> configure)
Parameters
Type Name Description
Action<VCardAddressBuilder> configure

Specifies the configure value.

Returns
Type Description
VCardBuilder
View Source

Birthday(DateTime)

Sets the birthday (BDAY).

Declaration
public VCardBuilder Birthday(DateTime birthday)
Parameters
Type Name Description
DateTime birthday

Specifies the birthday value.

Returns
Type Description
VCardBuilder
View Source

Build()

Builds the VCard.

Declaration
public VCard Build()
Returns
Type Description
VCard
View Source

Categories(params string[])

Adds categories (CATEGORIES).

Declaration
public VCardBuilder Categories(params string[] categories)
Parameters
Type Name Description
string[] categories

Specifies the categories value.

Returns
Type Description
VCardBuilder
View Source

Classification(VCardClassification?)

Sets the classification (CLASS).

Declaration
public VCardBuilder Classification(VCardClassification? classification)
Parameters
Type Name Description
VCardClassification? classification

Specifies the classification value.

Returns
Type Description
VCardBuilder
View Source

Email(string, params VCardEmailType[])

Adds an email address (EMAIL) with the specified types.

Declaration
public VCardBuilder Email(string address, params VCardEmailType[] types)
Parameters
Type Name Description
string address

Specifies the address value.

VCardEmailType[] types

Specifies the types value.

Returns
Type Description
VCardBuilder
View Source

ExtendedProperty(string, string)

Adds an X-* extension property.

Declaration
public VCardBuilder ExtendedProperty(string name, string value)
Parameters
Type Name Description
string name

Specifies the name value.

string value

The value to process.

Returns
Type Description
VCardBuilder
View Source

FormattedName(string)

Sets the formatted display name (FN).

Declaration
public VCardBuilder FormattedName(string name)
Parameters
Type Name Description
string name

Specifies the name value.

Returns
Type Description
VCardBuilder
View Source

Geo(double, double)

Sets the geographic position (GEO).

Declaration
public VCardBuilder Geo(double latitude, double longitude)
Parameters
Type Name Description
double latitude

Specifies the latitude value.

double longitude

Specifies the longitude value.

Returns
Type Description
VCardBuilder
View Source

Name(VCardName?)

Sets the structured name (N) from a VCardName instance.

Declaration
public VCardBuilder Name(VCardName? name)
Parameters
Type Name Description
VCardName name

Specifies the name value.

Returns
Type Description
VCardBuilder
View Source

Name(string?, string?, string?, string?, string?)

Sets the structured name (N).

Declaration
public VCardBuilder Name(string? family, string? given, string? additional = null, string? prefix = null, string? suffix = null)
Parameters
Type Name Description
string family

Specifies the family value.

string given

Specifies the given value.

string additional

Specifies the additional value.

string prefix

Specifies the prefix value.

string suffix

Specifies the suffix value.

Returns
Type Description
VCardBuilder
View Source

Nicknames(params string[])

Adds nicknames (NICKNAME).

Declaration
public VCardBuilder Nicknames(params string[] nicknames)
Parameters
Type Name Description
string[] nicknames

Specifies the nicknames value.

Returns
Type Description
VCardBuilder
View Source

Note(string?)

Sets the note (NOTE).

Declaration
public VCardBuilder Note(string? note)
Parameters
Type Name Description
string note

Specifies the note value.

Returns
Type Description
VCardBuilder
View Source

Organization(string?)

Sets the organization (ORG).

Declaration
public VCardBuilder Organization(string? organization)
Parameters
Type Name Description
string organization

Specifies the organization value.

Returns
Type Description
VCardBuilder
View Source

PhoneNumber(string, params VCardPhoneType[])

Adds a telephone number (TEL) with the specified types.

Declaration
public VCardBuilder PhoneNumber(string number, params VCardPhoneType[] types)
Parameters
Type Name Description
string number

Specifies the number value.

VCardPhoneType[] types

Specifies the types value.

Returns
Type Description
VCardBuilder
View Source

Photo(byte[], string)

Sets the photo (PHOTO) with the specified media type.

Declaration
public VCardBuilder Photo(byte[] data, string mediaType)
Parameters
Type Name Description
byte[] data

The data to process.

string mediaType

The media type used by the operation.

Returns
Type Description
VCardBuilder
View Source

ProductId(string?)

Sets the product identifier (PRODID).

Declaration
public VCardBuilder ProductId(string? productId)
Parameters
Type Name Description
string productId

The product id identifier.

Returns
Type Description
VCardBuilder
View Source

Revision(DateTimeOffset)

Sets the last revision timestamp (REV).

Declaration
public VCardBuilder Revision(DateTimeOffset revision)
Parameters
Type Name Description
DateTimeOffset revision

Specifies the revision value.

Returns
Type Description
VCardBuilder
View Source

Role(string?)

Sets the business role (ROLE).

Declaration
public VCardBuilder Role(string? role)
Parameters
Type Name Description
string role

Specifies the role value.

Returns
Type Description
VCardBuilder
View Source

TimeZone(string?)

Sets the timezone (TZ).

Declaration
public VCardBuilder TimeZone(string? timeZone)
Parameters
Type Name Description
string timeZone

The time zone used by the operation.

Returns
Type Description
VCardBuilder
View Source

Title(string?)

Sets the job title (TITLE).

Declaration
public VCardBuilder Title(string? title)
Parameters
Type Name Description
string title

Specifies the title value.

Returns
Type Description
VCardBuilder
View Source

Uid(string?)

Sets the unique identifier (UID).

Declaration
public VCardBuilder Uid(string? uid)
Parameters
Type Name Description
string uid

The uid identifier.

Returns
Type Description
VCardBuilder
View Source

Url(string?)

Sets the URL.

Declaration
public VCardBuilder Url(string? url)
Parameters
Type Name Description
string url

Specifies the url value.

Returns
Type Description
VCardBuilder
View Source

Version(VCardVersion)

Sets the vCard version. Defaults to V30.

Declaration
public VCardBuilder Version(VCardVersion version)
Parameters
Type Name Description
VCardVersion version

Specifies the version value.

Returns
Type Description
VCardBuilder
  • View Source
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX