1: using (MO_NET.ClientContext context = new MO_NET.ClientContext("http://<MiSitioSP>"))
2: {
3: context.AuthenticationMode =
4: MO_NET.ClientAuthenticationMode.Default;
5: context.Credentials =
6: new NetworkCredential("Usuario", "Contraseña", "Dominio");
7:
8: //Definición de operaciones
9: MO_NET.List oList = context.Web.Lists.GetByTitle("Infraestructura");
10: MO_NET.FolderCollection flcColection = oList.RootFolder.Folders;
11:
12: //Carga de operaciones
13: context.Load(flcColection);
14:
15: //Ejecutar operaciones
16: context.ExecuteQuery();
17:
18: foreach (MO_NET.Folder folder in flcColection)
19: {
20: Console.WriteLine(folder.Name);
21: MO_NET.FileCollection fCollection=folder.Files;
22: context.Load(fCollection);
23: context.ExecuteQuery();
24: foreach (MO_NET.File file in fCollection)
25: {
26: Console.WriteLine(" -> Archivo: {0}", file.Name);
27: }
28: }
29: }