public bool MoveNext()
{
IsolatedStorageFile isf;
IsolatedStorageScope scope;
bool fApp;
TwoPaths tp;
Stream app, assem;
String appName, assemName;
m_fiop.Assert();
m_fReset = false;
do
{
if (m_fileEnum.MoveNext() == false)
{
m_fEnd = true;
break;
}
// Create the store
isf = new IsolatedStorageFile();
tp = (TwoPaths)m_fileEnum.Current;
fApp = false;
#if _DEBUG
if (s_fDebug)
{
Console.Write(tp.Path1 + " ");
Console.WriteLine(tp.Path2);
}
#endif
if (IsolatedStorageFile.NotAssemFilesDir(tp.Path2))
{
fApp = true;
}
// Create Roaming Store
app = null;
assem = null;
if (fApp)
{
if (!GetIDStream(tp.Path1, out app))
{
continue;
}
if (!GetIDStream(tp.Path1 + s_SepExternal + tp.Path2,
out assem))
{
continue;
}
app.Position = 0;
if (IsolatedStorage.IsRoaming(m_Scope))
{
scope = IsolatedStorage.c_AppRoaming;
}
else
{
scope = IsolatedStorage.c_App;
}
appName = tp.Path1;
assemName = tp.Path2;
}
else
{
if (!GetIDStream(tp.Path1, out assem))
{
continue;
}
if (IsolatedStorage.IsRoaming(m_Scope))
{
scope = IsolatedStorage.c_AssemblyRoaming;
}
else
{
scope = IsolatedStorage.c_Assembly;
}
appName = null;
assemName = tp.Path1;
}
assem.Position = 0;
if (!isf.InitStore(scope, app, assem, appName, assemName))
{
continue;
}
if (!isf.InitExistingStore(scope))
{
continue;
}
m_Current = isf;
return(true);
} while (true);
return(false);
}