Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            CardDav.Client client = new CardDav.Client(this.urlTxt.Text, this.usernameTxt.Text, this.passwordTxt.Text);

            CardDavResponse response = client.Get();

            /** Output the results from the Listing **/

            resultsTxt.Text = response.ToString();

            /** Set the client to the proper Address Book server URL **/
            client.SetServer(response.AddressBooks.First().Url.ToString());
            vCard card = client.GetVCard(response.Cards.First().Id);

            resultsTxt.Text = resultsTxt.Text + "\r\n\r\n\r\n" + card.ToString();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            string uri      = "https://contacts.cloze.com/carddav/addressbooks/[email protected]/default/";
            string username = "******";
            string password = "******";

            CardDav.Client client = new CardDav.Client(uri, username, password);

            CardDavResponse response = client.Get();

            /** Output the results from the Listing **/

            string results = response.ToString();

            /** Set the client to the proper Address Book server URL **/
            client.SetServer(response.AddressBooks.First().Url.ToString());
            vCard card = client.GetVCard(response.Cards.First().Id);

            results = results + "\r\n\r\n\r\n" + card.ToString();
        }