static string mainpath = "http://peakfinders/";
static void Main(string[] args)
{
subsite(mainpath);
}
public static void subsite(string path)
{
try
{
ClientContext clientContext = new ClientContext( path );
Web osweb = clientContext.Web;
clientContext.Load(osweb, website => website.Webs, website => website.Title);
clientContext.ExecuteQuery();
foreach (Web oweb in osweb.Webs)
{
string newpath = mainpath + oweb.ServerRelativeUrl;
getSubWebs(newpath);
Console.WriteLine(newpath + "\n" + oweb.Title );
Console.ReadLine();
}
}
catch (Exception ex)
{
}
}
static void Main(string[] args)
{
subsite(mainpath);
}
public static void subsite(string path)
{
try
{
ClientContext clientContext = new ClientContext( path );
Web osweb = clientContext.Web;
clientContext.Load(osweb, website => website.Webs, website => website.Title);
clientContext.ExecuteQuery();
foreach (Web oweb in osweb.Webs)
{
string newpath = mainpath + oweb.ServerRelativeUrl;
getSubWebs(newpath);
Console.WriteLine(newpath + "\n" + oweb.Title );
Console.ReadLine();
}
}
catch (Exception ex)
{
}
}
No comments:
Post a Comment