System.Data.SQLite
Check-in [f9873f2b98]
Not logged in

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

Overview
Comment:Improve robustness of the design-time components installer when no assemblies are available to install.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | designOptions
Files: files | file ages | folders
SHA1: f9873f2b987a85efea340e6947c7014770f7c091
User & Date: mistachkin 2014-08-03 20:03:22
Context
2014-08-04
03:38
Improve error handling in the design-time components when the provider is not found. check-in: 3013b98ea2 user: mistachkin tags: designOptions
2014-08-03
20:03
Improve robustness of the design-time components installer when no assemblies are available to install. check-in: f9873f2b98 user: mistachkin tags: designOptions
02:38
Merge updates from trunk. check-in: b6b8b71b11 user: mistachkin tags: designOptions
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tools/install/Installer.cs.

3631
3632
3633
3634
3635
3636
3637

3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650

3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663

3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676

3677
3678
3679
3680
3681
3682
3683
3684
3685
3686









3687
3688
3689
3690
3691
3692
3693
....
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
....
3917
3918
3919
3920
3921
3922
3923


3924
3925
3926
3927


3928









3929
3930
3931


3932









3933
3934
3935


3936









3937
3938







3939
3940
3941
3942
3943
3944
3945
....
3951
3952
3953
3954
3955
3956
3957




3958
3959
3960







3961
3962
3963
3964
3965
3966
3967
....
4703
4704
4705
4706
4707
4708
4709


4710


4711
4712



4713
4714
4715
4716
4717
4718
4719
....
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
                //
                return HasFlags(ProviderFlags.SystemEf6MustBeGlobal, true) ?
                    IsSystemEf6AssemblyGlobal() : true;
            }

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


            public AssemblyName GetCoreAssemblyName() /* REQUIRED */
            {
                if (coreAssemblyName == null)
                {
                    coreAssemblyName = AssemblyName.GetAssemblyName(
                        CoreFileName); /* throw */
                }

                return coreAssemblyName;
            }

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


            public AssemblyName GetLinqAssemblyName() /* OPTIONAL */
            {
                if (IsLinqSupported() && (linqAssemblyName == null))
                {
                    linqAssemblyName = AssemblyName.GetAssemblyName(
                        LinqFileName); /* throw */
                }

                return linqAssemblyName;
            }

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


            public AssemblyName GetEf6AssemblyName() /* OPTIONAL */
            {
                if (IsEf6Supported() && (ef6AssemblyName == null))
                {
                    ef6AssemblyName = AssemblyName.GetAssemblyName(
                        Ef6FileName); /* throw */
                }

                return ef6AssemblyName;
            }

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


            public AssemblyName GetDesignerAssemblyName() /* REQUIRED */
            {
                if (designerAssemblyName == null)
                {
                    designerAssemblyName = AssemblyName.GetAssemblyName(
                        DesignerFileName); /* throw */
                }

                return designerAssemblyName;
            }










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

            public string GetConfigInvariantName()
            {
                return GetInvariantName();
            }
................................................................................
            ///////////////////////////////////////////////////////////////////

            public string GetFactoryTypeName()
            {
                return IsEf6Supported() ? Ef6FactoryTypeName : FactoryTypeName;
            }

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

            public AssemblyName GetProviderAssemblyName()
            {
                return IsEf6Supported() ?
                    GetEf6AssemblyName() : GetCoreAssemblyName(); /* throw */
            }

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

            public void Dump(
                TraceCallback traceCallback
                )
            {
                if (traceCallback != null)
................................................................................

                    traceCallback(String.Format(NameAndValueFormat,
                        "IsEf6Supported", ForDisplay(IsEf6Supported())),
                        traceCategory);

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



                    traceCallback(String.Format(NameAndValueFormat,
                        "GetCoreAssemblyName", ForDisplay(
                        GetCoreAssemblyName())), traceCategory);



                    traceCallback(String.Format(NameAndValueFormat,









                        "GetLinqAssemblyName", ForDisplay(
                        GetLinqAssemblyName())), traceCategory);



                    traceCallback(String.Format(NameAndValueFormat,









                        "GetEf6AssemblyName", ForDisplay(
                        GetEf6AssemblyName())), traceCategory);



                    traceCallback(String.Format(NameAndValueFormat,









                        "GetDesignerAssemblyName", ForDisplay(
                        GetDesignerAssemblyName())), traceCategory);








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

                    traceCallback(String.Format(NameAndValueFormat,
                        "GetInvariantName", ForDisplay(GetInvariantName())),
                        traceCategory);

................................................................................
                        "GetProviderInvariantName", ForDisplay(
                        GetProviderInvariantName())), traceCategory);

                    traceCallback(String.Format(NameAndValueFormat,
                        "GetFactoryTypeName", ForDisplay(
                        GetFactoryTypeName())), traceCategory);





                    traceCallback(String.Format(NameAndValueFormat,
                        "GetProviderAssemblyName", ForDisplay(
                        GetProviderAssemblyName())), traceCategory);







                }
            }
            #endregion

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

            #region Public Properties
................................................................................
            else
            {
                result = value.ToString();

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



                result = String.Format(


                    type.IsSubclassOf(typeof(ValueType)) ? "{0}" : "\"{0}\"",
                    result);



            }

            return result;
        }
        #endregion

        ///////////////////////////////////////////////////////////////////////
................................................................................
                //
                using (MockRegistry registry = new MockRegistry(
                        configuration.WhatIf, false, false))
                {
                    #region Assembly Name Checks
                    //
                    // NOTE: Query all the assembly names first, before making
                    //       any changes to the system, because this will throw
                    //       an exception if any of the file names do not point
                    //       to a valid managed assembly.  The values of these
                    //       local variables are never used after this point;
                    //       however, do not remove them.
                    //
                    AssemblyName coreAssemblyName =
                        configuration.GetCoreAssemblyName(); /* NOT USED */

                    AssemblyName linqAssemblyName =
                        configuration.GetLinqAssemblyName(); /* NOT USED */








>
|












>
|












>
|












>
|









>
>
>
>
>
>
>
>
>







 







<
<
<
<
<
<
<
<







 







>
>
|
|
|
|
>
>
|
>
>
>
>
>
>
>
>
>
|
|
|
>
>
|
>
>
>
>
>
>
>
>
>
|
|
|
>
>
|
>
>
>
>
>
>
>
>
>
|
|
>
>
>
>
>
>
>







 







>
>
>
>
|
|
|
>
>
>
>
>
>
>







 







>
>
|
>
>
|
<
>
>
>







 







|
|
|
|
|







3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
....
3715
3716
3717
3718
3719
3720
3721








3722
3723
3724
3725
3726
3727
3728
....
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
....
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
....
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773

4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
....
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
                //
                return HasFlags(ProviderFlags.SystemEf6MustBeGlobal, true) ?
                    IsSystemEf6AssemblyGlobal() : true;
            }

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

            /* REQUIRED */
            public AssemblyName GetCoreAssemblyName() /* throw */
            {
                if (coreAssemblyName == null)
                {
                    coreAssemblyName = AssemblyName.GetAssemblyName(
                        CoreFileName); /* throw */
                }

                return coreAssemblyName;
            }

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

            /* OPTIONAL */
            public AssemblyName GetLinqAssemblyName() /* throw */
            {
                if (IsLinqSupported() && (linqAssemblyName == null))
                {
                    linqAssemblyName = AssemblyName.GetAssemblyName(
                        LinqFileName); /* throw */
                }

                return linqAssemblyName;
            }

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

            /* OPTIONAL */
            public AssemblyName GetEf6AssemblyName() /* throw */
            {
                if (IsEf6Supported() && (ef6AssemblyName == null))
                {
                    ef6AssemblyName = AssemblyName.GetAssemblyName(
                        Ef6FileName); /* throw */
                }

                return ef6AssemblyName;
            }

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

            /* REQUIRED */
            public AssemblyName GetDesignerAssemblyName() /* throw */
            {
                if (designerAssemblyName == null)
                {
                    designerAssemblyName = AssemblyName.GetAssemblyName(
                        DesignerFileName); /* throw */
                }

                return designerAssemblyName;
            }

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

            /* REQUIRED */
            public AssemblyName GetProviderAssemblyName() /* throw */
            {
                return IsEf6Supported() ?
                    GetEf6AssemblyName() : GetCoreAssemblyName();
            }

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

            public string GetConfigInvariantName()
            {
                return GetInvariantName();
            }
................................................................................
            ///////////////////////////////////////////////////////////////////

            public string GetFactoryTypeName()
            {
                return IsEf6Supported() ? Ef6FactoryTypeName : FactoryTypeName;
            }









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

            public void Dump(
                TraceCallback traceCallback
                )
            {
                if (traceCallback != null)
................................................................................

                    traceCallback(String.Format(NameAndValueFormat,
                        "IsEf6Supported", ForDisplay(IsEf6Supported())),
                        traceCategory);

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

                    try
                    {
                        traceCallback(String.Format(NameAndValueFormat,
                            "GetCoreAssemblyName", ForDisplay(
                            GetCoreAssemblyName())), traceCategory);
                    }
                    catch (Exception e)
                    {
                        traceCallback(String.Format(NameAndValueFormat,
                            "GetCoreAssemblyName", ForDisplay(e)),
                            traceCategory);
                    }

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

                    try
                    {
                        traceCallback(String.Format(NameAndValueFormat,
                            "GetLinqAssemblyName", ForDisplay(
                            GetLinqAssemblyName())), traceCategory);
                    }
                    catch (Exception e)
                    {
                        traceCallback(String.Format(NameAndValueFormat,
                            "GetLinqAssemblyName", ForDisplay(e)),
                            traceCategory);
                    }

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

                    try
                    {
                        traceCallback(String.Format(NameAndValueFormat,
                            "GetEf6AssemblyName", ForDisplay(
                            GetEf6AssemblyName())), traceCategory);
                    }
                    catch (Exception e)
                    {
                        traceCallback(String.Format(NameAndValueFormat,
                            "GetEf6AssemblyName", ForDisplay(e)),
                            traceCategory);
                    }

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

                    try
                    {
                        traceCallback(String.Format(NameAndValueFormat,
                            "GetDesignerAssemblyName", ForDisplay(
                            GetDesignerAssemblyName())), traceCategory);
                    }
                    catch (Exception e)
                    {
                        traceCallback(String.Format(NameAndValueFormat,
                            "GetDesignerAssemblyName", ForDisplay(e)),
                            traceCategory);
                    }

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

                    traceCallback(String.Format(NameAndValueFormat,
                        "GetInvariantName", ForDisplay(GetInvariantName())),
                        traceCategory);

................................................................................
                        "GetProviderInvariantName", ForDisplay(
                        GetProviderInvariantName())), traceCategory);

                    traceCallback(String.Format(NameAndValueFormat,
                        "GetFactoryTypeName", ForDisplay(
                        GetFactoryTypeName())), traceCategory);

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

                    try
                    {
                        traceCallback(String.Format(NameAndValueFormat,
                            "GetProviderAssemblyName", ForDisplay(
                            GetProviderAssemblyName())), traceCategory);
                    }
                    catch (Exception e)
                    {
                        traceCallback(String.Format(NameAndValueFormat,
                            "GetProviderAssemblyName", ForDisplay(e)),
                            traceCategory);
                    }
                }
            }
            #endregion

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

            #region Public Properties
................................................................................
            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)))

                {
                    result = String.Format("\"{0}\"", result);
                }
            }

            return result;
        }
        #endregion

        ///////////////////////////////////////////////////////////////////////
................................................................................
                //
                using (MockRegistry registry = new MockRegistry(
                        configuration.WhatIf, false, false))
                {
                    #region Assembly Name Checks
                    //
                    // NOTE: Query all the assembly names first, before making
                    //       any changes to the system, because these calls
                    //       will throw exceptions if any of the file names do
                    //       not point to a valid managed assembly.  The values
                    //       of these local variables are never used after this
                    //       point; however, do not remove them.
                    //
                    AssemblyName coreAssemblyName =
                        configuration.GetCoreAssemblyName(); /* NOT USED */

                    AssemblyName linqAssemblyName =
                        configuration.GetLinqAssemblyName(); /* NOT USED */