Пример #1
0
        /// <summary>
        /// Decompile the WixHttpUrlAce table.
        /// </summary>
        /// <param name="table">The table to decompile.</param>
        private void DecompileWixHttpUrlAceTable(Table table)
        {
            foreach (Row row in table.Rows)
            {
                Http.UrlAce urlace = new Http.UrlAce();
                urlace.Id = (string)row[0];
                urlace.SecurityPrincipal = (string)row[2];
                switch (Convert.ToInt32(row[3]))
                {
                case HttpConstants.GENERIC_ALL:
                default:
                    urlace.Rights = Http.UrlAce.RightsType.all;
                    break;

                case HttpConstants.GENERIC_EXECUTE:
                    urlace.Rights = Http.UrlAce.RightsType.register;
                    break;

                case HttpConstants.GENERIC_WRITE:
                    urlace.Rights = Http.UrlAce.RightsType.@delegate;
                    break;
                }

                string reservationId = (string)row[1];
                Http.UrlReservation urlReservation = (Http.UrlReservation) this.Core.GetIndexedElement("WixHttpUrlReservation", reservationId);
                if (null != urlReservation)
                {
                    urlReservation.AddChild(urlace);
                }
                else
                {
                    this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, urlace.Id, "WixHttpUrlReservation_", reservationId, "WixHttpUrlReservation"));
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Decompile the WixHttpUrlReservation table.
        /// </summary>
        /// <param name="table">The table to decompile.</param>
        private void DecompileWixHttpUrlReservationTable(Table table)
        {
            foreach (Row row in table.Rows)
            {
                Http.UrlReservation urlReservation = new Http.UrlReservation();
                urlReservation.Id = (string)row[0];
                switch ((int)row[1])
                {
                case HttpConstants.heReplace:
                default:
                    urlReservation.HandleExisting = Http.UrlReservation.HandleExistingType.replace;
                    break;

                case HttpConstants.heIgnore:
                    urlReservation.HandleExisting = Http.UrlReservation.HandleExistingType.ignore;
                    break;

                case HttpConstants.heFail:
                    urlReservation.HandleExisting = Http.UrlReservation.HandleExistingType.fail;
                    break;
                }
                urlReservation.Sddl = (string)row[2];
                urlReservation.Url  = (string)row[3];

                Wix.Component component = (Wix.Component) this.Core.GetIndexedElement("Component", (string)row[4]);
                if (null != component)
                {
                    component.AddChild(urlReservation);
                }
                else
                {
                    this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "Component_", (string)row[2], "Component"));
                }
                this.Core.IndexElement(row, urlReservation);
            }
        }