本文整理汇总了C#中System.IO.IsolatedStorage.IsolatedStorageFile.InitExistingStore方法的典型用法代码示例。如果您正苦于以下问题:C# IsolatedStorageFile.InitExistingStore方法的具体用法?C# IsolatedStorageFile.InitExistingStore怎么用?C# IsolatedStorageFile.InitExistingStore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.IsolatedStorage.IsolatedStorageFile
的用法示例。
在下文中一共展示了IsolatedStorageFile.InitExistingStore方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MoveNext
//.........这里部分代码省略.........
isf = new IsolatedStorageFile();
tp = (TwoPaths) m_fileEnum.Current;
fDomain = false;
#if _DEBUG
if (s_fDebug)
{
Console.Write(tp.Path1 + " ");
Console.WriteLine(tp.Path2);
}
#endif
if (IsolatedStorageFile.NotAssemFilesDir(tp.Path2) &&
IsolatedStorageFile.NotAppFilesDir(tp.Path2))
fDomain = true;
// Create Roaming Store
domain = null;
assem = null;
app = null;
if (fDomain)
{
if (!GetIDStream(tp.Path1, out domain))
continue;
if (!GetIDStream(tp.Path1 + s_SepExternal + tp.Path2,
out assem))
continue;
domain.Position = 0;
if (IsolatedStorage.IsRoaming(m_Scope))
scope = IsolatedStorage.c_DomainRoaming;
else if (IsolatedStorage.IsMachine(m_Scope))
scope = IsolatedStorage.c_MachineDomain;
else
scope = IsolatedStorage.c_Domain;
domainName = tp.Path1;
assemName = tp.Path2;
appName = null;
}
else
{
if (IsolatedStorageFile.NotAppFilesDir(tp.Path2))
{
// Assembly
if (!GetIDStream(tp.Path1, out assem))
continue;
if (IsolatedStorage.IsRoaming(m_Scope))
scope = IsolatedStorage.c_AssemblyRoaming;
else if(IsolatedStorage.IsMachine(m_Scope))
scope = IsolatedStorage.c_MachineAssembly;
else
scope = IsolatedStorage.c_Assembly;
domainName = null;
assemName = tp.Path1;
appName = null;
assem.Position = 0;
}
else
{
// Application
if (!GetIDStream(tp.Path1, out app))
continue;
if (IsolatedStorage.IsRoaming(m_Scope))
scope = IsolatedStorage.c_AppUserRoaming;
else if(IsolatedStorage.IsMachine(m_Scope))
scope = IsolatedStorage.c_AppMachine;
else
scope = IsolatedStorage.c_AppUser;
domainName = null;
assemName = null;
appName = tp.Path1;
app.Position = 0;
}
}
if (!isf.InitStore(scope, domain, assem, app, domainName, assemName, appName))
continue;
if (!isf.InitExistingStore(scope))
continue;
m_Current = isf;
return true;
} while (true);
return false;
}
示例2: MoveNext
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;
}
示例3: MoveNext
public bool MoveNext()
{
IsolatedStorageScope scope;
string str;
string str2;
string str3;
this.m_fiop.Assert();
this.m_fReset = false;
Label_0012:
if (!this.m_fileEnum.MoveNext())
{
this.m_fEnd = true;
return false;
}
IsolatedStorageFile file = new IsolatedStorageFile();
TwoPaths current = (TwoPaths) this.m_fileEnum.Current;
bool flag = false;
if (IsolatedStorageFile.NotAssemFilesDir(current.Path2) && IsolatedStorageFile.NotAppFilesDir(current.Path2))
{
flag = true;
}
Stream s = null;
Stream stream2 = null;
Stream stream3 = null;
if (flag)
{
if (!this.GetIDStream(current.Path1, out s) || !this.GetIDStream(current.Path1 + '\\' + current.Path2, out stream2))
{
goto Label_0012;
}
s.Position = 0L;
if (System.IO.IsolatedStorage.IsolatedStorage.IsRoaming(this.m_Scope))
{
scope = IsolatedStorageScope.Roaming | IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain | IsolatedStorageScope.User;
}
else if (System.IO.IsolatedStorage.IsolatedStorage.IsMachine(this.m_Scope))
{
scope = IsolatedStorageScope.Machine | IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain;
}
else
{
scope = IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain | IsolatedStorageScope.User;
}
str = current.Path1;
str2 = current.Path2;
str3 = null;
}
else if (IsolatedStorageFile.NotAppFilesDir(current.Path2))
{
if (!this.GetIDStream(current.Path1, out stream2))
{
goto Label_0012;
}
if (System.IO.IsolatedStorage.IsolatedStorage.IsRoaming(this.m_Scope))
{
scope = IsolatedStorageScope.Roaming | IsolatedStorageScope.Assembly | IsolatedStorageScope.User;
}
else if (System.IO.IsolatedStorage.IsolatedStorage.IsMachine(this.m_Scope))
{
scope = IsolatedStorageScope.Machine | IsolatedStorageScope.Assembly;
}
else
{
scope = IsolatedStorageScope.Assembly | IsolatedStorageScope.User;
}
str = null;
str2 = current.Path1;
str3 = null;
stream2.Position = 0L;
}
else
{
if (!this.GetIDStream(current.Path1, out stream3))
{
goto Label_0012;
}
if (System.IO.IsolatedStorage.IsolatedStorage.IsRoaming(this.m_Scope))
{
scope = IsolatedStorageScope.Application | IsolatedStorageScope.Roaming | IsolatedStorageScope.User;
}
else if (System.IO.IsolatedStorage.IsolatedStorage.IsMachine(this.m_Scope))
{
scope = IsolatedStorageScope.Application | IsolatedStorageScope.Machine;
}
else
{
scope = IsolatedStorageScope.Application | IsolatedStorageScope.User;
}
str = null;
str2 = null;
str3 = current.Path1;
stream3.Position = 0L;
}
if (!file.InitStore(scope, s, stream2, stream3, str, str2, str3) || !file.InitExistingStore(scope))
{
goto Label_0012;
}
this.m_Current = file;
return true;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:100,代码来源:IsolatedStorageFileEnumerator.cs