@@ -22,16 +22,15 @@ private static void Main(string[] args)
2222
2323 var list1 = new SPOList ( ) ;
2424 list1 . SPOUser = spoUser ;
25- Console . WriteLine ( "DEBUG: Primeiro SPOList configurado" ) ; // Debug
25+ Console . WriteLine ( "DEBUG: Primeiro SPOList configurado" ) ;
2626
2727 var list2 = new SPOList ( ) ;
2828 list2 . SPOUser = spoUser ;
29- Console . WriteLine ( "DEBUG: Segundo SPOList configurado" ) ; //Debug
30-
29+ Console . WriteLine ( "DEBUG: Segundo SPOList configurado" ) ;
3130 if ( ( uint ) args . Length > 0U )
3231 {
3332 string lower = args [ 0 ] . ToLower ( ) ;
34- Console . WriteLine ( "DEBUG: Argumento recebido - " + lower ) ; //Debug
33+ Console . WriteLine ( "DEBUG: Argumento recebido - " + lower ) ;
3534
3635 if ( ! ( lower == "daily" ) )
3736 {
@@ -47,7 +46,7 @@ private static void Main(string[] args)
4746 }
4847 else
4948 {
50- Console . WriteLine ( "DEBUG: Executando daily" ) ; //Debug
49+ Console . WriteLine ( "DEBUG: Executando daily" ) ;
5150 RefreshSQLLists . SPOtoSQLUpdate ( true ) ;
5251 }
5352 }
@@ -63,7 +62,7 @@ private static void Main(string[] args)
6362
6463 public static void GetAllLists ( )
6564 {
66- Console . WriteLine ( "DEBUG: Entrando em GetAllLists" ) ; // Debug
65+ Console . WriteLine ( "DEBUG: Entrando em GetAllLists" ) ;
6766 SPOUser spoUser = new SPOUser ( "Guilherme.sales@bringglobal.com" , "UtKid_3AV^r]H+" ) ;
6867 Context context = new Context ( )
6968 {
@@ -72,7 +71,7 @@ public static void GetAllLists()
7271 } ;
7372 foreach ( List allList in ( ClientObjectCollection < List > ) context . GetAllLists ( ) )
7473 {
75- Console . WriteLine ( "DEBUG: Carregando lista - " + allList . Title ) ; // Debug
74+ Console . WriteLine ( "DEBUG: Carregando lista - " + allList . Title ) ;
7675 context . Ctx . Load < List > ( allList , new Expression < Func < List , object > > [ 1 ]
7776 {
7877 ( Expression < Func < List , object > > ) ( l => ( object ) l . IsSystemList )
@@ -84,7 +83,7 @@ public static void GetAllLists()
8483
8584 private static void SPODebug ( string listName , string ctxURL , SPOUser user )
8685 {
87- Console . WriteLine ( "DEBUG: Entrando em SPODebug" ) ; // Debug
86+ Console . WriteLine ( "DEBUG: Entrando em SPODebug" ) ;
8887 SPOList spoList = new SPOList
8988 {
9089 Name = listName ,
@@ -93,7 +92,7 @@ private static void SPODebug(string listName, string ctxURL, SPOUser user)
9392 CAMLQuery = "<View><RowLimit>1</RowLimit></View>"
9493 } ;
9594
96- Console . WriteLine ( "DEBUG: Executando Build" ) ; // Debug
95+ Console . WriteLine ( "DEBUG: Executando Build" ) ;
9796 spoList . Build ( ) ;
9897
9998 Console . WriteLine ( "DEBUG: Executando PropsToString" ) ;
@@ -104,10 +103,10 @@ private static void RefreshListsSPO(SPOList sourceList, SPOList destList)
104103 {
105104 try
106105 {
107- Console . WriteLine ( "DEBUG: Iniciando RefreshListsSPO" ) ; // Debug
106+ Console . WriteLine ( "DEBUG: Iniciando RefreshListsSPO" ) ;
108107
109108 sourceList . Build ( ) ;
110- Console . WriteLine ( "DEBUG: sourceList.Build concluído" ) ; // Debug
109+ Console . WriteLine ( "DEBUG: sourceList.Build concluído" ) ;
111110
112111 destList . Build ( ) ;
113112 Console . WriteLine ( "DEBUG: destList.Build concluído" ) ;
@@ -116,7 +115,7 @@ private static void RefreshListsSPO(SPOList sourceList, SPOList destList)
116115 int num2 = 0 ;
117116
118117 string [ , ] actualFields = GetActualFields ( sourceList , destList ) ;
119- Console . WriteLine ( "DEBUG: Campos obtidos" ) ; // Debug
118+ Console . WriteLine ( "DEBUG: Campos obtidos" ) ;
120119
121120 if ( ( uint ) sourceList . ItemCollection . Count > 0U )
122121 num1 = ( int ) sourceList . ItemCollection [ sourceList . ItemCollection . Count - 1 ] [ "ID" ] ;
@@ -125,7 +124,7 @@ private static void RefreshListsSPO(SPOList sourceList, SPOList destList)
125124
126125 if ( num2 < num1 )
127126 {
128- Console . WriteLine ( "DEBUG: Adicionando novos itens" ) ; // Debug
127+ Console . WriteLine ( "DEBUG: Adicionando novos itens" ) ;
129128 do
130129 {
131130 destList . AddItem ( ) ;
@@ -157,7 +156,7 @@ private static void RefreshListsSPO(SPOList sourceList, SPOList destList)
157156
158157 private static string [ , ] GetActualFields ( SPOList listone , SPOList listtwo )
159158 {
160- Console . WriteLine ( "DEBUG: Entrando em GetActualFields" ) ; // Debug
159+ Console . WriteLine ( "DEBUG: Entrando em GetActualFields" ) ;
161160
162161 List < Field > fields1 = GetFields ( listone ) ;
163162 List < Field > fields2 = GetFields ( listtwo ) ;
@@ -176,7 +175,7 @@ private static void RefreshListsSPO(SPOList sourceList, SPOList destList)
176175 {
177176 strArray [ index1 , 0 ] = field2 . InternalName ;
178177 strArray [ index1 , 1 ] = field1 . InternalName ;
179- Console . WriteLine ( $ "DEBUG: Match found - { field1 . Title } ") ; // Debug
178+ Console . WriteLine ( $ "DEBUG: Match found - { field1 . Title } ") ;
180179 }
181180 ++ index2 ;
182181 }
@@ -191,15 +190,15 @@ private static void RefreshListsSPO(SPOList sourceList, SPOList destList)
191190
192191 private static List < Field > GetFields ( SPOList list )
193192 {
194- Console . WriteLine ( "DEBUG: Entrando em GetFields" ) ; // Debug
193+ Console . WriteLine ( "DEBUG: Entrando em GetFields" ) ;
195194
196195 List < Field > fieldList = new List < Field > ( ) ;
197196 foreach ( Field field in ( ClientObjectCollection < Field > ) list . Fields )
198197 {
199198 if ( ! field . FromBaseType || field . InternalName == "Title" )
200199 {
201200 fieldList . Add ( field ) ;
202- Console . WriteLine ( $ "DEBUG: Campo adicionado - { field . Title } ") ; // Debug
201+ Console . WriteLine ( $ "DEBUG: Campo adicionado - { field . Title } ") ;
203202 }
204203 }
205204
0 commit comments