Beispiel #1
0
        /// <summary>
        /// Runs the methods above to demonstrate usage of the .NET
        /// client library.
        /// </summary>
        static void Main(string[] args)
        {
            if (args.Length != 3)
            {
                Console.WriteLine("Usage: unshare_profiles <consumerKey> <consumerSecret> <adminEmail>");
            }
            else
            {
                String consumerKey    = args[0];
                String consumerSecret = args[1];
                String adminEmail     = args[2];

                ProfilesManager manager = new ProfilesManager(consumerKey, consumerSecret, adminEmail);

                BatchResult result = manager.UnshareProfiles();

                Console.WriteLine("Success: " + result.Success + " - Error: " + result.Error);
                foreach (Contact entry in result.ErrorEntries)
                {
                    Console.WriteLine(" > Failed to update " + entry.Id +
                                      ": (" + entry.BatchData.Status.Code + ") "
                                      + entry.BatchData.Status.Reason);
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Runs the methods above to demonstrate usage of the .NET
        /// client library.
        /// </summary>
        static void Main(string[] args) {
            if (args.Length != 3) {
                Console.WriteLine("Usage: unshare_profiles <consumerKey> <consumerSecret> <adminEmail>");
            } else {
                String consumerKey = args[0];
                String consumerSecret = args[1];
                String adminEmail = args[2];

                ProfilesManager manager = new ProfilesManager(consumerKey, consumerSecret, adminEmail);

                BatchResult result = manager.UnshareProfiles();

                Console.WriteLine("Success: " + result.Success + " - Error: " + result.Error);
                foreach (Contact entry in result.ErrorEntries) {
                    Console.WriteLine(" > Failed to update " + entry.Id +
                                      ": (" + entry.BatchData.Status.Code + ") "
                                      + entry.BatchData.Status.Reason);
                }
            }
        }