private static void DeleteContentTypesSpecifiedInFile(ClientContext context, string file)
 {
     Log.Info("Deleting all content types with the same group as the ones in the file " + file);
     var contentTypePersister = new FilePersistanceProvider<List<ShContentType>>(file);
     var contentTypeManager = new ContentTypeManager(context, contentTypePersister.Load());
     contentTypeManager.DeleteAllCustomContentTypes();
 }
 private static void CreateContentTypesFromFile(ClientContext context, string filePath)
 {
     var contentTypePersister = new FilePersistanceProvider<List<ShContentType>>(filePath);
     var contentTypeManager = new ContentTypeManager(context, contentTypePersister.Load());
     contentTypeManager.EnsureContentTypes();
 }