private MessageResult OnWarning(Deployment.WindowsInstaller.Record record) { if (null != record) { string message = record.ToString(); var data = new Data(DataType.Warning, message); this.Output.Enqueue(data); } return MessageResult.OK; }
private MessageResult OnInformation(Deployment.WindowsInstaller.Record record) { if (null != record) { string message = record.ToString(); if (!string.IsNullOrEmpty(message)) { var ice = new IceMessage(message); var obj = PSObject.AsPSObject(ice); if (!string.IsNullOrEmpty(this.CurrentPath)) { ice.Path = this.CurrentPath; // Set the PSPath for cmdlets that would use it. string path = this.SessionState.Path.GetUnresolvedPSPathFromProviderPath(this.CurrentPath); obj.SetPropertyValue<string>("PSPath", path); } var data = new Data(DataType.Information, obj); this.Output.Enqueue(data); } } return MessageResult.OK; }