Пример #1
0
        private void CreateFromName(ApplicationIdentity applicationIdentity)
        {
            if (applicationIdentity == null)
            {
                throw new ArgumentNullException("applicationIdentity");
            }
            this._applicationIdentity = applicationIdentity;
            IEnumDefinitionIdentity definitionIdentity = this._applicationIdentity.Identity.EnumAppPath();

            this._definitionIdentities = new ArrayList(2);
            IDefinitionIdentity[] DefinitionIdentity = new IDefinitionIdentity[1];
            while ((int)definitionIdentity.Next(1U, DefinitionIdentity) == 1)
            {
                this._definitionIdentities.Add((object)DefinitionIdentity[0]);
            }
            this._definitionIdentities.TrimToSize();
            if (this._definitionIdentities.Count <= 1)
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_InvalidAppId"));
            }
            this._manifestPaths = (string[])null;
            this._manifests     = (ArrayList)null;
            this._actContext    = IsolationInterop.CreateActContext(this._applicationIdentity.Identity);
            this._form          = ActivationContext.ContextForm.StoreBounded;
            this._appRunState   = ActivationContext.ApplicationStateDisposition.Undefined;
        }
Пример #2
0
        private void CreateFromNameAndManifests(ApplicationIdentity applicationIdentity, string[] manifestPaths)
        {
            if (applicationIdentity == null)
            {
                throw new ArgumentNullException("applicationIdentity");
            }
            if (manifestPaths == null)
            {
                throw new ArgumentNullException("manifestPaths");
            }
            this._applicationIdentity = applicationIdentity;
            IEnumDefinitionIdentity definitionIdentity = this._applicationIdentity.Identity.EnumAppPath();

            this._manifests     = new ArrayList(2);
            this._manifestPaths = new string[manifestPaths.Length];
            IDefinitionIdentity[] DefinitionIdentity = new IDefinitionIdentity[1];
            int index = 0;

            while ((int)definitionIdentity.Next(1U, DefinitionIdentity) == 1)
            {
                ICMS cms = (ICMS)IsolationInterop.ParseManifest(manifestPaths[index], (IManifestParseErrorCallback)null, ref IsolationInterop.IID_ICMS);
                if (!IsolationInterop.IdentityAuthority.AreDefinitionsEqual(0U, cms.Identity, DefinitionIdentity[0]))
                {
                    throw new ArgumentException(Environment.GetResourceString("Argument_IllegalAppIdMismatch"));
                }
                this._manifests.Add((object)cms);
                this._manifestPaths[index] = manifestPaths[index];
                ++index;
            }
            if (index != manifestPaths.Length)
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_IllegalAppId"));
            }
            this._manifests.TrimToSize();
            if (this._manifests.Count <= 1)
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_InvalidAppId"));
            }
            this._definitionIdentities = (ArrayList)null;
            this._actContext           = (IActContext)null;
            this._form        = ActivationContext.ContextForm.Loose;
            this._appRunState = ActivationContext.ApplicationStateDisposition.Undefined;
        }
		private void CreateFromNameAndManifests(ApplicationIdentity applicationIdentity, string[] manifestPaths)
		{
			if (applicationIdentity == null)
			{
				throw new ArgumentNullException("applicationIdentity");
			}
			if (manifestPaths == null)
			{
				throw new ArgumentNullException("manifestPaths");
			}
			this._applicationIdentity = applicationIdentity;
			IEnumDefinitionIdentity enumDefinitionIdentity = this._applicationIdentity.Identity.EnumAppPath();
			this._manifests = new ArrayList(2);
			this._manifestPaths = new string[manifestPaths.Length];
			IDefinitionIdentity[] array = new IDefinitionIdentity[1];
			int num = 0;
			while (enumDefinitionIdentity.Next(1u, array) == 1u)
			{
				ICMS iCMS = (ICMS)IsolationInterop.ParseManifest(manifestPaths[num], null, ref IsolationInterop.IID_ICMS);
				if (!IsolationInterop.IdentityAuthority.AreDefinitionsEqual(0u, iCMS.Identity, array[0]))
				{
					throw new ArgumentException(Environment.GetResourceString("Argument_IllegalAppIdMismatch"));
				}
				this._manifests.Add(iCMS);
				this._manifestPaths[num] = manifestPaths[num];
				num++;
			}
			if (num != manifestPaths.Length)
			{
				throw new ArgumentException(Environment.GetResourceString("Argument_IllegalAppId"));
			}
			this._manifests.TrimToSize();
			if (this._manifests.Count <= 1)
			{
				throw new ArgumentException(Environment.GetResourceString("Argument_InvalidAppId"));
			}
			this._definitionIdentities = null;
			this._actContext = null;
			this._form = ActivationContext.ContextForm.Loose;
			this._appRunState = ActivationContext.ApplicationStateDisposition.Undefined;
		}
		private void CreateFromName(ApplicationIdentity applicationIdentity)
		{
			if (applicationIdentity == null)
			{
				throw new ArgumentNullException("applicationIdentity");
			}
			this._applicationIdentity = applicationIdentity;
			IEnumDefinitionIdentity enumDefinitionIdentity = this._applicationIdentity.Identity.EnumAppPath();
			this._definitionIdentities = new ArrayList(2);
			IDefinitionIdentity[] array = new IDefinitionIdentity[1];
			while (enumDefinitionIdentity.Next(1u, array) == 1u)
			{
				this._definitionIdentities.Add(array[0]);
			}
			this._definitionIdentities.TrimToSize();
			if (this._definitionIdentities.Count <= 1)
			{
				throw new ArgumentException(Environment.GetResourceString("Argument_InvalidAppId"));
			}
			this._manifestPaths = null;
			this._manifests = null;
			this._actContext = IsolationInterop.CreateActContext(this._applicationIdentity.Identity);
			this._form = ActivationContext.ContextForm.StoreBounded;
			this._appRunState = ActivationContext.ApplicationStateDisposition.Undefined;
		}