private SPOList createListOrLibrary( SPOClient spoc, bool isLibrary, string name, List <SPOClient.FieldSpec> fieldSpecs = null) { try { spoc.DeleteList(name); } catch (Exception e) { var x = e.Message; } return(spoc.CreateList(name, isLibrary, fieldSpecs)); }
private void reallyRemoveTestLists(SPOTestSystem ts, string listname) { // http://stackoverflow.com/questions/42146301/deleting-list-does-not-work-list-does-not-exist SPOClient spoc = createClient(ts) as SPOClient; spoc.Login(); try { spoc.DeleteList(listname); } catch (Exception e) { var x = e.Message; } spoc.CreateList(listname, false); spoc = createClient(ts) as SPOClient; spoc.Login(); spoc.DeleteList(listname); spoc.Dispose(); }
private void t08_ListCreation1(SPOTestSystem ts) { SPOClient spoc = createClient(ts) as SPOClient; spoc.Login(); string listname = unitTestList; //string listname = "abc"; try { spoc.DeleteList(listname); } catch (Exception e) { var x = e.Message; } spoc.CreateList(listname, false); spoc = createClient(ts) as SPOClient; spoc.Login(); spoc.DeleteList(listname); }