public InPlaceHostingManager(Uri deploymentManifest, bool launchInHostProcess)
 {
     if (!PlatformSpecific.OnXPOrAbove)
     {
         throw new PlatformNotSupportedException(Resources.GetString("Ex_RequiresXPOrHigher"));
     }
     if (deploymentManifest == null)
     {
         throw new ArgumentNullException("deploymentManifest");
     }
     UriHelper.ValidateSupportedSchemeInArgument(deploymentManifest, "deploymentSource");
     this._deploymentManager = new DeploymentManager(deploymentManifest, false, true, null, null);
     this._log = this._deploymentManager.LogId;
     this._isLaunchInHostProcess = launchInHostProcess;
     this._Initialize();
     Logger.AddInternalState(this._log, "Activation through IPHM APIs started.");
     Logger.AddMethodCall(this._log, string.Concat(new object[] { "InPlaceHostingManager(", deploymentManifest, ",", launchInHostProcess.ToString(), ") called." }));
 }
 internal DeploymentManager(Uri deploymentSource, bool isUpdate, bool isConfirmed, DownloadOptions downloadOptions, AsyncOperation optionalAsyncOp)
 {
     this._trustNotGrantedEvent = new ManualResetEvent(false);
     this._trustGrantedEvent = new ManualResetEvent(false);
     this._platformRequirementsFailedEvent = new ManualResetEvent(false);
     this._isConfirmed = true;
     this._state = DeploymentProgressState.DownloadingApplicationFiles;
     this._deploySource = deploymentSource;
     this._isupdate = isUpdate;
     this._isConfirmed = isConfirmed;
     this._downloadOptions = downloadOptions;
     this._events = new EventHandlerList();
     this._syncGroupMap = CollectionsUtil.CreateCaseInsensitiveHashtable();
     this._subStore = SubscriptionStore.CurrentUser;
     this.bindWorker = new ThreadStart(this.BindAsyncWorker);
     this.synchronizeWorker = new ThreadStart(this.SynchronizeAsyncWorker);
     this.synchronizeGroupWorker = new WaitCallback(this.SynchronizeGroupAsyncWorker);
     this.bindCompleted = new SendOrPostCallback(this.BindAsyncCompleted);
     this.synchronizeCompleted = new SendOrPostCallback(this.SynchronizeAsyncCompleted);
     this.progressReporter = new SendOrPostCallback(this.ProgressReporter);
     if (optionalAsyncOp == null)
     {
         this.asyncOperation = AsyncOperationManager.CreateOperation(null);
     }
     else
     {
         this.asyncOperation = optionalAsyncOp;
     }
     this._log = Logger.StartLogging();
     if (deploymentSource != null)
     {
         Logger.SetSubscriptionUrl(this._log, deploymentSource);
     }
     this._assertApplicationReqEvents = new ManualResetEvent[] { this._trustNotGrantedEvent, this._platformRequirementsFailedEvent, this._trustGrantedEvent };
     this._callerType = CallerType.Other;
     PolicyKeys.SkipApplicationDependencyHashCheck();
     PolicyKeys.SkipDeploymentProvider();
     PolicyKeys.SkipSchemaValidation();
     PolicyKeys.SkipSemanticValidation();
     PolicyKeys.SkipSignatureValidation();
 }