The dirty flag is used for a different purpose (and probably should  
not be exposed at all to you) when the feed is loaded...

Here is an easy thing you can do:

every object has an ExtensionCollection. Entries in that collection  
have to inherit from a special interface. There is a subclass using  
that interface XmlElement i think is the name. You can subclass from  
there, and just add a custom object to the extensioncollection that  
you can check for.

Frank Mantek
Google
On Nov 12, 2008, at 10:59 PM, FHCIT wrote:

>
> I am working on a active directory <> google apps synchronization
> tool. I am trying to use the dirty the flag for a UserEntry to provide
> transactional support. I have tried setting UserEntry.dirty = true
> this setting holds as long as another gmail command is not issued and
> the connection is held open indefinitely. I cannot find a way to
> retrieve SendAs for the users in the domain, therefore I cannot check
> if any SendAs creations failed/timed out/or the program crashed. If I
> have a persistent dirty flag I forcibly recreate the SendAs or any
> other data updates which may fail. Here is the code I worked with so
> far and the results.
>
> ///
>
>            AppsService service = new AppsService("gmaildomain.com",
> "[EMAIL PROTECTED]", "password");
>            UserEntry gmailUser = service.RetrieveUser("testuser");
>            gmailUser.Dirty = true;
>            MessageBox.Show(gmailUser.Dirty.ToString
> ());                 //returns true
>            MessageBox.Show(gmailUser.IsDirty
> ());                            //returns true
>            gmailUser.Update();
>            MessageBox.Show(gmailUser.Dirty.ToString
> ());                 //returns false
>            MessageBox.Show(gmailUser.IsDirty
> ());                            //returns false
>
>            gmailUser.Dirty = true;
>            MessageBox.Show(gmailUser.Dirty.ToString
> ());                 //returns true
>            MessageBox.Show(gmailUser.IsDirty
> ());                            //returns true
>            service.UpdateUser(gmailUser);
>            MessageBox.Show(gmailUser.Dirty.ToString
> ());                 //returns false
>            MessageBox.Show(gmailUser.IsDirty
> ());                            //returns false
>
> ///
>
> If possible I would like to mark the accounts dirty, make all changes,
> then mark them clean. This would allow me to easily find the dirty
> accounts when recovering from a failure when I RetrieveAllUsers from
> the apps domain. If there is any way I could mark this information in
> the apps user account, even if it does not use the dirty flag let me
> know. I am open to ideas.
> >


--~--~---------~--~----~------------~-------~--~----~
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