Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }