I have tried a few things and have not yet met success.

1.
            pnickname = new extensioncollection<nicknameelement>(new
atomentry());
            nicknameelement pnick = new nicknameelement
("[EMAIL PROTECTED]");
            pnickname.add(pnick);

            messagebox.show("count " + pnickname.count);
            messagebox.show("index " + pnickname.indexof(pnick));
            messagebox.show("is there " + pnickname.contains(pnick));

I cannot figure out how to attach this to an UserEntry to update.

2.
            ExtendedProperty property = new ExtendedProperty();
            property.Name = "Animal";
            property.Value = "cow";
            gmailUser.ExtensionElements.Add(property);
            gmailUser.Update();

            gmailUser = service.RetrieveUser("testuser");
            foreach (object var in gmailUser.ExtensionElements)
            {
                ExtendedProperty p = var as ExtendedProperty;
                if (p != null)
                {
                    MessageBox.Show(p.Name);
                }
            }

This code appears to not update the UserEntry with the new
ExtendedProperty. I assume I am correctly reading the
ExtendedProperties for a UserEntry.

3.
            gmailUser.CreateExtension("Pnickname",
gmailUser.Name.AttributeNamespaces.ToString());

            gmailUser.SetExtensionValue("Pnickname",
gmailUser.Name.AttributeNamespaces.ToString(), "[EMAIL PROTECTED]");
// tag or namespace inccorrect exception

            //gmailUser.ReplaceExtension("Pnickname",
AppsNameTable.AppsNamespace, xproperites);
//attempt from looking at google data api sdk

            MessageBox.Show("Extended property " +
gmailUser.FindExtension("Pnickname",
gmailUser.Name.AttributeNamespaces.ToString()) as String);
            MessageBox.Show("pnickname " + gmailUser.GetExtensionValue
("Pnickname", gmailUser.Name.AttributeNamespaces.ToString()));

This code I cannot seem to find the correct namespace I have tried
(  AppsNameTable.AppsNamespace ,   gmailUser.Name.ToString(),
gmailUser.Name.AttributeNamespaces.ToString()  ) and a few other
failures.


Can you point me in the right direction. Any code examples would be
appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to