Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get Properties from vCard format
// For complete examples and data files, please go to https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-.NET
using (VCardFormat format = new VCardFormat(@"D:\input.vcf"))
{
foreach (VCardMetadata vCard in format.VCardInfo)
{
Console.WriteLine(vCard.IdentificationRecordset.Name);
PrintArray(vCard.IdentificationRecordset.FormattedNames);
PrintArray(vCard.CommunicationRecordset.Emails);
PrintArray(vCard.CommunicationRecordset.Telephones);
}
}
...
...
private static void PrintArray(string[] values)
{
if (values != null)
{
foreach (string value in values)
{
Console.WriteLine(value);
}
}
}
// For complete examples and data files, please go to https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-Java
try (VCardFormat format = new VCardFormat("D:\\input.vcf"))
{
for (VCardMetadata vCard : format.getVCardInfo())
{
System.out.println(vCard.getIdentificationRecordset().getName());
printArray(vCard.getIdentificationRecordset().getFormattedNames());
printArray(vCard.getCommunicationRecordset().getEmails());
printArray(vCard.getCommunicationRecordset().getTelephones());
}
}
...
...
private static void printArray(String[] values)
{
if (values != null)
{
for (String value : values)
{
System.out.println(value);
}
}
}
// For complete examples and data files, please go to https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-.NET
// Apply your metered license
Metered metered = new Metered();
metered.SetMeteredKey("PublicKey", "PrivateKey");
//..
// Use the API features such as getting metadata etc.
//..
// Check credit consumption
var credits = Metered.GetConsumptionCredit();
// For complete examples and data files, please go to https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-Java
// Apply your metered license
Metered metered = new Metered();
metered.setMeteredKey("PublicKey", "PrivateKey");
//..
// Use the API features such as getting metadata etc.
//..
// Check credit consumption
double credits = Metered.getConsumptionCredit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment