think i have found the longest way possible to do it?
try
{
s = new NaServer(Server, 1, 3);
s.Style = NaServer.AUTH_STYLE.LOGIN_PASSWORD;
s.SetAdminUser(user, pwd);
xi = new NaElement("volume-list-info");
xo = s.InvokeElem(xi);
ArrayList vols = new ArrayList();
System.Collections.IList volList = xo.GetChildByName("volumes").GetChildren();
System.Collections.IEnumerator volIter = volList.GetEnumerator();
while (volIter.MoveNext())
{
NaElement volInfo = (NaElement)volIter.Current;
vols.Add(volInfo.GetChildContent("name"));
}
foreach (string i in vols)
{
xi = new NaElement("volume-options-list-info");
xi.AddNewChild("volume", i);
xo = s.InvokeElem(xi);
System.Collections.IList optionList = xo.GetChildByName("options").GetChildren();
System.Collections.IEnumerator optionIter = optionList.GetEnumerator();
while (optionIter.MoveNext())
{
NaElement volInfo = (NaElement)optionIter.Current;
if (volInfo.GetChildContent("name") == "nosnapdir")
{
Console.WriteLine("---------------------------------");
Console.Write("Volume\t\t: ");
Console.WriteLine(i);
Console.Write("Name\t\t: ");
Console.WriteLine(volInfo.GetChildContent("name"));
Console.Write("Value\t\t: ");
Console.WriteLine(volInfo.GetChildContent("value"));
Console.WriteLine("---------------------------------");
}
}
}
}
catch (Exception e)
{
Console.Error.WriteLine(e.Message);
}
Thanks