Exemplo n.º 1
0
 /// <summary>
 /// This method will differentiate between an XMLWriteFolderObject or an XMLWriteFileObject. Then 
 /// base on it's MetaChangeType , it will update the xml document accordingly
 /// </summary>
 /// <param name="xmlWriteObject"></param>
 public static void UpdateXML(BaseXMLWriteObject xmlWriteObject)
 {
     if (xmlWriteObject is XMLWriteFolderObject)
         HandleFolder(xmlWriteObject);
     else
         HandleFile(xmlWriteObject);
 }
Exemplo n.º 2
0
 // Handle the different MetaChangeType of the XMLWriteFileObject
 private static void HandleFile(BaseXMLWriteObject xmlWriteObject)
 {
     switch (xmlWriteObject.ChangeType)
     {
         case MetaChangeType.New:
             CreateFile((XMLWriteFileObject)xmlWriteObject);
             break;
         case MetaChangeType.Delete:
             DeleteFile((XMLWriteFileObject)xmlWriteObject);
             break;
         case MetaChangeType.Rename:
             RenameFile((XMLWriteFileObject)xmlWriteObject);
             break;
         case MetaChangeType.Update:
             UpdateFile((XMLWriteFileObject)xmlWriteObject);
             break;
     }
 }
Exemplo n.º 3
0
 // Handles the different folder MetaChangeType
 private static void HandleFolder(BaseXMLWriteObject xmlWriteObj)
 {
     switch (xmlWriteObj.ChangeType)
     {
         case MetaChangeType.New:
             CreateFolder((XMLWriteFolderObject)xmlWriteObj);
             break;
         case MetaChangeType.Rename:
             RenameFolder((XMLWriteFolderObject)xmlWriteObj);
             break;
         case MetaChangeType.Delete:
             DeleteFolder((XMLWriteFolderObject)xmlWriteObj);
             break;
     }
 }