System.Data.SQLite

Check-in [9e4a7c8f46]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Coding style improvements to the design-time components installer.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9e4a7c8f469fe193f58a1b7b13bc9a172c4f7b53
User & Date: mistachkin 2017-12-06 22:47:17.709
Context
2017-12-06
23:18
In the design-time components installer, enhance MockRegistryKey class to enable cloning without regard to its safety settings; however, the safety settings are preserved in the clone. check-in: f8e8c3d8dc user: mistachkin tags: trunk
22:47
Coding style improvements to the design-time components installer. check-in: 9e4a7c8f46 user: mistachkin tags: trunk
22:38
Enhance the design-time components installer to support creating a log file of all registry write operations. check-in: 297b44b1ef user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to tools/install/Installer.cs.
2582
2583
2584
2585
2586
2587
2588

2589
2590
2591
2592
2593
2594
2595
        ///////////////////////////////////////////////////////////////////////

        #region RegistryOperation Class
        private sealed class RegistryOperation
        {
            #region Private Constants
            private const char FieldDelimiter = '\t';

            #endregion

            ///////////////////////////////////////////////////////////////////

            #region Public Constructors
            public RegistryOperation(
                string methodName,







>







2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
        ///////////////////////////////////////////////////////////////////////

        #region RegistryOperation Class
        private sealed class RegistryOperation
        {
            #region Private Constants
            private const char FieldDelimiter = '\t';
            private const string ListElementDelimiter = ", ";
            #endregion

            ///////////////////////////////////////////////////////////////////

            #region Public Constructors
            public RegistryOperation(
                string methodName,
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
                builder.Append(ForDisplay(key));
                builder.Append(FieldDelimiter);
                builder.Append(ForDisplay(subKeyName));
                builder.Append(FieldDelimiter);
                builder.Append(ForDisplay(valueName));
                builder.Append(FieldDelimiter);

                builder.Append(ForDisplay(
                    MockRegistryKey.ValueToString(value, ", ", "<null>")));

                return builder.ToString();
            }
            #endregion

            ///////////////////////////////////////////////////////////////////








|
|







2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
                builder.Append(ForDisplay(key));
                builder.Append(FieldDelimiter);
                builder.Append(ForDisplay(subKeyName));
                builder.Append(FieldDelimiter);
                builder.Append(ForDisplay(valueName));
                builder.Append(FieldDelimiter);

                builder.Append(ForDisplay(MockRegistryKey.ValueToString(
                    value, ListElementDelimiter, DisplayNull)));

                return builder.ToString();
            }
            #endregion

            ///////////////////////////////////////////////////////////////////

5943
5944
5945
5946
5947
5948
5949





5950
5951
5952
5953
5954
5955
5956

        private const string Description =
            ".NET Framework Data Provider for SQLite";
        #endregion

        ///////////////////////////////////////////////////////////////////////






        private const string CLRv2ImageRuntimeVersion = "v2.0.50727";
        private const string CLRv4ImageRuntimeVersion = "v4.0.30319";

        ///////////////////////////////////////////////////////////////////////

        private const string SystemEf6AssemblyName = "EntityFramework, " +
            "Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";







>
>
>
>
>







5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962

        private const string Description =
            ".NET Framework Data Provider for SQLite";
        #endregion

        ///////////////////////////////////////////////////////////////////////

        private const string DisplayNull = "<null>";
        private const string DisplayEmpty = "<empty>";

        ///////////////////////////////////////////////////////////////////////

        private const string CLRv2ImageRuntimeVersion = "v2.0.50727";
        private const string CLRv4ImageRuntimeVersion = "v4.0.30319";

        ///////////////////////////////////////////////////////////////////////

        private const string SystemEf6AssemblyName = "EntityFramework, " +
            "Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181

        #region Generic String Handling
        private static string ForDisplay(
            object value
            )
        {
            if (value == null)
                return "<null>";

            string result;
            Type type = value.GetType();

            if (type == typeof(XmlElement))
            {
                XmlElement element = (XmlElement)value;







|







6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187

        #region Generic String Handling
        private static string ForDisplay(
            object value
            )
        {
            if (value == null)
                return DisplayNull;

            string result;
            Type type = value.GetType();

            if (type == typeof(XmlElement))
            {
                XmlElement element = (XmlElement)value;
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
                result = ForDisplay(key.ToString()); /* RECURSIVE */
            }
            else
            {
                result = value.ToString();

                if (result.Length == 0)
                    return "<empty>";

                if (type.IsSubclassOf(typeof(Exception)))
                {
                    result = String.Format(
                        "{0}{1}{0}", Environment.NewLine, result);
                }
                else if (!type.IsSubclassOf(typeof(ValueType)))







|







6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
                result = ForDisplay(key.ToString()); /* RECURSIVE */
            }
            else
            {
                result = value.ToString();

                if (result.Length == 0)
                    return DisplayEmpty;

                if (type.IsSubclassOf(typeof(Exception)))
                {
                    result = String.Format(
                        "{0}{1}{0}", Environment.NewLine, result);
                }
                else if (!type.IsSubclassOf(typeof(ValueType)))