Example #1
0
 /// <summary>Initializes a new <see cref="T:System.IO.IsolatedStorage.IsolatedStorage" /> object.</summary>
 /// <param name="scope">A bitwise combination of the <see cref="T:System.IO.IsolatedStorage.IsolatedStorageScope" /> values. </param>
 /// <param name="domainEvidenceType">The type of <see cref="T:System.Security.Policy.Evidence" /> that you can choose from the list of <see cref="T:System.Security.Policy.Evidence" /> present in the domain of the calling application. null lets the <see cref="T:System.IO.IsolatedStorage.IsolatedStorage" /> object choose the evidence. </param>
 /// <param name="assemblyEvidenceType">The type of <see cref="T:System.Security.Policy.Evidence" /> that you can choose from the list of <see cref="T:System.Security.Policy.Evidence" /> present in the assembly of the calling application. null lets the <see cref="T:System.IO.IsolatedStorage.IsolatedStorage" /> object choose the evidence. </param>
 /// <exception cref="T:System.IO.IsolatedStorage.IsolatedStorageException">The assembly specified has insufficient permissions to create isolated stores. </exception>
 protected void InitStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
 {
     switch (scope)
     {
     case IsolatedStorageScope.User | IsolatedStorageScope.Assembly:
     case IsolatedStorageScope.User | IsolatedStorageScope.Domain | IsolatedStorageScope.Assembly:
         throw new NotImplementedException(scope.ToString());
     }
     throw new ArgumentException(scope.ToString());
 }
        protected void InitStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
        {
            // I know it's useless - but it's tested as such...
            switch (scope)
            {
            case (IsolatedStorageScope.Assembly | IsolatedStorageScope.User):
            case (IsolatedStorageScope.Assembly | IsolatedStorageScope.User | IsolatedStorageScope.Domain):
                throw new NotImplementedException(scope.ToString());

            default:
                // invalid (incomplete) scope
                throw new ArgumentException(scope.ToString());
            }
        }
Example #3
0
		private void CheckEnumerated (int n, IsolatedStorageScope scope, IsolatedStorageFile isf)
		{
			string prefix = n.ToString () + " - " + scope.ToString () + " - ";
			Assert.IsNotNull (isf, prefix + "IsolatedStorageFile");
			Assert.IsTrue (((scope & isf.Scope) != 0), prefix + "Scope");

			if ((isf.Scope & IsolatedStorageScope.Assembly) != 0)
				Assert.IsNotNull (isf.AssemblyIdentity, prefix + "AssemblyIdentity");
			if ((isf.Scope & IsolatedStorageScope.Domain) != 0)
				Assert.IsNotNull (isf.DomainIdentity, prefix + "DomainIdentity");
			if ((isf.Scope & IsolatedStorageScope.Application) != 0)
				Assert.IsNotNull (isf.ApplicationIdentity, prefix + "ApplicationIdentity");
		}
		private void CheckEnumerated (int n, IsolatedStorageScope scope, IsolatedStorageFile isf)
		{
			string prefix = n.ToString () + " - " + scope.ToString () + " - ";
			Assert.IsNotNull (isf, prefix + "IsolatedStorageFile");
			Assert.IsTrue (((scope & isf.Scope) != 0), prefix + "Scope");

			if ((isf.Scope & IsolatedStorageScope.Assembly) != 0)
				Assert.IsNotNull (isf.AssemblyIdentity, prefix + "AssemblyIdentity");
			if ((isf.Scope & IsolatedStorageScope.Domain) != 0)
				Assert.IsNotNull (isf.DomainIdentity, prefix + "DomainIdentity");
			if ((isf.Scope & IsolatedStorageScope.Application) != 0)
				Assert.IsNotNull (isf.ApplicationIdentity, prefix + "ApplicationIdentity");
		}
Example #5
0
		protected void InitStore (IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
		{
			// I know it's useless - but it's tested as such...
			switch (scope) {
			case (IsolatedStorageScope.Assembly | IsolatedStorageScope.User):
			case (IsolatedStorageScope.Assembly | IsolatedStorageScope.User | IsolatedStorageScope.Domain):
				throw new NotImplementedException (scope.ToString ());
			default:
				// invalid (incomplete) scope
				throw new ArgumentException (scope.ToString ());
			}
		}