Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | For the design-time components installer tool, make sure that verbose mode is honored for mock registry keys even in the event that a parameter has an invalid value. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
d1111b2d686d1261af5561c14f817f3b |
User & Date: | mistachkin 2017-03-13 21:22:09.980 |
Context
2017-03-14
| ||
21:07 | Update the release archive verification tool to deal with SHA3 hashes. check-in: 8d36bd8426 user: mistachkin tags: trunk | |
2017-03-13
| ||
21:22 | For the design-time components installer tool, make sure that verbose mode is honored for mock registry keys even in the event that a parameter has an invalid value. check-in: d1111b2d68 user: mistachkin tags: trunk | |
2017-02-27
| ||
17:20 | Make PATH handling more robust in the batch tools for MSBuild. check-in: d9a9e08362 user: mistachkin tags: trunk | |
Changes
Changes to tools/install/Installer.cs.
︙ | ︙ | |||
1568 1569 1570 1571 1572 1573 1574 | MockRegistryKey rootKey, string subKeyName, bool writable, bool whatIf, bool verbose ) { | < < < > > > | 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 | MockRegistryKey rootKey, string subKeyName, bool writable, bool whatIf, bool verbose ) { if (verbose) TraceOps.DebugAndTrace(writable ? TracePriority.Highest : TracePriority.Higher, debugCallback, traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}, writable = {2}", ForDisplay(rootKey), ForDisplay(subKeyName), ForDisplay(writable)), traceCategory); if (rootKey == null) return null; // // HACK: Always forbid writable access when operating in // "what-if" mode. // MockRegistryKey key = rootKey.OpenSubKey( subKeyName, whatIf ? false : writable); |
︙ | ︙ | |||
1600 1601 1602 1603 1604 1605 1606 | public static MockRegistryKey CreateSubKey( MockRegistryKey rootKey, string subKeyName, bool whatIf, bool verbose ) { | < < < > > > | 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 | public static MockRegistryKey CreateSubKey( MockRegistryKey rootKey, string subKeyName, bool whatIf, bool verbose ) { if (verbose) TraceOps.DebugAndTrace(TracePriority.Highest, debugCallback, traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey), ForDisplay(subKeyName)), traceCategory); if (rootKey == null) return null; try { // // HACK: Always open a key, rather than creating one when // operating in "what-if" mode. // |
︙ | ︙ | |||
1654 1655 1656 1657 1658 1659 1660 | MockRegistryKey rootKey, string subKeyName, bool throwOnMissing, bool whatIf, bool verbose ) { | < < < > > > < < < > > > < < < > > > < < < > > > < < < > > > < < < > > > | 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 | MockRegistryKey rootKey, string subKeyName, bool throwOnMissing, bool whatIf, bool verbose ) { if (verbose) TraceOps.DebugAndTrace(TracePriority.Highest, debugCallback, traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey), ForDisplay(subKeyName)), traceCategory); if (rootKey == null) return; if (!whatIf) rootKey.DeleteSubKey(subKeyName, throwOnMissing); subKeysDeleted++; } /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] public static void DeleteSubKeyTree( MockRegistryKey rootKey, string subKeyName, bool whatIf, bool verbose ) { if (verbose) TraceOps.DebugAndTrace(TracePriority.Highest, debugCallback, traceCallback, String.Format( "rootKey = {0}, subKeyName = {1}", ForDisplay(rootKey), ForDisplay(subKeyName)), traceCategory); if (rootKey == null) return; if (!whatIf) rootKey.DeleteSubKeyTree(subKeyName); subKeysDeleted++; } /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] public static string[] GetSubKeyNames( MockRegistryKey key, bool whatIf, bool verbose ) { if (verbose) TraceOps.DebugAndTrace(TracePriority.High, debugCallback, traceCallback, String.Format( "key = {0}", ForDisplay(key)), traceCategory); if (key == null) return null; return key.GetSubKeyNames(); } /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] public static object GetValue( MockRegistryKey key, string name, object defaultValue, bool whatIf, bool verbose ) { if (verbose) TraceOps.DebugAndTrace(TracePriority.High, debugCallback, traceCallback, String.Format( "key = {0}, name = {1}, defaultValue = {2}", ForDisplay(key), ForDisplay(name), ForDisplay(defaultValue)), traceCategory); if (key == null) return null; object value = key.GetValue(name, defaultValue); keyValuesRead++; return value; } /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] public static void SetValue( MockRegistryKey key, string name, object value, bool whatIf, bool verbose ) { if (verbose) TraceOps.DebugAndTrace(TracePriority.Highest, debugCallback, traceCallback, String.Format( "key = {0}, name = {1}, value = {2}", ForDisplay(key), ForDisplay(name), ForDisplay(value)), traceCategory); if (key == null) return; if (!whatIf) key.SetValue(name, value); keyValuesWritten++; } /////////////////////////////////////////////////////////////////// [MethodImpl(MethodImplOptions.NoInlining)] public static void DeleteValue( MockRegistryKey key, string name, bool throwOnMissing, bool whatIf, bool verbose ) { if (verbose) TraceOps.DebugAndTrace(TracePriority.Highest, debugCallback, traceCallback, String.Format( "key = {0}, name = {1}", ForDisplay(key), ForDisplay(name)), traceCategory); if (key == null) return; if (!whatIf) key.DeleteValue(name, throwOnMissing); keyValuesDeleted++; } #endregion |
︙ | ︙ |