Пример #1
0
        /// <summary>
        /// Decompile the MessageQueueGroupPermission table.
        /// </summary>
        /// <param name="table">The table to decompile.</param>
        private void DecompileMessageQueueGroupPermissionTable(Table table)
        {
            foreach (Row row in table.Rows)
            {
                Msmq.MessageQueuePermission queuePermission = new Msmq.MessageQueuePermission();

                queuePermission.Id = (string)row[0];

                if (null != row[2])
                {
                    queuePermission.MessageQueue = (string)row[2];
                }

                queuePermission.Group = (string)row[3];

                DecompileMessageQueuePermissionAttributes(row, queuePermission);

                Wix.Component component = (Wix.Component) this.Core.GetIndexedElement("Component", (string)row[1]);
                if (null != component)
                {
                    component.AddChild(queuePermission);
                }
                else
                {
                    this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerCore.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component"));
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Decompile the MessageQueueGroupPermission table.
        /// </summary>
        /// <param name="table">The table to decompile.</param>
        private void DecompileMessageQueueGroupPermissionTable(Table table)
        {
            foreach (Row row in table.Rows)
            {
                Msmq.MessageQueuePermission queuePermission = new Msmq.MessageQueuePermission();

                queuePermission.Id = (string)row[0];

                if (null != row[2])
                {
                    queuePermission.MessageQueue = (string)row[2];
                }

                queuePermission.Group = (string)row[3];

                DecompileMessageQueuePermissionAttributes(row, queuePermission);

                Wix.Component component = (Wix.Component)this.Core.GetIndexedElement("Component", (string)row[1]);
                if (null != component)
                {
                    component.AddChild(queuePermission);
                }
                else
                {
                    this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerCore.PrimaryKeyDelimiter), "Component_", (string)row[1], "Component"));
                }
            }
        }
Пример #3
0
        /// <summary>
        /// Decompile row attributes for the MessageQueueUserPermission and MessageQueueGroupPermission tables.
        /// </summary>
        /// <param name="row">The row to decompile.</param>
        /// <param name="table">Target element.</param>
        private void DecompileMessageQueuePermissionAttributes(Row row, Msmq.MessageQueuePermission queuePermission)
        {
            int attributes = (int)row[4];

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.DeleteMessage))
            {
                queuePermission.DeleteMessage = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.PeekMessage))
            {
                queuePermission.PeekMessage = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.WriteMessage))
            {
                queuePermission.WriteMessage = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.DeleteJournalMessage))
            {
                queuePermission.DeleteJournalMessage = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.SetQueueProperties))
            {
                queuePermission.SetQueueProperties = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.GetQueueProperties))
            {
                queuePermission.GetQueueProperties = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.DeleteQueue))
            {
                queuePermission.DeleteQueue = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.GetQueuePermissions))
            {
                queuePermission.GetQueuePermissions = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.ChangeQueuePermissions))
            {
                queuePermission.ChangeQueuePermissions = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.TakeQueueOwnership))
            {
                queuePermission.TakeQueueOwnership = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.ReceiveMessage))
            {
                queuePermission.ReceiveMessage = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.ReceiveJournalMessage))
            {
                queuePermission.ReceiveJournalMessage = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.QueueGenericRead))
            {
                queuePermission.QueueGenericRead = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.QueueGenericWrite))
            {
                queuePermission.QueueGenericWrite = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.QueueGenericExecute))
            {
                queuePermission.QueueGenericExecute = Msmq.YesNoType.yes;
            }

            if (0 != (attributes & (int)MsmqCompiler.MqiMessageQueuePermission.QueueGenericAll))
            {
                queuePermission.QueueGenericAll = Msmq.YesNoType.yes;
            }
        }