本文整理汇总了C#中System.IO.IsolatedStorage.IsolatedStorageFile.PostInit方法的典型用法代码示例。如果您正苦于以下问题:C# IsolatedStorageFile.PostInit方法的具体用法?C# IsolatedStorageFile.PostInit怎么用?C# IsolatedStorageFile.PostInit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.IsolatedStorage.IsolatedStorageFile
的用法示例。
在下文中一共展示了IsolatedStorageFile.PostInit方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetStore
public static IsolatedStorageFile GetStore (IsolatedStorageScope scope,
Evidence domainEvidence, Type domainEvidenceType,
Evidence assemblyEvidence, Type assemblyEvidenceType)
{
Demand (scope);
bool domain = ((scope & IsolatedStorageScope.Domain) != 0);
if (domain && (domainEvidence == null))
throw new ArgumentNullException ("domainEvidence");
bool assembly = ((scope & IsolatedStorageScope.Assembly) != 0);
if (assembly && (assemblyEvidence == null))
throw new ArgumentNullException ("assemblyEvidence");
IsolatedStorageFile storageFile = new IsolatedStorageFile (scope);
if (domain) {
if (domainEvidenceType == null) {
storageFile._domainIdentity = GetDomainIdentityFromEvidence (domainEvidence);
} else {
storageFile._domainIdentity = GetTypeFromEvidence (domainEvidence, domainEvidenceType);
}
if (storageFile._domainIdentity == null)
throw new IsolatedStorageException (Locale.GetText ("Couldn't find domain identity."));
}
if (assembly) {
if (assemblyEvidenceType == null) {
storageFile._assemblyIdentity = GetAssemblyIdentityFromEvidence (assemblyEvidence);
} else {
storageFile._assemblyIdentity = GetTypeFromEvidence (assemblyEvidence, assemblyEvidenceType);
}
if (storageFile._assemblyIdentity == null)
throw new IsolatedStorageException (Locale.GetText ("Couldn't find assembly identity."));
}
storageFile.PostInit ();
return storageFile;
}
示例2: GetUserStoreForApplication
public static IsolatedStorageFile GetUserStoreForApplication ()
{
IsolatedStorageScope scope = IsolatedStorageScope.User | IsolatedStorageScope.Application;
IsolatedStorageFile storageFile = new IsolatedStorageFile (scope);
storageFile.InitStore (scope, null);
storageFile._fullEvidences = Assembly.GetCallingAssembly ().UnprotectedGetEvidence ();
storageFile.PostInit ();
return storageFile;
}
示例3: GetUserStoreForDomain
public static IsolatedStorageFile GetUserStoreForDomain ()
{
IsolatedStorageScope scope = IsolatedStorageScope.User | IsolatedStorageScope.Domain | IsolatedStorageScope.Assembly;
IsolatedStorageFile storageFile = new IsolatedStorageFile (scope);
storageFile._domainIdentity = GetDomainIdentityFromEvidence (AppDomain.CurrentDomain.Evidence);
Evidence e = Assembly.GetCallingAssembly ().UnprotectedGetEvidence ();
storageFile._fullEvidences = e;
storageFile._assemblyIdentity = GetAssemblyIdentityFromEvidence (e);
storageFile.PostInit ();
return storageFile;
}
示例4: GetMachineStoreForAssembly
public static IsolatedStorageFile GetMachineStoreForAssembly ()
{
IsolatedStorageScope scope = IsolatedStorageScope.Machine | IsolatedStorageScope.Assembly;
IsolatedStorageFile storageFile = new IsolatedStorageFile (scope);
Evidence e = Assembly.GetCallingAssembly ().UnprotectedGetEvidence ();
storageFile._fullEvidences = e;
storageFile._assemblyIdentity = GetAssemblyIdentityFromEvidence (e);
storageFile.PostInit ();
return storageFile;
}