Example #1
0
 static void Main(string[] args)
 {
     try
     {
         ChaosRename chaosRename = new ChaosRename();
         //In Minutes
         double renameConfigurationTime = 1;
         //<summary>
         //Checks whether there are any files which are renamed.
         //If so, then check whether the file rename configuration time has expired.
         //If so, rollback to the original name.
         //</summary>
         if (RestoreOperationFieldsList.Count() > 0)
         {
             foreach (var blobdata in RestoreOperationFieldsList.RestoreOperationFields)
             {
                 chaosRename.RestoreAsync(blobdata, renameConfigurationTime);
             }
         }
         //<summary>
         //Select a random file and do renaming operation.
         //</summary>
         chaosRename.RandomRenamingAsync();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         Console.WriteLine(ex.Source);
         Console.WriteLine(ex.StackTrace);
     }
 }
Example #2
0
        static void Main(string[] args)
        {
            ChaosRename chaosRename = new ChaosRename();

            //1
            if (RestoreOperationFieldsList.Count() > 0)
            {
                foreach (var blobdata in RestoreOperationFieldsList.restoreOperationFields)
                {
                    chaosRename.RestoreAsync(blobdata);
                }
            }
            //2
            //create a  list of new class
            chaosRename.RandomRenamingAsync();
        }