diff --git a/Directory.Build.props b/Directory.Build.props index eb73c5102..128282c6e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -66,13 +66,13 @@ 12.0 - + $(DefineConstants);TRACE;DEBUG true portable - + $(DefineConstants);TRACE diff --git a/Orm.sln b/Orm.sln index c3c4f535c..e96d010b9 100644 --- a/Orm.sln +++ b/Orm.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.2.32616.157 +# Visual Studio Version 18 +VisualStudioVersion = 18.4.11620.152 stable MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xtensive.Orm", "Orm\Xtensive.Orm\Xtensive.Orm.csproj", "{064D5B81-8D54-4F2F-9649-952F71E27E14}" EndProject @@ -86,394 +86,408 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NuGetPublish", "Publish\NuG EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Xtensive.Orm.Tests.FSharp", "Orm\Xtensive.Orm.Tests.FSharp\Xtensive.Orm.Tests.FSharp.fsproj", "{A68C90C1-AD82-40FD-A18D-F04923514743}" EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Xtensive.Orm.Tests.VB", "Orm\Xtensive.Orm.Tests.VB\Xtensive.Orm.Tests.VB.vbproj", "{C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - Debug-NET8|Any CPU = Debug-NET8|Any CPU Debug-NET10|Any CPU = Debug-NET10|Any CPU - Release-NET8|Any CPU = Release-NET8|Any CPU + Debug-NET8|Any CPU = Debug-NET8|Any CPU + Release|Any CPU = Release|Any CPU Release-NET10|Any CPU = Release-NET10|Any CPU + Release-NET8|Any CPU = Release-NET8|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {064D5B81-8D54-4F2F-9649-952F71E27E14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {064D5B81-8D54-4F2F-9649-952F71E27E14}.Debug|Any CPU.Build.0 = Debug|Any CPU - {064D5B81-8D54-4F2F-9649-952F71E27E14}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {064D5B81-8D54-4F2F-9649-952F71E27E14}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {064D5B81-8D54-4F2F-9649-952F71E27E14}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {064D5B81-8D54-4F2F-9649-952F71E27E14}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {064D5B81-8D54-4F2F-9649-952F71E27E14}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {064D5B81-8D54-4F2F-9649-952F71E27E14}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {064D5B81-8D54-4F2F-9649-952F71E27E14}.Release|Any CPU.ActiveCfg = Release|Any CPU {064D5B81-8D54-4F2F-9649-952F71E27E14}.Release|Any CPU.Build.0 = Release|Any CPU - {064D5B81-8D54-4F2F-9649-952F71E27E14}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {064D5B81-8D54-4F2F-9649-952F71E27E14}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {064D5B81-8D54-4F2F-9649-952F71E27E14}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {064D5B81-8D54-4F2F-9649-952F71E27E14}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {064D5B81-8D54-4F2F-9649-952F71E27E14}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {064D5B81-8D54-4F2F-9649-952F71E27E14}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Release|Any CPU.Build.0 = Release|Any CPU - {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {4E5C9208-426B-4536-AF7C-994C07E83FFA}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {4A985241-6698-47AA-A9DD-F3847600D542}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4A985241-6698-47AA-A9DD-F3847600D542}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A985241-6698-47AA-A9DD-F3847600D542}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {4A985241-6698-47AA-A9DD-F3847600D542}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {4A985241-6698-47AA-A9DD-F3847600D542}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {4A985241-6698-47AA-A9DD-F3847600D542}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {4A985241-6698-47AA-A9DD-F3847600D542}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {4A985241-6698-47AA-A9DD-F3847600D542}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {4A985241-6698-47AA-A9DD-F3847600D542}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A985241-6698-47AA-A9DD-F3847600D542}.Release|Any CPU.Build.0 = Release|Any CPU - {4A985241-6698-47AA-A9DD-F3847600D542}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {4A985241-6698-47AA-A9DD-F3847600D542}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {4A985241-6698-47AA-A9DD-F3847600D542}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {4A985241-6698-47AA-A9DD-F3847600D542}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {4A985241-6698-47AA-A9DD-F3847600D542}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {4A985241-6698-47AA-A9DD-F3847600D542}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {411F1ECB-053D-470A-9B75-49D715B440D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {411F1ECB-053D-470A-9B75-49D715B440D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {411F1ECB-053D-470A-9B75-49D715B440D6}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {411F1ECB-053D-470A-9B75-49D715B440D6}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {411F1ECB-053D-470A-9B75-49D715B440D6}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {411F1ECB-053D-470A-9B75-49D715B440D6}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {411F1ECB-053D-470A-9B75-49D715B440D6}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {411F1ECB-053D-470A-9B75-49D715B440D6}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {411F1ECB-053D-470A-9B75-49D715B440D6}.Release|Any CPU.ActiveCfg = Release|Any CPU {411F1ECB-053D-470A-9B75-49D715B440D6}.Release|Any CPU.Build.0 = Release|Any CPU - {411F1ECB-053D-470A-9B75-49D715B440D6}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {411F1ECB-053D-470A-9B75-49D715B440D6}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {411F1ECB-053D-470A-9B75-49D715B440D6}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {411F1ECB-053D-470A-9B75-49D715B440D6}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {411F1ECB-053D-470A-9B75-49D715B440D6}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {411F1ECB-053D-470A-9B75-49D715B440D6}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Debug|Any CPU.Build.0 = Debug|Any CPU - {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Release|Any CPU.ActiveCfg = Release|Any CPU {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Release|Any CPU.Build.0 = Release|Any CPU - {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {36F889C0-F5D9-43DF-9E6E-D18C97673973}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Release|Any CPU.ActiveCfg = Release|Any CPU {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Release|Any CPU.Build.0 = Release|Any CPU - {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {E6268FB3-D38A-4849-A43D-CB0FF7B67E60}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Release|Any CPU.ActiveCfg = Release|Any CPU {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Release|Any CPU.Build.0 = Release|Any CPU - {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {C9B5BFED-85BC-47AE-8872-0BA97AF7B8B9}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {CB5E5E27-C723-494D-B288-036267823D28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CB5E5E27-C723-494D-B288-036267823D28}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB5E5E27-C723-494D-B288-036267823D28}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {CB5E5E27-C723-494D-B288-036267823D28}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {CB5E5E27-C723-494D-B288-036267823D28}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {CB5E5E27-C723-494D-B288-036267823D28}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {CB5E5E27-C723-494D-B288-036267823D28}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {CB5E5E27-C723-494D-B288-036267823D28}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {CB5E5E27-C723-494D-B288-036267823D28}.Release|Any CPU.ActiveCfg = Release|Any CPU {CB5E5E27-C723-494D-B288-036267823D28}.Release|Any CPU.Build.0 = Release|Any CPU - {CB5E5E27-C723-494D-B288-036267823D28}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {CB5E5E27-C723-494D-B288-036267823D28}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {CB5E5E27-C723-494D-B288-036267823D28}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {CB5E5E27-C723-494D-B288-036267823D28}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {CB5E5E27-C723-494D-B288-036267823D28}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {CB5E5E27-C723-494D-B288-036267823D28}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Release|Any CPU.ActiveCfg = Release|Any CPU {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Release|Any CPU.Build.0 = Release|Any CPU - {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {38F31CBB-034B-4231-91BE-D7D24C8A20F9}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Debug|Any CPU.Build.0 = Debug|Any CPU - {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Release|Any CPU.ActiveCfg = Release|Any CPU {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Release|Any CPU.Build.0 = Release|Any CPU - {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {53CB563A-BE93-4061-BDB3-AC3B69093A90}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Release|Any CPU.ActiveCfg = Release|Any CPU {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Release|Any CPU.Build.0 = Release|Any CPU - {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {6CA1FDE2-ECBA-4580-97C3-A00B707558DB}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Release|Any CPU.Build.0 = Release|Any CPU - {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {DC44D096-DF24-41EC-9841-07F33E0A8EA3}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Release|Any CPU.ActiveCfg = Release|Any CPU {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Release|Any CPU.Build.0 = Release|Any CPU - {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {1E0545D6-D979-48E0-A311-064BEDCE5A62}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {BA58CD9C-139B-41AB-915D-962765DFADBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BA58CD9C-139B-41AB-915D-962765DFADBA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BA58CD9C-139B-41AB-915D-962765DFADBA}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {BA58CD9C-139B-41AB-915D-962765DFADBA}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {BA58CD9C-139B-41AB-915D-962765DFADBA}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {BA58CD9C-139B-41AB-915D-962765DFADBA}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {BA58CD9C-139B-41AB-915D-962765DFADBA}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {BA58CD9C-139B-41AB-915D-962765DFADBA}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {BA58CD9C-139B-41AB-915D-962765DFADBA}.Release|Any CPU.ActiveCfg = Release|Any CPU {BA58CD9C-139B-41AB-915D-962765DFADBA}.Release|Any CPU.Build.0 = Release|Any CPU - {BA58CD9C-139B-41AB-915D-962765DFADBA}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {BA58CD9C-139B-41AB-915D-962765DFADBA}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {BA58CD9C-139B-41AB-915D-962765DFADBA}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {BA58CD9C-139B-41AB-915D-962765DFADBA}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {BA58CD9C-139B-41AB-915D-962765DFADBA}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {BA58CD9C-139B-41AB-915D-962765DFADBA}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {6E052601-9E0C-473D-A617-AD74DED24DC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6E052601-9E0C-473D-A617-AD74DED24DC0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6E052601-9E0C-473D-A617-AD74DED24DC0}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {6E052601-9E0C-473D-A617-AD74DED24DC0}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {6E052601-9E0C-473D-A617-AD74DED24DC0}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {6E052601-9E0C-473D-A617-AD74DED24DC0}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {6E052601-9E0C-473D-A617-AD74DED24DC0}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {6E052601-9E0C-473D-A617-AD74DED24DC0}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {6E052601-9E0C-473D-A617-AD74DED24DC0}.Release|Any CPU.ActiveCfg = Release|Any CPU {6E052601-9E0C-473D-A617-AD74DED24DC0}.Release|Any CPU.Build.0 = Release|Any CPU - {6E052601-9E0C-473D-A617-AD74DED24DC0}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {6E052601-9E0C-473D-A617-AD74DED24DC0}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {6E052601-9E0C-473D-A617-AD74DED24DC0}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {6E052601-9E0C-473D-A617-AD74DED24DC0}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {6E052601-9E0C-473D-A617-AD74DED24DC0}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {6E052601-9E0C-473D-A617-AD74DED24DC0}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {CE6BC11C-E785-4F10-A945-2416FD001689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CE6BC11C-E785-4F10-A945-2416FD001689}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CE6BC11C-E785-4F10-A945-2416FD001689}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {CE6BC11C-E785-4F10-A945-2416FD001689}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {CE6BC11C-E785-4F10-A945-2416FD001689}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {CE6BC11C-E785-4F10-A945-2416FD001689}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {CE6BC11C-E785-4F10-A945-2416FD001689}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {CE6BC11C-E785-4F10-A945-2416FD001689}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {CE6BC11C-E785-4F10-A945-2416FD001689}.Release|Any CPU.ActiveCfg = Release|Any CPU {CE6BC11C-E785-4F10-A945-2416FD001689}.Release|Any CPU.Build.0 = Release|Any CPU - {CE6BC11C-E785-4F10-A945-2416FD001689}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {CE6BC11C-E785-4F10-A945-2416FD001689}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {CE6BC11C-E785-4F10-A945-2416FD001689}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {CE6BC11C-E785-4F10-A945-2416FD001689}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {CE6BC11C-E785-4F10-A945-2416FD001689}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {CE6BC11C-E785-4F10-A945-2416FD001689}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {48827567-3991-4767-BED5-C76CAD47628E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {48827567-3991-4767-BED5-C76CAD47628E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {48827567-3991-4767-BED5-C76CAD47628E}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {48827567-3991-4767-BED5-C76CAD47628E}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {48827567-3991-4767-BED5-C76CAD47628E}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {48827567-3991-4767-BED5-C76CAD47628E}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {48827567-3991-4767-BED5-C76CAD47628E}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {48827567-3991-4767-BED5-C76CAD47628E}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {48827567-3991-4767-BED5-C76CAD47628E}.Release|Any CPU.ActiveCfg = Release|Any CPU {48827567-3991-4767-BED5-C76CAD47628E}.Release|Any CPU.Build.0 = Release|Any CPU - {48827567-3991-4767-BED5-C76CAD47628E}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {48827567-3991-4767-BED5-C76CAD47628E}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {48827567-3991-4767-BED5-C76CAD47628E}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {48827567-3991-4767-BED5-C76CAD47628E}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {48827567-3991-4767-BED5-C76CAD47628E}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {48827567-3991-4767-BED5-C76CAD47628E}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Release|Any CPU.ActiveCfg = Release|Any CPU {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Release|Any CPU.Build.0 = Release|Any CPU - {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {9CB81088-CF8A-400C-B80A-2D9782ED5B10}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Release|Any CPU.ActiveCfg = Release|Any CPU {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Release|Any CPU.Build.0 = Release|Any CPU - {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {5E809296-02AA-4657-9FC1-CE0E0828B2B5}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Release|Any CPU.ActiveCfg = Release|Any CPU {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Release|Any CPU.Build.0 = Release|Any CPU - {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {0AB4E2E3-9F74-4CB9-A25D-5C8FD38D9291}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {23550452-235D-4413-952B-BB8A45CAF8B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {23550452-235D-4413-952B-BB8A45CAF8B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23550452-235D-4413-952B-BB8A45CAF8B1}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU + {23550452-235D-4413-952B-BB8A45CAF8B1}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU {23550452-235D-4413-952B-BB8A45CAF8B1}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU {23550452-235D-4413-952B-BB8A45CAF8B1}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU - {23550452-235D-4413-952B-BB8A45CAF8B1}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU - {23550452-235D-4413-952B-BB8A45CAF8B1}.Debug-NET10|Any CPU.Build.0 = Debug-NET0|Any CPU {23550452-235D-4413-952B-BB8A45CAF8B1}.Release|Any CPU.ActiveCfg = Release|Any CPU {23550452-235D-4413-952B-BB8A45CAF8B1}.Release|Any CPU.Build.0 = Release|Any CPU - {23550452-235D-4413-952B-BB8A45CAF8B1}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {23550452-235D-4413-952B-BB8A45CAF8B1}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {23550452-235D-4413-952B-BB8A45CAF8B1}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {23550452-235D-4413-952B-BB8A45CAF8B1}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {23550452-235D-4413-952B-BB8A45CAF8B1}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {23550452-235D-4413-952B-BB8A45CAF8B1}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Debug|Any CPU.Build.0 = Debug|Any CPU - {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Release|Any CPU.ActiveCfg = Release|Any CPU {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Release|Any CPU.Build.0 = Release|Any CPU - {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {643D0EC3-D15E-4061-A3B7-EBB54EEB3069}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {2481997F-AC95-43B2-8A4E-0210E50387D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2481997F-AC95-43B2-8A4E-0210E50387D5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2481997F-AC95-43B2-8A4E-0210E50387D5}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {2481997F-AC95-43B2-8A4E-0210E50387D5}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {2481997F-AC95-43B2-8A4E-0210E50387D5}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {2481997F-AC95-43B2-8A4E-0210E50387D5}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {2481997F-AC95-43B2-8A4E-0210E50387D5}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {2481997F-AC95-43B2-8A4E-0210E50387D5}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {2481997F-AC95-43B2-8A4E-0210E50387D5}.Release|Any CPU.ActiveCfg = Release|Any CPU {2481997F-AC95-43B2-8A4E-0210E50387D5}.Release|Any CPU.Build.0 = Release|Any CPU - {2481997F-AC95-43B2-8A4E-0210E50387D5}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {2481997F-AC95-43B2-8A4E-0210E50387D5}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {2481997F-AC95-43B2-8A4E-0210E50387D5}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {2481997F-AC95-43B2-8A4E-0210E50387D5}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {2481997F-AC95-43B2-8A4E-0210E50387D5}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {2481997F-AC95-43B2-8A4E-0210E50387D5}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Release|Any CPU.ActiveCfg = Release|Any CPU {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Release|Any CPU.Build.0 = Release|Any CPU - {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {04580B17-B4FC-41A8-8ABC-336822F4ADB9}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {6CBBB146-851F-49A6-88EC-01FFE455815B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6CBBB146-851F-49A6-88EC-01FFE455815B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6CBBB146-851F-49A6-88EC-01FFE455815B}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {6CBBB146-851F-49A6-88EC-01FFE455815B}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {6CBBB146-851F-49A6-88EC-01FFE455815B}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {6CBBB146-851F-49A6-88EC-01FFE455815B}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {6CBBB146-851F-49A6-88EC-01FFE455815B}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {6CBBB146-851F-49A6-88EC-01FFE455815B}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {6CBBB146-851F-49A6-88EC-01FFE455815B}.Release|Any CPU.ActiveCfg = Release|Any CPU {6CBBB146-851F-49A6-88EC-01FFE455815B}.Release|Any CPU.Build.0 = Release|Any CPU + {6CBBB146-851F-49A6-88EC-01FFE455815B}.Release-NET10|Any CPU.ActiveCfg = Release-NET0|Any CPU + {6CBBB146-851F-49A6-88EC-01FFE455815B}.Release-NET10|Any CPU.Build.0 = Release-NET0|Any CPU {6CBBB146-851F-49A6-88EC-01FFE455815B}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU {6CBBB146-851F-49A6-88EC-01FFE455815B}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU - {6CBBB146-851F-49A6-88EC-01FFE455815B}.Release-NET10|Any CPU.ActiveCfg = Release-NET0|Any CPU - {6CBBB146-851F-49A6-88EC-01FFE455815B}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Release|Any CPU.ActiveCfg = Release|Any CPU {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Release|Any CPU.Build.0 = Release|Any CPU - {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {3AC7C076-26BA-4185-A0FC-2B97D7AF48D9}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Release|Any CPU.ActiveCfg = Release|Any CPU {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Release|Any CPU.Build.0 = Release|Any CPU - {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {15CC7358-3A5B-4146-A5CB-78DAE75E88E6}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Release|Any CPU.ActiveCfg = Release|Any CPU {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Release|Any CPU.Build.0 = Release|Any CPU - {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {8B265DE5-7D83-41BF-8C87-D802325D2DA5}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {75B3DB45-3055-4A22-854A-BD271D5E4218}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {75B3DB45-3055-4A22-854A-BD271D5E4218}.Debug|Any CPU.Build.0 = Debug|Any CPU - {75B3DB45-3055-4A22-854A-BD271D5E4218}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {75B3DB45-3055-4A22-854A-BD271D5E4218}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {75B3DB45-3055-4A22-854A-BD271D5E4218}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {75B3DB45-3055-4A22-854A-BD271D5E4218}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {75B3DB45-3055-4A22-854A-BD271D5E4218}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {75B3DB45-3055-4A22-854A-BD271D5E4218}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {75B3DB45-3055-4A22-854A-BD271D5E4218}.Release|Any CPU.ActiveCfg = Release|Any CPU {75B3DB45-3055-4A22-854A-BD271D5E4218}.Release|Any CPU.Build.0 = Release|Any CPU - {75B3DB45-3055-4A22-854A-BD271D5E4218}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {75B3DB45-3055-4A22-854A-BD271D5E4218}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {75B3DB45-3055-4A22-854A-BD271D5E4218}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {75B3DB45-3055-4A22-854A-BD271D5E4218}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {75B3DB45-3055-4A22-854A-BD271D5E4218}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {75B3DB45-3055-4A22-854A-BD271D5E4218}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {45000ADE-F647-4171-A91A-428CDF682603}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {45000ADE-F647-4171-A91A-428CDF682603}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45000ADE-F647-4171-A91A-428CDF682603}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {45000ADE-F647-4171-A91A-428CDF682603}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {45000ADE-F647-4171-A91A-428CDF682603}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {45000ADE-F647-4171-A91A-428CDF682603}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {45000ADE-F647-4171-A91A-428CDF682603}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {45000ADE-F647-4171-A91A-428CDF682603}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {45000ADE-F647-4171-A91A-428CDF682603}.Release|Any CPU.ActiveCfg = Release|Any CPU {45000ADE-F647-4171-A91A-428CDF682603}.Release|Any CPU.Build.0 = Release|Any CPU - {45000ADE-F647-4171-A91A-428CDF682603}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {45000ADE-F647-4171-A91A-428CDF682603}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {45000ADE-F647-4171-A91A-428CDF682603}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {45000ADE-F647-4171-A91A-428CDF682603}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {45000ADE-F647-4171-A91A-428CDF682603}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {45000ADE-F647-4171-A91A-428CDF682603}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {2CC55F3E-8EA5-4305-8716-D5B944120F82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2CC55F3E-8EA5-4305-8716-D5B944120F82}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU {2CC55F3E-8EA5-4305-8716-D5B944120F82}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU + {2CC55F3E-8EA5-4305-8716-D5B944120F82}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU {2CC55F3E-8EA5-4305-8716-D5B944120F82}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2CC55F3E-8EA5-4305-8716-D5B944120F82}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU {2CC55F3E-8EA5-4305-8716-D5B944120F82}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU + {2CC55F3E-8EA5-4305-8716-D5B944120F82}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU {A68C90C1-AD82-40FD-A18D-F04923514743}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A68C90C1-AD82-40FD-A18D-F04923514743}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A68C90C1-AD82-40FD-A18D-F04923514743}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU - {A68C90C1-AD82-40FD-A18D-F04923514743}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {A68C90C1-AD82-40FD-A18D-F04923514743}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU {A68C90C1-AD82-40FD-A18D-F04923514743}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {A68C90C1-AD82-40FD-A18D-F04923514743}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {A68C90C1-AD82-40FD-A18D-F04923514743}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU {A68C90C1-AD82-40FD-A18D-F04923514743}.Release|Any CPU.ActiveCfg = Release|Any CPU {A68C90C1-AD82-40FD-A18D-F04923514743}.Release|Any CPU.Build.0 = Release|Any CPU - {A68C90C1-AD82-40FD-A18D-F04923514743}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU - {A68C90C1-AD82-40FD-A18D-F04923514743}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU {A68C90C1-AD82-40FD-A18D-F04923514743}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU {A68C90C1-AD82-40FD-A18D-F04923514743}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {A68C90C1-AD82-40FD-A18D-F04923514743}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {A68C90C1-AD82-40FD-A18D-F04923514743}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Debug-NET10|Any CPU.ActiveCfg = Debug-NET10|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Debug-NET10|Any CPU.Build.0 = Debug-NET10|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Debug-NET8|Any CPU.ActiveCfg = Debug-NET8|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Debug-NET8|Any CPU.Build.0 = Debug-NET8|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Release|Any CPU.Build.0 = Release|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Release-NET10|Any CPU.ActiveCfg = Release-NET10|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Release-NET10|Any CPU.Build.0 = Release-NET10|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Release-NET8|Any CPU.ActiveCfg = Release-NET8|Any CPU + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225}.Release-NET8|Any CPU.Build.0 = Release-NET8|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -510,6 +524,7 @@ Global {45000ADE-F647-4171-A91A-428CDF682603} = {2302847B-292A-4650-A852-BDED40E1BB1C} {2CC55F3E-8EA5-4305-8716-D5B944120F82} = {5726BBD8-14F9-4909-B765-3E7709223B61} {A68C90C1-AD82-40FD-A18D-F04923514743} = {8AAB1719-253A-47D2-970F-1911CFEE84B7} + {C78BE7F5-2B6F-D34B-A2D9-EFA97EEF9225} = {8AAB1719-253A-47D2-970F-1911CFEE84B7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F995719A-8D35-49A3-B271-42898A587F57} diff --git a/Orm/Xtensive.Orm.Tests.FSharp/ArithmeticOperationsCompilersTest.fs b/Orm/Xtensive.Orm.Tests.FSharp/ArithmeticOperationsCompilersTest.fs new file mode 100644 index 000000000..cc7f122e7 --- /dev/null +++ b/Orm/Xtensive.Orm.Tests.FSharp/ArithmeticOperationsCompilersTest.fs @@ -0,0 +1,190 @@ +module ArithmeticOperationsCompilersTest + +open FsUnit +open NUnit.Framework +open Xtensive.Orm +open Xtensive.Orm.Tests +open Model +open Microsoft.FSharp.Linq + +[] +type Fixture() = + inherit AutoBuildTest() + + override this.BuildConfiguration() = + let config = base.BuildConfiguration () + config.Types.Register typeof + config + + [] + member this.AdditionStringTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (StringField = "John") |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.StringField + x.StringField) = "JohnJohn" then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.StringField, Is.EqualTo("John")) + + [] + member this.AdditionDateTimeTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(System.DateTime.Now.Year, 2, 15)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField + System.TimeSpan.FromDays(2)) > new System.DateTime(System.DateTime.Now.Year, 2, 15) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(System.DateTime.Now.Year, 2, 15))) + + [] + member this.AdditionTimeSpanTest() = + Require.ProviderIsNot (StorageProvider.PostgreSql) + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (TimeSpanField = System.TimeSpan.FromTicks(111222333)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.TimeSpanField + System.TimeSpan.FromDays(2)) > System.TimeSpan.FromTicks(111222333) + System.TimeSpan.FromDays(1) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.TimeSpanField, Is.EqualTo(System.TimeSpan.FromTicks(111222333))) + + [] + member this.AdditionDecimalTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DecimalField = decimal 16.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DecimalField + x.DecimalField <= decimal 35 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DecimalField, Is.EqualTo(decimal 16)) + + [] + member this.SubtractionDateTimeTest1() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(System.DateTime.Now.Year, 2, 15)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField - System.TimeSpan.FromDays(2)) > new System.DateTime(System.DateTime.Now.Year, 2, 10) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(System.DateTime.Now.Year, 2, 15))) + + [] + member this.SubtractionDateTimeTest2() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(System.DateTime.Now.Year, 2, 15)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField - new System.DateTime(System.DateTime.Now.Year, 2, 10)) > System.TimeSpan.FromDays(2) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(System.DateTime.Now.Year, 2, 15))) + + [] + member this.SubtractionTimeSpanTest() = + Require.ProviderIsNot (StorageProvider.PostgreSql) + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (TimeSpanField = System.TimeSpan.FromTicks(111222333)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.TimeSpanField - System.TimeSpan.FromTicks(111222)) > System.TimeSpan.FromTicks(111222) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.TimeSpanField, Is.EqualTo(System.TimeSpan.FromTicks(111222333))) + + [] + member this.SubtractionDecimalTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DecimalField = decimal 16.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DecimalField - x.DecimalField + decimal 3 <= decimal 5 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DecimalField, Is.EqualTo(decimal 16)) + + [] + member this.MultiplyDecimalTest() = + Require.ProviderIsNot StorageProvider.Firebird + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DecimalField = decimal 16.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DecimalField * x.DecimalField <= decimal 350 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DecimalField, Is.EqualTo(decimal 16)) + + [] + member this.DivideDecimalTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DecimalField = decimal 16.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DecimalField / decimal 2 <= decimal 16 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DecimalField, Is.EqualTo(decimal 16)) diff --git a/Orm/Xtensive.Orm.Tests.FSharp/ComparisonCompilersTest.fs b/Orm/Xtensive.Orm.Tests.FSharp/ComparisonCompilersTest.fs new file mode 100644 index 000000000..f864d972a --- /dev/null +++ b/Orm/Xtensive.Orm.Tests.FSharp/ComparisonCompilersTest.fs @@ -0,0 +1,1094 @@ +module ComparisonCompilersTest + +open FsUnit +open NUnit.Framework +open Xtensive.Orm +open Xtensive.Orm.Tests +open Model +open Microsoft.FSharp.Linq + +[] +type Fixture() = + inherit AutoBuildTest() + + override this.BuildConfiguration() = + let config = base.BuildConfiguration () + config.Types.Register typeof + config + + [] + member this.EqualityStringTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (StringField = "John") |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.StringField = "John" then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.StringField, Is.EqualTo("John")) + + [] + member this.EqualityBooleanTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (BoolField = true) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.BoolField = true then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.BoolField, Is.True) + + [] + member this.EqualityInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int16Field = 16s) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int16Field = 16s then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int16Field, Is.EqualTo(16s)) + + [] + member this.EqualityUInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X ( UInt16Field = 16us) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt16Field = 16us then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt16Field, Is.EqualTo(16us)) + + [] + member this.EqualityInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int32Field = 32) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int32Field = 32 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int32Field, Is.EqualTo(32)) + + [] + member this.EqualityUInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt32Field = 32u) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt32Field = 32u then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt32Field, Is.EqualTo(32u)) + + [] + member this.EqualityInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int64Field = 64L) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int64Field = 64L then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int64Field, Is.EqualTo(64L)) + + [] + member this.EqualityUInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt64Field = 64UL) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt64Field = 64UL then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt64Field, Is.EqualTo(64UL)) + + [] + member this.EqualitySingleTest() = + Require.ProviderIsNot (StorageProvider.Sqlite ||| StorageProvider.Firebird ||| StorageProvider.MySql) + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (SingleField = 1.14F) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.SingleField = 1.14F then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.SingleField, Is.EqualTo(1.14F)) + + [] + member this.EqualityDoubleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DoubleField = 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DoubleField = 64.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DoubleField, Is.EqualTo(64.0)) + + [] + member this.EqualityDecimalTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DecimalField = decimal 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DecimalField = decimal 64.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DecimalField, Is.EqualTo(decimal 64.0)) + + + [] + member this.InequalityStringTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (StringField = "Not John") |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.StringField <> "John" then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.StringField, Is.EqualTo("Not John")) + + [] + member this.InequalityDateTimeTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = System.DateTime.Now.Date.AddDays(-1)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DateTimeField <> System.DateTime.Now then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(System.DateTime.Now.Date.AddDays(-1))) + + [] + member this.InequalityBooleanTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (BoolField = true) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.BoolField <> false then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.BoolField, Is.True) + + [] + member this.InequalityInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int16Field = 16s) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int16Field <> 15s then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int16Field, Is.EqualTo(16s)) + + [] + member this.InequalityUInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X ( UInt16Field = 16us) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt16Field <> 15us then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt16Field, Is.EqualTo(16us)) + + [] + member this.InequalityInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int32Field = 32) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int32Field <> 31 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int32Field, Is.EqualTo(32)) + + [] + member this.InequalityUInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt32Field = 32u) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt32Field <> 31u then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt32Field, Is.EqualTo(32u)) + + [] + member this.InequalityInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int64Field = 64L) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int64Field <> 63L then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int64Field, Is.EqualTo(64L)) + + [] + member this.InequalityUInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt64Field = 64UL) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt64Field <> 63UL then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt64Field, Is.EqualTo(64UL)) + + [] + member this.InequalitySingleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (SingleField = 1.14F) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.SingleField <> 1.18F then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.SingleField, Is.EqualTo(1.14F)) + + [] + member this.InequalityDoubleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DoubleField = 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DoubleField <> 63.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DoubleField, Is.EqualTo(64.0)) + + [] + member this.InequalityDecimalTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DecimalField = decimal 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DecimalField <> decimal 63.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DecimalField, Is.EqualTo(decimal 64.0)) + + + [] + member this.GreaterThanDateTimeTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = System.DateTime.Now.Date.AddDays(-1)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DateTimeField > System.DateTime.Now.Date.AddDays(-2) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(System.DateTime.Now.Date.AddDays(-1))) + + [] + member this.GreaterThanInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int16Field = 16s) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int16Field > 15s then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int16Field, Is.EqualTo(16s)) + + [] + member this.GreaterThanUInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X ( UInt16Field = 16us) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt16Field > 15us then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt16Field, Is.EqualTo(16us)) + + [] + member this.GreaterThanInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int32Field = 32) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int32Field > 31 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int32Field, Is.EqualTo(32)) + + [] + member this.GreaterThanUInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt32Field = 32u) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt32Field > 31u then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt32Field, Is.EqualTo(32u)) + + [] + member this.GreaterThanInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int64Field = 64L) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int64Field > 63L then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int64Field, Is.EqualTo(64L)) + + [] + member this.GreaterThanUInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt64Field = 64UL) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt64Field > 63UL then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt64Field, Is.EqualTo(64UL)) + + [] + member this.GreaterThanSingleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (SingleField = 1.14F) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.SingleField > 1.11F then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.SingleField, Is.EqualTo(1.14F)) + + [] + member this.GreaterThanDoubleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DoubleField = 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DoubleField > 63.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DoubleField, Is.EqualTo(64.0)) + + [] + member this.GreaterThanDecimalTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DecimalField = decimal 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DecimalField > decimal 63.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DecimalField, Is.EqualTo(decimal 64.0)) + + + [] + member this.GreaterThanOrEqualDateTimeTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = System.DateTime.Now.Date.AddDays(-1)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DateTimeField >= System.DateTime.Now.Date.AddDays(-1) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(System.DateTime.Now.Date.AddDays(-1))) + + [] + member this.GreaterThanOrEqualInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int16Field = 16s) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int16Field >= 16s then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int16Field, Is.EqualTo(16s)) + + [] + member this.GreaterThanOrEqualUInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X ( UInt16Field = 16us) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt16Field >= 16us then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt16Field, Is.EqualTo(16us)) + + [] + member this.GreaterThanOrEqualInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int32Field = 32) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int32Field >= 32 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int32Field, Is.EqualTo(32)) + + [] + member this.GreaterThanOrEqualUInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt32Field = 32u) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt32Field >= 32u then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt32Field, Is.EqualTo(32u)) + + [] + member this.GreaterThanOrEqualInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int64Field = 64L) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int64Field >= 64L then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int64Field, Is.EqualTo(64L)) + + [] + member this.GreaterThanOrEqualUInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt64Field = 64UL) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt64Field >= 64UL then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt64Field, Is.EqualTo(64UL)) + + [] + member this.GreaterThanOrEqualSingleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (SingleField = 1.14F) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.SingleField >= 1.11F then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.SingleField, Is.EqualTo(1.14F)) + + [] + member this.GreaterThanOrEqualDoubleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DoubleField = 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DoubleField >= 64.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DoubleField, Is.EqualTo(64.0)) + + [] + member this.GreaterThanOrEqualDecimalTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DecimalField = decimal 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DecimalField >= decimal 64.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DecimalField, Is.EqualTo(decimal 64.0)) + + + [] + member this.LessThanDateTimeTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = System.DateTime.Now.Date.AddDays(-1)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DateTimeField < System.DateTime.Now.Date.AddDays(1) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(System.DateTime.Now.Date.AddDays(-1))) + + [] + member this.LessThanInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int16Field = 16s) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int16Field < 17s then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int16Field, Is.EqualTo(16s)) + + [] + member this.LessThanUInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X ( UInt16Field = 16us) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt16Field < 17us then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt16Field, Is.EqualTo(16us)) + + [] + member this.LessThanInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int32Field = 32) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int32Field < 33 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int32Field, Is.EqualTo(32)) + + [] + member this.LessThanUInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt32Field = 32u) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt32Field < 33u then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt32Field, Is.EqualTo(32u)) + + [] + member this.LessThanInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int64Field = 64L) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int64Field < 65L then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int64Field, Is.EqualTo(64L)) + + [] + member this.LessThanUInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt64Field = 64UL) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt64Field < 65UL then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt64Field, Is.EqualTo(64UL)) + + [] + member this.LessThanSingleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (SingleField = 1.14F) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.SingleField < 1.18F then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.SingleField, Is.EqualTo(1.14F)) + + [] + member this.LessThanDoubleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DoubleField = 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DoubleField < 65.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DoubleField, Is.EqualTo(64.0)) + + [] + member this.LessThanDecimalTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DecimalField = decimal 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DecimalField < decimal 65.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DecimalField, Is.EqualTo(decimal 64.0)) + + + [] + member this.LessThanOrDateTimeTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = System.DateTime.Now.Date.AddDays(-1)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DateTimeField <= System.DateTime.Now.Date.AddDays(1) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(System.DateTime.Now.Date.AddDays(-1))) + + [] + member this.LessThanOrEqualInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int16Field = 16s) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int16Field <= 16s then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int16Field, Is.EqualTo(16s)) + + [] + member this.LessThanOrEqualUInt16Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X ( UInt16Field = 16us) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt16Field <= 16us then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt16Field, Is.EqualTo(16us)) + + [] + member this.LessThanOrEqualInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int32Field = 32) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int32Field <= 32 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int32Field, Is.EqualTo(32)) + + [] + member this.LessThanOrEqualUInt32Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt32Field = 32u) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt32Field <= 32u then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt32Field, Is.EqualTo(32u)) + + [] + member this.LessThanOrEqualInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int64Field = 64L) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.Int64Field <= 64L then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int64Field, Is.EqualTo(64L)) + + [] + member this.LessThanOrEqualUInt64Test() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (UInt64Field = 64UL) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.UInt64Field <= 64UL then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.UInt64Field, Is.EqualTo(64UL)) + + [] + member this.LessThanOrEqualSingleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (SingleField = 1.14F) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.SingleField <= 1.18F then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.SingleField, Is.EqualTo(1.14F)) + + [] + member this.LessThanOrEqualDoubleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DoubleField = 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DoubleField <= 64.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DoubleField, Is.EqualTo(64.0)) + + [] + member this.LessThanOrEqualDecimalTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DecimalField = decimal 64.0) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if x.DecimalField <= decimal 64.0 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DecimalField, Is.EqualTo(decimal 64.0)) diff --git a/Orm/Xtensive.Orm.Tests.FSharp/DateTimeCompilersTest.fs b/Orm/Xtensive.Orm.Tests.FSharp/DateTimeCompilersTest.fs new file mode 100644 index 000000000..858cda0ec --- /dev/null +++ b/Orm/Xtensive.Orm.Tests.FSharp/DateTimeCompilersTest.fs @@ -0,0 +1,153 @@ +module DateTimeCompilersTest + +open FsUnit +open NUnit.Framework +open Xtensive.Orm +open Xtensive.Orm.Tests +open Model +open Microsoft.FSharp.Linq + +[] +type Fixture() = + inherit AutoBuildTest() + + override this.BuildConfiguration() = + let config = base.BuildConfiguration () + config.Types.Register typeof + config + + [] + member this.EqualityTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(2025, 10, 9)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField = new System.DateTime(2025, 10, 9)) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(2025, 10, 9))) + + [] + member this.InequalityTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(2025, 10, 9)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField <> new System.DateTime(2025, 10, 8)) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(2025, 10, 9))) + + [] + member this.YearExtractorTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(2025, 10, 9)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField.Year = 2025) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(2025, 10, 9))) + + [] + member this.MonthExtractorTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(2025, 10, 9)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField.Month = 10) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(2025, 10, 9))) + + [] + member this.DayExtractorTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(2025, 10, 9)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField.Day = 9) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(2025, 10, 9))) + + [] + member this.AddYearTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(2025, 10, 9)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField.AddYears(2) = new System.DateTime(2027, 10, 9)) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(2025, 10, 9))) + + [] + member this.AddMonthTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(2025, 10, 9)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField.AddMonths(1) = new System.DateTime(2025, 11, 9)) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(2025, 10, 9))) + + [] + member this.AddDayTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DateTimeField = new System.DateTime(2025, 10, 9)) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (x.DateTimeField.AddDays(3) = new System.DateTime(2025, 10, 12)) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DateTimeField, Is.EqualTo(new System.DateTime(2025, 10, 9))) \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.FSharp/FsUnit.fs b/Orm/Xtensive.Orm.Tests.FSharp/FsUnit.fs index 3fb436fa6..57a73aa53 100644 --- a/Orm/Xtensive.Orm.Tests.FSharp/FsUnit.fs +++ b/Orm/Xtensive.Orm.Tests.FSharp/FsUnit.fs @@ -12,7 +12,7 @@ let should (f : 'a -> #Constraint) x (y : obj) = let equal x = new EqualConstraint(x) -let not x = new NotConstraint(x) +let notc x = new NotConstraint(x) let contain x = new ContainsConstraint(x) diff --git a/Orm/Xtensive.Orm.Tests.FSharp/MathCompilersTest.fs b/Orm/Xtensive.Orm.Tests.FSharp/MathCompilersTest.fs new file mode 100644 index 000000000..a4dd7c9e7 --- /dev/null +++ b/Orm/Xtensive.Orm.Tests.FSharp/MathCompilersTest.fs @@ -0,0 +1,89 @@ +module MathCompilersTest + +open FsUnit +open NUnit.Framework +open Xtensive.Orm +open Xtensive.Orm.Tests +open Model +open Microsoft.FSharp.Linq + +[] +type Fixture() = + inherit AutoBuildTest() + + override this.BuildConfiguration() = + let config = base.BuildConfiguration () + config.Types.Register typeof + config + + [] + member this.MinIntegersTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int16Field = -5s, Int32Field = -6, Int64Field = -7L) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if ((min x.Int16Field -7s) = -7s) && ((min x.Int32Field -7) = -7) && ((min x.Int64Field -8L) = -8L) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int16Field, Is.EqualTo(-5s)) + Assert.That(fetched.Int32Field, Is.EqualTo(-6)) + Assert.That(fetched.Int64Field, Is.EqualTo(-7L)) + + [] + member this.MinDoubleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DoubleField = -6.00) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (min x.DoubleField -7.00) = -7.00 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DoubleField, Is.EqualTo(-6.00)) + + [] + member this.MaxIntegersTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (Int16Field = -5s, Int32Field = -6, Int64Field = -7L) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if ((max x.Int16Field -7s) = -5s) && ((max x.Int32Field -7) = -6) && ((max x.Int64Field -8L) = -7L) then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Int16Field, Is.EqualTo(-5s)) + Assert.That(fetched.Int32Field, Is.EqualTo(-6)) + Assert.That(fetched.Int64Field, Is.EqualTo(-7L)) + + [] + member this.MaxDoubleTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (DoubleField = -6.00) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if (max x.DoubleField -7.00) = -6.00 then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.DoubleField, Is.EqualTo(-6.00)) \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.FSharp/Model.fs b/Orm/Xtensive.Orm.Tests.FSharp/Model.fs index 2d9aac969..8bae4192b 100644 --- a/Orm/Xtensive.Orm.Tests.FSharp/Model.fs +++ b/Orm/Xtensive.Orm.Tests.FSharp/Model.fs @@ -1,4 +1,4 @@ -module Model +module Model open Xtensive.Orm [] @@ -7,10 +7,90 @@ type Person() = [] member this.Id - with get() = this.GetFieldValue "Id" - and private set(v: int) = this.SetFieldValue ("Id", v) + with get() = this.GetFieldValue (nameof this.Id) + and private set(v: int) = this.SetFieldValue (nameof this.Id, v) [] member this.Name - with get() = this.GetFieldValue "Name" - and set(v: string) = this.SetFieldValue ("Name", v) + with get() = this.GetFieldValue (nameof this.Name) + and set(v: string) = this.SetFieldValue (nameof this.Name, v) + + [] + member this.CreateOn + with get() = this.GetFieldValue (nameof this.CreateOn) + and set(v: System.DateTime) = this.SetFieldValue (nameof this.CreateOn, v) + + +[] +type X() = + inherit Entity() + + [] + member this.Id + with get() = this.GetFieldValue (nameof this.Id) + and private set(v: int) = this.SetFieldValue (nameof this.Id, v) + + [] + member this.BoolField + with get() = this.GetFieldValue (nameof this.BoolField) + and set(v: bool) = this.SetFieldValue (nameof (this.BoolField), v) + + [] + member this.Int16Field + with get() = this.GetFieldValue (nameof this.Int16Field) + and set(v: int16) = this.SetFieldValue (nameof (this.Int16Field), v) + + [] + member this.UInt16Field + with get() = this.GetFieldValue (nameof this.UInt16Field) + and set(v: uint16) = this.SetFieldValue (nameof (this.UInt16Field), v) + + [] + member this.Int32Field + with get() = this.GetFieldValue (nameof this.Int32Field) + and set(v: int32) = this.SetFieldValue (nameof (this.Int32Field), v) + + [] + member this.UInt32Field + with get() = this.GetFieldValue (nameof this.UInt32Field) + and set(v: uint32) = this.SetFieldValue (nameof (this.UInt32Field), v) + + [] + member this.Int64Field + with get() = this.GetFieldValue (nameof this.Int64Field) + and set(v: int64) = this.SetFieldValue (nameof (this.Int64Field), v) + + [] + member this.UInt64Field + with get() = this.GetFieldValue (nameof this.UInt64Field) + and set(v: uint64) = this.SetFieldValue (nameof (this.UInt64Field), v) + + [] + member this.SingleField + with get() = this.GetFieldValue (nameof this.SingleField) + and set(v: single) = this.SetFieldValue (nameof (this.SingleField), v) + + [] + member this.DoubleField + with get() = this.GetFieldValue (nameof this.DoubleField) + and set(v: double) = this.SetFieldValue (nameof (this.DoubleField), v) + + [] + member this.DecimalField + with get() = this.GetFieldValue (nameof this.DecimalField) + and set(v: decimal) = this.SetFieldValue (nameof (this.DecimalField), v) + + [] + member this.StringField + with get() = this.GetFieldValue (nameof this.StringField) + and set(v: string) = this.SetFieldValue (nameof (this.StringField), v) + + [] + member this.DateTimeField + with get() = this.GetFieldValue (nameof this.DateTimeField) + and set(v: System.DateTime) = this.SetFieldValue (nameof this.DateTimeField, v) + + [] + member this.TimeSpanField + with get() = this.GetFieldValue (nameof this.TimeSpanField) + and set(v: System.TimeSpan) = this.SetFieldValue (nameof this.TimeSpanField, v) \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.FSharp/OtherOperationsCompilersTest.fs b/Orm/Xtensive.Orm.Tests.FSharp/OtherOperationsCompilersTest.fs new file mode 100644 index 000000000..66cff7a47 --- /dev/null +++ b/Orm/Xtensive.Orm.Tests.FSharp/OtherOperationsCompilersTest.fs @@ -0,0 +1,34 @@ +module OtherOperationsCompilersTest + +open FsUnit +open NUnit.Framework +open Xtensive.Orm +open Xtensive.Orm.Tests +open Model +open Microsoft.FSharp.Linq + +[] +type Fixture() = + inherit AutoBuildTest() + + override this.BuildConfiguration() = + let config = base.BuildConfiguration () + config.Types.Register typeof + config + + [] + member this.IsNullTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + X (BoolField = false) |> ignore + let alll = session.Query.All () + let query = + query { + for x in alll do + if isNull x.StringField then + yield x + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.BoolField, Is.False) \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.FSharp/Test.fs b/Orm/Xtensive.Orm.Tests.FSharp/QueryEntityBackTest.fs similarity index 91% rename from Orm/Xtensive.Orm.Tests.FSharp/Test.fs rename to Orm/Xtensive.Orm.Tests.FSharp/QueryEntityBackTest.fs index 11fd4d8a2..8890855f6 100644 --- a/Orm/Xtensive.Orm.Tests.FSharp/Test.fs +++ b/Orm/Xtensive.Orm.Tests.FSharp/QueryEntityBackTest.fs @@ -1,4 +1,4 @@ -module Test +module QueryEntityBackTest open FsUnit open NUnit.Framework @@ -32,5 +32,4 @@ type Fixture() = let list = query |> Seq.toArray Assert.That(list.Length, Is.EqualTo(1)) let fetched = list.[0] - Assert.That(fetched.Name, Is.EqualTo("John")) - + Assert.That(fetched.Name, Is.EqualTo("John")) \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.FSharp/StringCompilersTest.fs b/Orm/Xtensive.Orm.Tests.FSharp/StringCompilersTest.fs new file mode 100644 index 000000000..b5694a8a8 --- /dev/null +++ b/Orm/Xtensive.Orm.Tests.FSharp/StringCompilersTest.fs @@ -0,0 +1,520 @@ +module StringCompilersTest + +open FsUnit +open NUnit.Framework +open Xtensive.Orm +open Xtensive.Orm.Tests +open Model +open Microsoft.FSharp.Linq + +[] +type Fixture() = + inherit AutoBuildTest() + + override this.BuildConfiguration() = + let config = base.BuildConfiguration () + config.Types.Register typeof + config + + [] + member this.EqualityTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "John") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name = "John" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("John")) + + [] + member this.InequalityTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "Not John") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name <> "John" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("Not John")) + + [] + member this.StartsWithTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "Not John") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.StartsWith("Not") then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("Not John")) + + [] + member this.EndsWithTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "Not John") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.EndsWith("John") then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("Not John")) + + [] + member this.ContainsStrTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "Not John") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Contains("oh") then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("Not John")) + + [] + member this.ContainsCharTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "Not John") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Contains('o') then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("Not John")) + + [] + member this.SubstringTest1() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "Not John") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Substring(1) = "ot John" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("Not John")) + + [] + member this.SubstringTest2() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "Not John") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Substring(1, 4) = "ot J" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("Not John")) + + [] + member this.ToUpperTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "Not John") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.ToUpper() = "NOT JOHN" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("Not John")) + + [] + member this.ToLowerTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "Not John") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.ToLower() = "not john" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("Not John")) + + [] + member this.TrimTest() = + Require.ProviderIsNot(StorageProvider.Firebird) + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = " John ") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Trim() = "John" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo(" John ")) + + [] + member this.TrimStartTest() = + Require.ProviderIsNot(StorageProvider.Firebird) + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = " John ") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.TrimStart() = "John " then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo(" John ")) + + [] + member this.TrimEndTest() = + Require.ProviderIsNot(StorageProvider.Firebird) + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = " John ") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.TrimEnd() = " John" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo(" John ")) + + [] + member this.TrimCharsTest() = + Require.ProviderIsNot(StorageProvider.SqlServer ||| StorageProvider.Firebird) + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Trim('!', '?') = "John" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.TrimStartCharsTest() = + Require.ProviderIsNot(StorageProvider.SqlServer ||| StorageProvider.Firebird) + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.TrimStart('!', '?') = "John!?" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.TrimEndCharsTest() = + Require.ProviderIsNot(StorageProvider.SqlServer ||| StorageProvider.Firebird) + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.TrimEnd('!', '?') = "!?John" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.ReplaceCharTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Replace('o', 'b') = "!?Jbhn!?" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.ReplaceStrTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Replace("?J", "!J") = "!!John!?" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.RemoveTest1() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Remove(0, 2) = "John!?" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.RemoveTest2() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Remove(6) = "!?John" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.PadLeftTest1() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.PadLeft(10) = " !?John!?" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.PadLeftTest2() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.PadLeft(10, '_') = "__!?John!?" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.PadRightTest1() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.PadRight(10) = "!?John!? " then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.PadRightTest2() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.PadRight(10, '_') = "!?John!?__" then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.IndexOfTest1() = + Require.ProviderIsNot StorageProvider.Sqlite + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.IndexOf("!?") = 0 then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.IndexOfTest2() = + Require.ProviderIsNot StorageProvider.Sqlite + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.IndexOf("!?", 3) = 6 then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.IndexOfTest3() = + Require.ProviderIsNot StorageProvider.Sqlite + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.IndexOf('?') = 1 then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.IndexOfTest4() = + Require.ProviderIsNot StorageProvider.Sqlite + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.IndexOf('?', 3) = 7 then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) + + [] + member this.LengthTest() = + use session = base.Domain.OpenSession () + use ts = session.OpenTransaction () + Person (Name = "!?John!?") |> ignore + let persons = session.Query.All () + let query = + query { + for p in persons do + if p.Name.Length = 8 then + yield p + } + let list = query |> Seq.toArray + Assert.That(list.Length, Is.EqualTo(1)) + let fetched = list.[0] + Assert.That(fetched.Name, Is.EqualTo("!?John!?")) \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.FSharp/Xtensive.Orm.Tests.FSharp.fsproj b/Orm/Xtensive.Orm.Tests.FSharp/Xtensive.Orm.Tests.FSharp.fsproj index 7e37f6659..1f7ec6614 100644 --- a/Orm/Xtensive.Orm.Tests.FSharp/Xtensive.Orm.Tests.FSharp.fsproj +++ b/Orm/Xtensive.Orm.Tests.FSharp/Xtensive.Orm.Tests.FSharp.fsproj @@ -6,12 +6,17 @@ Debug;Release;Debug-NET8;Release-NET8;Debug-NET10;Release-NET10 - 4.7 true $(OrmKeyFile) true 2 + + 8.0 + + + 10.0 + @@ -25,10 +30,19 @@ - + + + + + + + - - + + + + + \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.VB/Linq/ConversionTest.vb b/Orm/Xtensive.Orm.Tests.VB/Linq/ConversionTest.vb index 48a199f12..6b0d41db6 100644 --- a/Orm/Xtensive.Orm.Tests.VB/Linq/ConversionTest.vb +++ b/Orm/Xtensive.Orm.Tests.VB/Linq/ConversionTest.vb @@ -1,258 +1,259 @@ -Option Strict On +Option Strict On Imports Xtensive.Orm.Tests.ObjectModel -Imports Xtensive.Orm.Tests.ObjectModel.NorthwindDO +Imports Xtensive.Orm.Tests.ObjectModel.ChinookDO Imports NUnit.Framework Namespace Linq - - Public Class ConversionTest - Inherits NorthwindDOModelTest - Public Shadows ReadOnly Property Customers As IOrderedQueryable(Of Customer) - Get - Return Query.All(Of Customer)().OrderBy(Function(c) c.Id) - End Get - End Property - - - Public Sub StringToBooleanTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(customer.Id) _ + + + Public Class ConversionTest + Inherits ChinookDOModelTest + Public Shadows ReadOnly Property Customers As IOrderedQueryable(Of Customer) + Get + Return Query.All(Of Customer)().OrderBy(Function(c) c.CustomerId) + End Get + End Property + + + Public Sub StringToBooleanTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(customer.CustomerId) Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(customer.Id) _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(customer.CustomerId) + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToByteTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToByte(customer.Id) > 1 _ + + Public Sub StringToByteTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToByte(customer.CustomerId) > 1 Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToByte(customer.Id) > 1 _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToByte(customer.CustomerId) > 1 + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToCharTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToChar(customer.Id) <> "a"c _ + + Public Sub StringToCharTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToChar(customer.CustomerId) <> "a"c Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToChar(customer.Id) <> "a"c _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToChar(customer.CustomerId) <> "a"c + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToDateTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(customer.Id) < DateTime.Now _ + + Public Sub StringToDateTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(customer.CustomerId) < DateTime.Now Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(customer.Id) < DateTime.Now _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(customer.CustomerId) < DateTime.Now + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToDecimalTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(customer.Id) > 1 _ + + Public Sub StringToDecimalTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(customer.CustomerId) > 1 Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(customer.Id) > 1 _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(customer.CustomerId) > 1 + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub BooleanToDecimalTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(customer.Id <> "test") > 1 _ + + Public Sub BooleanToDecimalTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(customer.CustomerId <> 0) > 1 Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(customer.Id <> "test") > 1 _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDecimal(customer.CustomerId <> 0) > 1 + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToDoubleTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(customer.Id) > 1 _ + + Public Sub StringToDoubleTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(customer.CustomerId) > 1 Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(customer.Id) > 1 _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(customer.CustomerId) > 1 + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToIntegerTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(customer.Id) > 1 _ + + Public Sub StringToIntegerTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(customer.CustomerId) > 1 Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(customer.Id) > 1 _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(customer.CustomerId) > 1 + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToLongTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToLong(customer.Id) > 1L _ + + Public Sub StringToLongTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToLong(customer.CustomerId) > 1L Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToLong(customer.Id) > 1L _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToLong(customer.CustomerId) > 1L + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToSByteTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToSByte(customer.Id) > 1 _ + + Public Sub StringToSByteTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToSByte(customer.CustomerId) > 1 Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToSByte(customer.Id) > 1 _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToSByte(customer.CustomerId) > 1 + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToShortTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToShort(customer.Id) > 1S _ + + Public Sub StringToShortTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToShort(customer.CustomerId) > 1S Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToShort(customer.Id) > 1S _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToShort(customer.CustomerId) > 1S + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToSingleTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToSingle(customer.Id) > 1S _ + + Public Sub StringToSingleTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToSingle(customer.CustomerId) > 1S Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToSingle(customer.Id) > 1S _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToSingle(customer.CustomerId) > 1S + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToUIntegerTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToUInteger(customer.Id) > 1 _ + + Public Sub StringToUIntegerTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToUInteger(customer.CustomerId) > 1 Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToUInteger(customer.Id) > 1 _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToUInteger(customer.CustomerId) > 1 + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToULongTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToULong(customer.Id) > 1 _ + + Public Sub StringToULongTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToULong(customer.CustomerId) > 1 Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToULong(customer.Id) > 1 _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToULong(customer.CustomerId) > 1 + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub StringToUShortTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToUShort(customer.Id) > 1 _ + + Public Sub StringToUShortTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToUShort(customer.CustomerId) > 1 Select customer) _ .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToUShort(customer.Id) > 1 _ - Select customer) _ + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToUShort(customer.CustomerId) > 1 + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub - - - Public Sub ToStringTest() - ToStringGenericTest(Of Boolean)(True) - ToStringGenericTest(Of Byte)(1) - ToStringGenericTest(Of Char)("a"c) - ToStringGenericTest(Of Date)(Date.Now) - ToStringGenericTest(Of Decimal)(1) - ToStringGenericTest(Of Double)(1) - ToStringGenericTest(Of Short)(1) - ToStringGenericTest(Of Integer)(1) - ToStringGenericTest(Of Long)(1) - ToStringGenericTest(Of Single)(1) - ToStringGenericTest(Of UInt32)(1) - ToStringGenericTest(Of UInt64)(1) - End Sub - - Public Sub ToStringGenericTest(Of TType)(ByVal ParamArray parameter() As TType) - Dim store = Query.Store(Of TType)(parameter) - Dim result = (From customer In store _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToString(customer) <> "test" _ + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub + + + Public Sub ToStringTest() + ToStringGenericTest(Of Boolean)(True) + ToStringGenericTest(Of Byte)(1) + ToStringGenericTest(Of Char)("a"c) + ToStringGenericTest(Of Date)(Date.Now) + ToStringGenericTest(Of Decimal)(1) + ToStringGenericTest(Of Double)(1) + ToStringGenericTest(Of Short)(1) + ToStringGenericTest(Of Integer)(1) + ToStringGenericTest(Of Long)(1) + ToStringGenericTest(Of Single)(1) + ToStringGenericTest(Of UInt32)(1) + ToStringGenericTest(Of UInt64)(1) + End Sub + + Public Sub ToStringGenericTest(Of TType)(ByVal ParamArray parameter() As TType) + Dim store = Session.Query.Store(Of TType)(parameter) + Dim result = (From customer In store + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToString(customer) <> "test" Select customer) _ .ToList() - Dim expected = (From customer In store.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Conversions.ToString(parameter) <> "test" _ - Select customer) _ + Dim expected = (From customer In store.ToList() + Where Microsoft.VisualBasic.CompilerServices.Conversions.ToString(parameter) <> "test" + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub - End Class + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub + End Class End Namespace \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.VB/Linq/DateTimeTest.vb b/Orm/Xtensive.Orm.Tests.VB/Linq/DateTimeTest.vb index 7a98bb28c..ea7aeefee 100644 --- a/Orm/Xtensive.Orm.Tests.VB/Linq/DateTimeTest.vb +++ b/Orm/Xtensive.Orm.Tests.VB/Linq/DateTimeTest.vb @@ -1,164 +1,148 @@ -Imports NUnit.Framework -Imports Xtensive.Orm.Tests.ObjectModel.NorthwindDO +Imports NUnit.Framework +Imports Xtensive.Orm.Tests.ObjectModel.ChinookDO Imports Xtensive.Orm.Tests.ObjectModel Namespace Linq - Public Class DateTimeTest - Inherits NorthwindDOModelTest + Public Class DateTimeTest + Inherits ChinookDOModelTest - Public Shadows ReadOnly Property Orders As IOrderedQueryable(Of Order) - Get - Return Query.All(Of Order)().OrderBy(Function(c) c.Id) - End Get - End Property + Public Shadows ReadOnly Property Invoices As IOrderedQueryable(Of Invoice) + Get + Return Query.All(Of Invoice)().OrderBy(Function(c) c.InvoiceId) + End Get + End Property - - - Public Sub DatePartNotSupported1Test() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.DatePart("Day", order.OrderDate) > 0 _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.DatePart("Day", order.OrderDate) > 0 _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub DatePartNotSupported1Test() + Assert.Throws(Of QueryTranslationException)(Function() (From invoice In Invoices + Where Microsoft.VisualBasic.DateAndTime.DatePart("Day", invoice.InvoiceDate) > 0 + Select invoice) _ + .ToList()) + End Sub - - - Public Sub DatePartNotSupported2Test() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.DatePart(DateInterval.Day, order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.DatePart(DateInterval.Day, order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub DatePartNotSupported2Test() + Assert.Throws(Of QueryTranslationException)(Function() (From invoice In Invoices + Where Microsoft.VisualBasic.DateAndTime.DatePart(DateInterval.Day, invoice.InvoiceDate) > 0 + Select invoice) _ + .ToList()) + End Sub - - Public Sub NowTest() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.Now > order.OrderDate.Value _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.Now > order.OrderDate.Value _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub NowTest() + Dim result = (From invoice In Invoices + Where Microsoft.VisualBasic.DateAndTime.Now > invoice.InvoiceDate + Select invoice) _ + .ToList() + Dim expected = (From invoice In Invoices.ToList + Where Microsoft.VisualBasic.DateAndTime.Now > invoice.InvoiceDate + Select invoice) _ + .ToList() + Assert.That(expected.Count, [Is].GreaterThan(0)) + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub YearTest() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.Year(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.Year(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub YearTest() + Dim result = (From invoice In Invoices + Where Microsoft.VisualBasic.DateAndTime.Year(invoice.InvoiceDate) > 0 + Select invoice) _ + .ToList() + Dim expected = (From invoice In Invoices.ToList + Where Microsoft.VisualBasic.DateAndTime.Year(invoice.InvoiceDate) > 0 + Select invoice) _ + .ToList() + Assert.That(expected.Count, [Is].GreaterThan(0)) + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub MonthTest() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.Month(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.Month(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub MonthTest() + Dim result = (From invoice In Invoices + Where Microsoft.VisualBasic.DateAndTime.Month(invoice.InvoiceDate) > 0 + Select invoice) _ + .ToList() + Dim expected = (From invoice In Invoices.ToList + Where Microsoft.VisualBasic.DateAndTime.Month(invoice.InvoiceDate) > 0 + Select invoice) _ + .ToList() + Assert.That(expected.Count, [Is].GreaterThan(0)) + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub DayTest() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.Day(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.Day(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub DayTest() + Dim result = (From invoice In Invoices + Where Microsoft.VisualBasic.DateAndTime.Day(invoice.InvoiceDate) > 0 + Select invoice) _ + .ToList() + Dim expected = (From invoice In Invoices.ToList + Where Microsoft.VisualBasic.DateAndTime.Day(invoice.InvoiceDate) > 0 + Select invoice) _ + .ToList() + Assert.That(expected.Count, [Is].GreaterThan(0)) + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub HourTest() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.Hour(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.Hour(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub HourTest() + Dim result = (From invoice In Invoices + Where invoice.PaymentDate.HasValue AndAlso Microsoft.VisualBasic.DateAndTime.Hour(invoice.PaymentDate.Value) > 0 + Select invoice) _ + .ToList() + Dim expected = (From invoice In Invoices.ToList + Where invoice.PaymentDate.HasValue AndAlso Microsoft.VisualBasic.DateAndTime.Hour(invoice.PaymentDate.Value) > 0 + Select invoice) _ + .ToList() + Assert.That(expected.Count, [Is].GreaterThan(0)) + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub MinuteTest() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.Minute(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.Minute(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub MinuteTest() + Dim result = (From invoice In Invoices + Where invoice.PaymentDate.HasValue AndAlso Microsoft.VisualBasic.DateAndTime.Minute(invoice.PaymentDate.Value) > 0 + Select invoice) _ + .ToList() + Dim expected = (From invoice In Invoices.ToList + Where invoice.PaymentDate.HasValue AndAlso Microsoft.VisualBasic.DateAndTime.Minute(invoice.PaymentDate.Value) > 0 + Select invoice) _ + .ToList() + Assert.That(expected.Count, [Is].GreaterThan(0)) + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub SecondTest() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.Second(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.Second(order.OrderDate.Value) > 0 _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + + Public Sub SecondTest() + Dim result = (From invoice In Invoices + Where invoice.PaymentDate.HasValue AndAlso Microsoft.VisualBasic.DateAndTime.Second(invoice.PaymentDate.Value) > 0 + Select invoice) _ + .ToList() + Dim expected = (From invoice In Invoices.ToList + Where invoice.PaymentDate.HasValue AndAlso Microsoft.VisualBasic.DateAndTime.Second(invoice.PaymentDate.Value) > 0 + Select invoice) _ + .ToList() + Assert.That(expected.Count, [Is].GreaterThan(0)) + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - - Public Sub MonthNameNotSupported1Test() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.MonthName(order.OrderDate.Value.Month, True) <> "test" _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.MonthName(order.OrderDate.Value.Month, True) <> "test" _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub MonthNameNotSupported1Test() + Assert.Throws(Of QueryTranslationException)(Function() (From invoice In Invoices + Where Microsoft.VisualBasic.DateAndTime.MonthName(invoice.InvoiceDate.Month, True) <> "test" + Select invoice) _ + .ToList()) + End Sub - - - Public Sub MonthNameNotSupported2Test() - Dim result = (From order In Orders _ - Where Microsoft.VisualBasic.DateAndTime.MonthName(order.OrderDate.Value.Month, False) <> "test" _ - Select order) _ - .ToList() - Dim expected = (From order In Orders.ToList _ - Where Microsoft.VisualBasic.DateAndTime.MonthName(order.OrderDate.Value.Month, False) <> "test" _ - Select order) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub MonthNameNotSupported2Test() + Assert.Throws(Of QueryTranslationException)(Function() (From invoice In Invoices + Where Microsoft.VisualBasic.DateAndTime.MonthName(invoice.InvoiceDate.Month, False) <> "test" + Select invoice) _ + .ToList()) + End Sub - End Class + End Class End Namespace \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.VB/Linq/OperatorsTest.vb b/Orm/Xtensive.Orm.Tests.VB/Linq/OperatorsTest.vb index 0c403fea5..7a8ed9554 100644 --- a/Orm/Xtensive.Orm.Tests.VB/Linq/OperatorsTest.vb +++ b/Orm/Xtensive.Orm.Tests.VB/Linq/OperatorsTest.vb @@ -1,64 +1,68 @@ -Imports Xtensive.Orm.Tests.ObjectModel -Imports Xtensive.Orm.Tests.ObjectModel.NorthwindDO +Imports Xtensive.Orm.Tests.ObjectModel +Imports Xtensive.Orm.Tests.ObjectModel.ChinookDO Imports NUnit.Framework Namespace Linq - - Public Class OperatorsTest - Inherits NorthwindDOModelTest + + Public Class OperatorsTest + Inherits ChinookDOModelTest - Public Shadows ReadOnly Property Orders As IOrderedQueryable(Of Order) - Get - Return Query.All(Of Order)().OrderBy(Function(c) c.Id) - End Get - End Property + Public Shadows ReadOnly Property Invoices As IOrderedQueryable(Of Invoice) + Get + Return Session.Query.All(Of Invoice)().OrderBy(Function(c) c.InvoiceId) + End Get + End Property - Public Shadows ReadOnly Property Customers As IOrderedQueryable(Of Customer) - Get - Return Query.All(Of Customer)().OrderBy(Function(c) c.Id) - End Get - End Property + Public Shadows ReadOnly Property Customers As IOrderedQueryable(Of Customer) + Get + Return Session.Query.All(Of Customer)().OrderBy(Function(c) c.CustomerId) + End Get + End Property - - Public Sub CompareString1Test() - Dim result = (From customer In Customers _ - Where customer.CompanyName > "test" _ + + Public Sub CompareString1Test() + Dim result = (From customer In Customers + Where customer.CompanyName > "test" Select customer) _ .ToList() - ' SQL compares CaseInsensitive by default - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.CompilerServices.Operators.CompareString(customer.CompanyName, "test", True) > 0 _ - Select customer) _ + ' SQL compares CaseInsensitive by default + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.CompilerServices.Operators.CompareString(customer.CompanyName, "test", True) > 0 + Select customer) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.Count, [Is].GreaterThan(0)) + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub CompareString2Test() - Dim result = (From customer In Customers _ + + + Public Sub CompareString2Test() + Dim result = (From customer In Customers Select customer.CompanyName > "test") _ - .Where(Function(i) i > 0) _ + .Where(Function(i) i) _ .ToList() - ' SQL compares CaseInsensitive by default - Dim expected = (From customer In Customers.ToList() _ - Select customer.CompanyName > "test") _ - .Where(Function(i) i > 0) _ + ' SQL compares CaseInsensitive by default + Dim expected = (From customer In Customers.ToList() + Select customer.CompanyName > "test") _ + .Where(Function(i) i) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.Count, [Is].GreaterThan(0)) + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub BooleanTest() - Dim result = (From order In Orders _ - Select order.Freight > 10) _ - .Where(Function(i) i > 0) _ + + Public Sub BooleanTest() + Dim result = (From invoice In Invoices + Select invoice.Total > 2.0) _ + .Where(Function(i) i) _ .ToList() - Dim expected = (From order In Orders.ToList() _ - Select order.Freight > 10) _ - .Where(Function(i) i > 0) _ + Dim expected = (From invoice In Invoices.ToList() + Select invoice.Total > 2.0) _ + .Where(Function(i) i) _ .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + Assert.That(expected.Count, [Is].GreaterThan(0)) + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - End Class + End Class End Namespace \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.VB/Linq/StringTest.vb b/Orm/Xtensive.Orm.Tests.VB/Linq/StringTest.vb index 6f683ce38..46654a54c 100644 --- a/Orm/Xtensive.Orm.Tests.VB/Linq/StringTest.vb +++ b/Orm/Xtensive.Orm.Tests.VB/Linq/StringTest.vb @@ -1,174 +1,174 @@ -Imports Xtensive.Orm.Tests.ObjectModel.NorthwindDO +Imports Xtensive.Orm.Tests.ObjectModel.ChinookDO Imports Xtensive.Orm.Tests.ObjectModel Imports Xtensive.Orm.Configuration Imports NUnit.Framework Namespace Linq - - Public Class StringTest - Inherits NorthwindDOModelTest + + Public Class StringTest + Inherits ChinookDOModelTest - Public Shadows ReadOnly Property Customers As IOrderedQueryable(Of Customer) - Get - Return Query.All(Of Customer)().OrderBy(Function(c) c.Id) - End Get - End Property + Public Shadows ReadOnly Property Customers As IOrderedQueryable(Of Customer) + Get + Return Session.Query.All(Of Customer)().OrderBy(Function(c) c.CustomerId) + End Get + End Property - - Public Sub TrimTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.Trim(" prefix " + customer.CompanyName + " suffix ") <> "test" _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.Trim(" prefix " + customer.CompanyName + " suffix ") <> "test" _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub TrimTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.Trim(" prefix " + customer.CompanyName + " suffix ") <> "test" + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where customer.CompanyName <> Nothing AndAlso Microsoft.VisualBasic.Strings.Trim(" prefix " + customer.CompanyName + " suffix ") <> "test" + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub LTrimTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.LTrim(" prefix " + customer.CompanyName + " suffix ") <> "test" _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.LTrim(" prefix " + customer.CompanyName + " suffix ") <> "test" _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub LTrimTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.LTrim(" prefix " + customer.CompanyName + " suffix ") <> "test" + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where customer.CompanyName <> Nothing AndAlso Microsoft.VisualBasic.Strings.LTrim(" prefix " + customer.CompanyName + " suffix ") <> "test" + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub RTrimTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.RTrim(" prefix " + customer.CompanyName + " suffix ") <> "test" _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.RTrim(" prefix " + customer.CompanyName + " suffix ") <> "test" _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub RTrimTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.RTrim(" prefix " + customer.CompanyName + " suffix ") <> "test" + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where customer.CompanyName <> Nothing AndAlso Microsoft.VisualBasic.Strings.RTrim(" prefix " + customer.CompanyName + " suffix ") <> "test" + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub LenTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.Len(" prefix " + customer.CompanyName + " suffix ") > 0 _ + + Public Sub LenTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.Len(" prefix " + customer.CompanyName + " suffix ") > 0 Select Microsoft.VisualBasic.Strings.Len(" prefix " + customer.CompanyName + " suffix ")) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.Len(" prefix " + customer.CompanyName + " suffix ") > 0 _ - Select Microsoft.VisualBasic.Strings.Len(" prefix " + customer.CompanyName + " suffix ")) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + .ToList() + Dim expected = (From customer In Customers.ToList() + Where customer.CompanyName <> Nothing AndAlso Microsoft.VisualBasic.Strings.Len(" prefix " + customer.CompanyName + " suffix ") > 0 + Select Microsoft.VisualBasic.Strings.Len(" prefix " + customer.CompanyName + " suffix ")) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub LeftTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.Left(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.Left(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub LeftTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.Left(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where customer.CompanyName <> Nothing AndAlso Microsoft.VisualBasic.Strings.Left(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub RightTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.Right(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.Right(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub RightTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.Right(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where customer.CompanyName <> Nothing AndAlso Microsoft.VisualBasic.Strings.Right(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub Mid2Test() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.Mid(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.Mid(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub Mid2Test() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.Mid(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where customer.CompanyName <> Nothing AndAlso Microsoft.VisualBasic.Strings.Mid(" prefix " + customer.CompanyName + " suffix ", 2) <> "test" + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub Mid3Test() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.Mid(" prefix " + customer.CompanyName + " suffix ", 2, 1) <> "test" _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.Mid(" prefix " + customer.CompanyName + " suffix ", 2, 1) <> "test" _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub Mid3Test() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.Mid(" prefix " + customer.CompanyName + " suffix ", 2, 1) <> "test" + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where customer.CompanyName <> Nothing AndAlso Microsoft.VisualBasic.Strings.Mid(" prefix " + customer.CompanyName + " suffix ", 2, 1) <> "test" + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub UCaseStringTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.UCase(" prefix " + customer.CompanyName + " suffix ") <> "test" _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.UCase(" prefix " + customer.CompanyName + " suffix ") <> "test" _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub UCaseStringTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.UCase(" prefix " + customer.CompanyName + " suffix ") <> "test" + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where customer.CompanyName <> Nothing AndAlso Microsoft.VisualBasic.Strings.UCase(" prefix " + customer.CompanyName + " suffix ") <> "test" + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub LCaseStringTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.LCase(" prefix " + customer.CompanyName + " suffix ") <> "test" _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.LCase(" prefix " + customer.CompanyName + " suffix ") <> "test" _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub LCaseStringTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.LCase(" prefix " + customer.CompanyName + " suffix ") <> "test" + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where customer.CompanyName <> Nothing AndAlso Microsoft.VisualBasic.Strings.LCase(" prefix " + customer.CompanyName + " suffix ") <> "test" + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub UCaseCharTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.UCase("A"c) <> "A"c _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.UCase("A"c) <> "A"c _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub + + Public Sub UCaseCharTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.UCase("A"c) <> "A"c + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.Strings.UCase("A"c) <> "A"c + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub - - Public Sub LCaseCharTest() - Dim result = (From customer In Customers _ - Where Microsoft.VisualBasic.Strings.LCase("A"c) <> "A"c _ - Select customer) _ - .ToList() - Dim expected = (From customer In Customers.ToList() _ - Where Microsoft.VisualBasic.Strings.LCase("A"c) <> "A"c _ - Select customer) _ - .ToList() - Assert.IsTrue(expected.SequenceEqual(result)) - End Sub - End Class + + Public Sub LCaseCharTest() + Dim result = (From customer In Customers + Where Microsoft.VisualBasic.Strings.LCase("A"c) <> "A"c + Select customer) _ + .ToList() + Dim expected = (From customer In Customers.ToList() + Where Microsoft.VisualBasic.Strings.LCase("A"c) <> "A"c + Select customer) _ + .ToList() + Assert.That(expected.SequenceEqual(result), [Is].True) + End Sub + End Class End Namespace \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.VB/Model/PersistenceTest.vb b/Orm/Xtensive.Orm.Tests.VB/Model/PersistenceTest.vb index 8efe7f80a..2afffcb9e 100644 --- a/Orm/Xtensive.Orm.Tests.VB/Model/PersistenceTest.vb +++ b/Orm/Xtensive.Orm.Tests.VB/Model/PersistenceTest.vb @@ -21,12 +21,12 @@ Namespace Model Using scope As TransactionScope = session.OpenTransaction() Dim author = New Author With {.Name = "Vasya"} Dim book = New Book With {.Name = "The Book", .Author = author} - Assert.AreEqual(1, author.Books.Count) + Assert.That(author.Books.Count, [Is].EqualTo(1)) Dim result = From c In Query.All(Of Author)() Select c Dim list = result.ToList() Dim loaded = result.Single() - Assert.AreEqual("Vasya", loaded.Name) + Assert.That(loaded.Name, [Is].EqualTo("Vasya")) End Using End Using End Sub diff --git a/Orm/Xtensive.Orm.Tests.VB/Model/PersistentPropertyWeavingTest.vb b/Orm/Xtensive.Orm.Tests.VB/Model/PersistentPropertyWeavingTest.vb index 62fe84ea6..c6388fa0a 100644 --- a/Orm/Xtensive.Orm.Tests.VB/Model/PersistentPropertyWeavingTest.vb +++ b/Orm/Xtensive.Orm.Tests.VB/Model/PersistentPropertyWeavingTest.vb @@ -1,4 +1,4 @@ -' Copyright (C) 2013 Xtensive LLC. +' Copyright (C) 2013 Xtensive LLC. ' All rights reserved. ' For conditions of distribution and use, see license. ' Created by: Alena Mikshina @@ -263,10 +263,10 @@ Namespace Model Dim baseEntity = DirectCast(entity, NewFieldBase) Assert.That(baseEntity.PersistentValue, [Is].EqualTo(Hello1)) Assert.That(baseEntity.PersistentVirtualValue, [Is].EqualTo(Hello2)) - Assert.That(entity.PersistentValue, [Is].EqualTo(Nothing)) - Assert.That(entity.PersistentVirtualValue, [Is].EqualTo(Nothing)) - Assert.That(entity.NonPersistentValue, [Is].EqualTo(Nothing)) - Assert.That(entity.NonPersistentStaticValue, [Is].EqualTo(Nothing)) + Assert.That(entity.PersistentValue, [Is].Null) + Assert.That(entity.PersistentVirtualValue, [Is].Null) + Assert.That(entity.NonPersistentValue, [Is].Null) + Assert.That(entity.NonPersistentStaticValue, [Is].Null) End Sub) End Sub diff --git a/Orm/Xtensive.Orm.Tests.VB/My Project/Application.Designer.vb b/Orm/Xtensive.Orm.Tests.VB/My Project/Application.Designer.vb deleted file mode 100644 index 82fe71264..000000000 --- a/Orm/Xtensive.Orm.Tests.VB/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:4.0.30319.1 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/Orm/Xtensive.Orm.Tests.VB/My Project/Application.myapp b/Orm/Xtensive.Orm.Tests.VB/My Project/Application.myapp deleted file mode 100644 index 758895def..000000000 --- a/Orm/Xtensive.Orm.Tests.VB/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ - - - false - false - 0 - true - 0 - 1 - true - diff --git a/Orm/Xtensive.Orm.Tests.VB/My Project/AssemblyInfo.vb b/Orm/Xtensive.Orm.Tests.VB/My Project/AssemblyInfo.vb deleted file mode 100644 index cc223d0de..000000000 --- a/Orm/Xtensive.Orm.Tests.VB/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,35 +0,0 @@ -Imports System -Imports System.Reflection -Imports System.Runtime.InteropServices - -' General Information about an assembly is controlled through the following -' set of attributes. Change these attribute values to modify the information -' associated with an assembly. - -' Review the values of the assembly attributes - - - - - - - - - - -'The following GUID is for the ID of the typelib if this project is exposed to COM - - -' Version information for an assembly consists of the following four values: -' -' Major Version -' Minor Version -' Build Number -' Revision -' -' You can specify all the values or you can default the Build and Revision Numbers -' by using the '*' as shown below: -' - - - diff --git a/Orm/Xtensive.Orm.Tests.VB/My Project/Resources.Designer.vb b/Orm/Xtensive.Orm.Tests.VB/My Project/Resources.Designer.vb deleted file mode 100644 index b3d6d7d14..000000000 --- a/Orm/Xtensive.Orm.Tests.VB/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:4.0.30319.1 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'This class was auto-generated by the StronglyTypedResourceBuilder - 'class via a tool like ResGen or Visual Studio. - 'To add or remove a member, edit your .ResX file then rerun ResGen - 'with the /str option, or rebuild your VS project. - ''' - ''' A strongly-typed resource class, for looking up localized strings, etc. - ''' - _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - ''' - ''' Returns the cached ResourceManager instance used by this class. - ''' - _ - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Xtensive.Storage.Tests.VB.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - ''' - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - ''' - _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/Orm/Xtensive.Orm.Tests.VB/My Project/Resources.resx b/Orm/Xtensive.Orm.Tests.VB/My Project/Resources.resx deleted file mode 100644 index af7dbebba..000000000 --- a/Orm/Xtensive.Orm.Tests.VB/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Orm/Xtensive.Orm.Tests.VB/My Project/Settings.Designer.vb b/Orm/Xtensive.Orm.Tests.VB/My Project/Settings.Designer.vb deleted file mode 100644 index a3bd52b0c..000000000 --- a/Orm/Xtensive.Orm.Tests.VB/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' -' This code was generated by a tool. -' Runtime Version:4.0.30319.1 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - -Namespace My - - _ - Partial Friend NotInheritable Class MySettings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) - -#Region "My.Settings Auto-Save Functionality" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub -#End If -#End Region - - Public Shared ReadOnly Property [Default]() As MySettings - Get - -#If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If -#End If - Return defaultInstance - End Get - End Property - End Class -End Namespace - -Namespace My - - _ - Friend Module MySettingsProperty - - _ - Friend ReadOnly Property Settings() As Global.Xtensive.Orm.Tests.VB.My.MySettings - Get - Return Global.Xtensive.Orm.Tests.VB.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/Orm/Xtensive.Orm.Tests.VB/My Project/Settings.settings b/Orm/Xtensive.Orm.Tests.VB/My Project/Settings.settings deleted file mode 100644 index 85b890b3c..000000000 --- a/Orm/Xtensive.Orm.Tests.VB/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Orm/Xtensive.Orm.Tests.VB/Xtensive.Orm.Tests.VB.vbproj b/Orm/Xtensive.Orm.Tests.VB/Xtensive.Orm.Tests.VB.vbproj index 0f9d52a74..598aafe56 100644 --- a/Orm/Xtensive.Orm.Tests.VB/Xtensive.Orm.Tests.VB.vbproj +++ b/Orm/Xtensive.Orm.Tests.VB/Xtensive.Orm.Tests.VB.vbproj @@ -1,141 +1,38 @@ - - + - Net40-Debug - AnyCPU - - - - - {53DE0196-E6FC-4E51-8F50-C6241D50E37E} - Library - Xtensive.Orm.Tests.VB - Xtensive.Orm.Tests.VB - 512 - Windows - - - true - full - true - true - ..\..\_Build\Binaries\Debug\Lib\Net40\ - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - v4.0 - - - portable - false - true - true - ..\..\_Build\Binaries\Release\Lib\Net40\ - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - v4.0 + true + $(AssemblySearchPaths);{GAC} + false + true + Debug;Release;Debug-NET8;Release-NET8;Debug-NET10;Release-NET10 - On + true + $(OrmKeyFile) + true + 2 + 16.9 - - Binary - - - Off + + $(DefineConstants.Replace(';', ',')),TRACE,DEBUG + true + portable - - On + + $(DefineConstants.Replace(';', ',')),TRACE + + - - False - ..\..\Lib\NUnit\nunit.framework.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - Designer - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - + + + + + - - {628737E8-3581-4793-99C8-9A4D2D83FEA0} - Xtensive.Orm - - - {F2CE47F7-8170-4FC4-B619-D32E6398D4F9} - Xtensive.Orm.Tests.Framework - - - {FF9927DD-5D2E-4C57-B81F-2CD10CEE50DC} - Xtensive.Orm.Tests - + + + - - - - \ No newline at end of file diff --git a/Orm/Xtensive.Orm/Orm/Providers/DomainHandler.cs b/Orm/Xtensive.Orm/Orm/Providers/DomainHandler.cs index e4351fc16..8ad99b7e8 100644 --- a/Orm/Xtensive.Orm/Orm/Providers/DomainHandler.cs +++ b/Orm/Xtensive.Orm/Orm/Providers/DomainHandler.cs @@ -1,4 +1,4 @@ -// Copyright (C) 2003-2021 Xtensive LLC. +// Copyright (C) 2003-2026 Xtensive LLC. // This code is distributed under MIT license terms. // See the License.txt file in the project root for more information. // Created by: Dmitri Maximov @@ -6,6 +6,8 @@ using System; using System.Collections.Generic; +using System.Linq; +using System.Runtime.Loader; using Xtensive.Core; using Xtensive.Orm.Building.Builders; using Xtensive.Orm.Linq.MemberCompilation; @@ -123,7 +125,7 @@ protected virtual IPostCompiler CreatePostCompiler(CompilerConfiguration configu /// Compiler containers for current provider. protected virtual IEnumerable GetProviderCompilerContainers() { - return new[] { + IEnumerable basicCompilerContainers = new[] { typeof (NullableCompilers), typeof (StringCompilers), typeof (DateTimeCompilers), @@ -135,10 +137,33 @@ protected virtual IEnumerable GetProviderCompilerContainers() typeof (NumericCompilers), typeof (DecimalCompilers), typeof (GuidCompilers), - //typeof (VbStringsCompilers), - //typeof (VbDateAndTimeCompilers), typeof (EnumCompilers), + }; + var result = basicCompilerContainers; + var defaultLoadedAssemblies = AssemblyLoadContext.Default.Assemblies; + var currentLoadedAssemblies = AssemblyLoadContext.CurrentContextualReflectionContext.Assemblies; + // dynamic registration to not cause assembly loading + if (defaultLoadedAssemblies.Any(static a => a.GetName().Name.Equals("FSharp.Core", StringComparison.OrdinalIgnoreCase)) + || defaultLoadedAssemblies.Any(static a => a.GetName().Name.Equals("FSharp.Core", StringComparison.OrdinalIgnoreCase))) { + result = result.Concat(new[] { + typeof (FSharpMathOperationsCompilers), + typeof (FSharpOperatorsCompilers), + typeof (FSharpStringCompilers), + typeof (FSharpConversionsCompilers), + }); + } + + if (defaultLoadedAssemblies.Any(static a => a.GetName().Name.Equals("Microsoft.VisualBasic", StringComparison.OrdinalIgnoreCase)) + || defaultLoadedAssemblies.Any(static a => a.GetName().Name.Equals("Microsoft.VisualBasic", StringComparison.OrdinalIgnoreCase))) { + result = result.Concat(new[] { + typeof (VbConversionsCompilers), + typeof (VbStringsCompilers), + typeof (VbDateAndTimeCompilers), + }); + } + + return result; } protected virtual SearchConditionCompiler CreateSearchConditionVisitor() diff --git a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/DecimalCompilers.cs b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/DecimalCompilers.cs index 0aa864fad..a06d6b9a5 100644 --- a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/DecimalCompilers.cs +++ b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/DecimalCompilers.cs @@ -1,4 +1,4 @@ -// Copyright (C) 2003-2010 Xtensive LLC. +// Copyright (C) 2003-2010 Xtensive LLC. // All rights reserved. // For conditions of distribution and use, see license. // Created by: Denis Krjuchkov @@ -202,7 +202,7 @@ public static SqlExpression DecimalOperatorAddition( } [Compiler(typeof(decimal), Operator.Subtraction, TargetKind.Operator)] - public static SqlExpression DecimalOperatorSubtractionTimeSpan( + public static SqlExpression DecimalOperatorSubtraction( [Type(typeof(decimal))] SqlExpression left, [Type(typeof(decimal))] SqlExpression right) { diff --git a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpConversionsCompilers.cs b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpConversionsCompilers.cs new file mode 100644 index 000000000..4da575a7d --- /dev/null +++ b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpConversionsCompilers.cs @@ -0,0 +1,106 @@ +// Copyright (C) 2026 Xtensive LLC. +// This code is distributed under MIT license terms. +// See the License.txt file in the project root for more information. + +using System.Reflection; +using Xtensive.Sql.Dml; + +namespace Xtensive.Orm.Providers +{ +#pragma warning disable IDE0060 // Remove unused parameter + [CompilerContainer(typeof(SqlExpression))] + internal static class FSharpConversionsCompilers + { +#if NET10_0_OR_GREATER + private const string FSharpOperators = "Microsoft.FSharp.Core.Operators, FSharp.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#else + private const string FSharpOperators = "Microsoft.FSharp.Core.Operators, FSharp.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#endif + + [Compiler(FSharpOperators, "ToChar", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToCharGeneric(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToChar(stringExpression); + } + + [Compiler(FSharpOperators, "ToByte", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToByteGeneric(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToByte(stringExpression); + } + + [Compiler(FSharpOperators, "ToSByte", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToSByteGeneric(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToSbyte(stringExpression); + } + + [Compiler(FSharpOperators, "ToInt16", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToShortGeneric(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToShort(stringExpression); + } + + [Compiler(FSharpOperators, "ToUInt16", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToUShortGeneric(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToUshort(stringExpression); + } + + [Compiler(FSharpOperators, "ToInt", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToIntGeneric(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToInt(stringExpression); + } + + [Compiler(FSharpOperators, "ToInt32", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToInt32Generic(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToInt(stringExpression); + } + + [Compiler(FSharpOperators, "ToUInt32", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToUInt32Generic(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToUint(stringExpression); + } + + [Compiler(FSharpOperators, "ToInt64", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToInt64Generic(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToLong(stringExpression); + } + + [Compiler(FSharpOperators, "ToUInt64", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToUInt64Generic(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToUlong(stringExpression); + } + + [Compiler(FSharpOperators, "ToSingle", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToSingleGeneric(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToFloat(stringExpression); + } + + [Compiler(FSharpOperators, "ToDouble", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToDoubleGeneric(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToDouble(stringExpression); + } + + [Compiler(FSharpOperators, "ToDecimal", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToDecimalGeneric(MemberInfo memberInfo, SqlExpression stringExpression) + { + return ExpressionTranslationHelpers.ToDecimal(stringExpression); + } + + [Compiler(FSharpOperators, "ToString", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ToStringGeneric(MemberInfo memberInfo, SqlExpression expression) + + { + return ExpressionTranslationHelpers.ToString(expression); + } + } +#pragma warning restore IDE0060 // Remove unused parameter +} diff --git a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpMathOperationsCompilers.cs b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpMathOperationsCompilers.cs new file mode 100644 index 000000000..88485fc3b --- /dev/null +++ b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpMathOperationsCompilers.cs @@ -0,0 +1,194 @@ +// Copyright (C) 2026 Xtensive LLC. +// This code is distributed under MIT license terms. +// See the License.txt file in the project root for more information. + +using System; +using System.Reflection; +using Xtensive.Reflection; +using Xtensive.Sql; +using Xtensive.Sql.Dml; + +namespace Xtensive.Orm.Providers +{ +#pragma warning disable IDE0060 // Remove unused parameter + [CompilerContainer(typeof(SqlExpression))] + internal static class FSharpMathOperationsCompilers + { +#if NET10_0_OR_GREATER + private const string FSharpOperators = "Microsoft.FSharp.Core.Operators, FSharp.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#else + private const string FSharpOperators = "Microsoft.FSharp.Core.Operators, FSharp.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#endif + + [Compiler(FSharpOperators, "Abs", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression AbsGeneric(MemberInfo member, SqlExpression operand) + { + return SqlDml.Abs(operand); + } + + [Compiler(FSharpOperators, "Sign", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression SignGeneric(MemberInfo member, SqlExpression operand) + { + return ExpressionTranslationHelpers.ToInt(SqlDml.Sign(operand)); + } + + [Compiler(FSharpOperators, "Acos", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression AcosGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Acos(x); + } + + [Compiler(FSharpOperators, "Asin", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression AsinGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Asin(x); + } + + [Compiler(FSharpOperators, "Atan", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression AtanGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Atan(x); + } + + [Compiler(FSharpOperators, "Atan2", TargetKind.Static | TargetKind.Method, 2)] + public static SqlExpression Atan2Generic(MemberInfo member, SqlExpression x, SqlExpression y) + { + return SqlDml.Atan2(x, y); + } + + [Compiler(FSharpOperators, "Ceiling", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression CeilingGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Ceiling(x); + } + + [Compiler(FSharpOperators, "Cos", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression CosGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Cos(x); + } + + [Compiler(FSharpOperators, "Cosh", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression CoshGeneric(MemberInfo member, SqlExpression x) + { + return (SqlDml.Exp(x) + SqlDml.Exp(-x)) / SqlDml.Literal(2); + } + + [Compiler(FSharpOperators, "Exp", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression ExpGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Exp(x); + } + + [Compiler(FSharpOperators, "Floor", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression FloorGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Floor(x); + } + + [Compiler(FSharpOperators, "Log", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression LogGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Log(x); + } + + [Compiler(FSharpOperators, "Log10", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression Log10Generic(MemberInfo member, SqlExpression x) + { + return SqlDml.Log10(x); + } + + [Compiler(FSharpOperators, "Max", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression MaxGeneric(MemberInfo member, SqlExpression left, SqlExpression right) + { + var result = SqlDml.Case(); + _ = result.Add(left > right, left); + result.Else = right; + return result; + } + + [Compiler(FSharpOperators, "Min", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression MinGeneric(MemberInfo member, SqlExpression left, SqlExpression right) + { + var result = SqlDml.Case(); + _ = result.Add(left < right, left); + result.Else = right; + return result; + } + + [Compiler(FSharpOperators, "Round", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression RoundGeneric(MemberInfo member, SqlExpression x) + { + return BankersRound(x, null, (member as MethodInfo).GetGenericArguments()[0] == WellKnownTypes.Decimal); + } + + private static SqlExpression BankersRound(SqlExpression value, SqlExpression digits, bool isDecimal) + { + if (!isDecimal) { + return SqlDml.Round(value, digits, TypeCode.Double, MidpointRounding.ToEven); + } + if (digits == null) { + return TryCastToDecimalPS(SqlDml.Round(value, digits, TypeCode.Decimal, MidpointRounding.ToEven), 28, 0); + } + if (!(digits is SqlLiteral scale)) { + throw new NotSupportedException(); + } + return TryCastToDecimalPS(SqlDml.Round(value, digits, TypeCode.Decimal, MidpointRounding.ToEven), 28, Convert.ToInt16(scale.Value)); + } + + private static SqlExpression TryCastToDecimalPS(SqlExpression value, short precision, short scale) + { + var context = ExpressionTranslationContext.Current; + var provider = context.ProviderInfo.ProviderName; + if (provider.Equals(WellKnown.Provider.PostgreSql, StringComparison.Ordinal) + || provider.Equals(WellKnown.Provider.Oracle, StringComparison.Ordinal)) { + // to fit result into .Net decimal since Npgsql client libarary does not provide a way to make in on reading + return SqlDml.Cast(value, SqlType.Decimal, precision, scale); + } + return value; + } + + + [Compiler(FSharpOperators, "Sin", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression SinGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Sin(x); + } + + [Compiler(FSharpOperators, "Sinh", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression SinhGeneric(MemberInfo member, SqlExpression x) + { + return (SqlDml.Exp(x) - SqlDml.Exp(-x)) / SqlDml.Literal(2); + } + + [Compiler(FSharpOperators, "Sqrt", TargetKind.Static | TargetKind.Method, 2)] + public static SqlExpression SqrtGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Sqrt(x); + } + + [Compiler(FSharpOperators, "Tan", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression TanGeneric(MemberInfo member, SqlExpression x) + { + return SqlDml.Tan(x); + } + + [Compiler(FSharpOperators, "Tanh", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression TanhGeneric(MemberInfo member, SqlExpression x) + { + var exp2d = SqlDml.Exp(SqlDml.Literal(2) * x); + var one = SqlDml.Literal(1); + + return (exp2d - one) / (exp2d + one); + } + + [Compiler(FSharpOperators, "Truncate", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression TruncateGeneric(MemberInfo member, SqlExpression x) + { + if ((member as MethodInfo).GetGenericArguments()[0] == WellKnownTypes.Decimal) + return TryCastToDecimalPS(SqlDml.Truncate(x), 28, 0); + return SqlDml.Truncate(x); + } + } +#pragma warning restore IDE0060 // Remove unused parameter +} diff --git a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpOperatorsCompilers.cs b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpOperatorsCompilers.cs new file mode 100644 index 000000000..4c55578c9 --- /dev/null +++ b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpOperatorsCompilers.cs @@ -0,0 +1,142 @@ +// Copyright (C) 2026 Xtensive LLC. +// This code is distributed under MIT license terms. +// See the License.txt file in the project root for more information. + +using System; +using System.Reflection; +using Xtensive.Reflection; +using Xtensive.Sql; +using Xtensive.Sql.Dml; + +namespace Xtensive.Orm.Providers +{ +#pragma warning disable IDE0060 // Remove unused parameter + [CompilerContainer(typeof(SqlExpression))] + internal static class FSharpOperatorsCompilers + { +#if NET10_0_OR_GREATER + private const string FSharpOperators = "Microsoft.FSharp.Core.Operators, FSharp.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; + private const string FSharpLanguagePrimitives = "Microsoft.FSharp.Core.LanguagePrimitives, FSharp.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#else + private const string FSharpOperators = "Microsoft.FSharp.Core.Operators, FSharp.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; + private const string FSharpLanguagePrimitives = "Microsoft.FSharp.Core.LanguagePrimitives, FSharp.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#endif + + [Compiler(FSharpOperators, Reflection.WellKnown.Operator.Addition, TargetKind.Operator, 3)] + public static SqlExpression OperationAddition(MemberInfo member, SqlExpression left, SqlExpression right) + { + return SqlDml.Add(left, right); + } + + [Compiler(FSharpLanguagePrimitives, "AdditionDynamic", TargetKind.Static | TargetKind.Method, 3)] + public static SqlExpression DynamicAddition(MemberInfo member, SqlExpression left, SqlExpression right) + { + var method = member as MethodInfo; + var arguments = method.GetGenericArguments(); + var firstArgument = arguments[0]; + if (firstArgument == WellKnownTypes.DateTime) + return DateTimeCompilers.DateTimeOperatorAddition(left, right); + if (firstArgument == WellKnownTypes.DateTimeOffset) + return DateTimeOffsetCompilers.DateTimeOffsetOperatorAddition(left, right); + if(firstArgument == WellKnownTypes.Decimal) + return DecimalCompilers.DecimalOperatorAddition(left, right); + if (firstArgument == WellKnownTypes.TimeSpan) + return TimeSpanCompilers.TimeSpanOperatorAddition(left, right); + + return OperationAddition(member, left, right); + } + + [Compiler(FSharpOperators, Reflection.WellKnown.Operator.Subtraction, TargetKind.Operator, 3)] + public static SqlExpression OperationSubtraction(MemberInfo member, SqlExpression left, SqlExpression right) + { + return SqlDml.Subtract(left, right); + } + + [Compiler(FSharpLanguagePrimitives, "SubtractionDynamic", TargetKind.Static | TargetKind.Method, 3)] + public static SqlExpression DynamicSubtraction(MemberInfo member, SqlExpression left, SqlExpression right) + { + var method = member as MethodInfo; + var arguments = method.GetGenericArguments(); + var firstArgument = arguments[0]; + if (firstArgument == WellKnownTypes.DateTime) { + if (arguments[1] == WellKnownTypes.DateTime) + return DateTimeCompilers.DateTimeOperatorSubtractionDateTime(left, right); + if (arguments[1] == WellKnownTypes.TimeSpan) + return DateTimeCompilers.DateTimeOperatorSubtractionTimeSpan(left, right); + throw new NotSupportedException(); + } + if (firstArgument == WellKnownTypes.DateTimeOffset) { + if (arguments[1] == WellKnownTypes.DateTime) + return DateTimeOffsetCompilers.DateTimeOffsetOperatorSubtractionDateTimeOffset(left, right); + if (arguments[1] == WellKnownTypes.TimeSpan) + return DateTimeOffsetCompilers.DateTimeOffsetOperatorSubtractionTimeSpan(left, right); + throw new NotSupportedException(); + } + if (firstArgument == WellKnownTypes.TimeOnly) + return TimeOnlyCompilers.TimeOnlyOperatorSubtraction(left, right); + if (firstArgument == WellKnownTypes.Decimal) + return DecimalCompilers.DecimalOperatorSubtraction(left, right); + if (firstArgument == WellKnownTypes.TimeSpan) + return TimeSpanCompilers.TimeSpanOperatorSubtraction(left, right); + + return SqlDml.Subtract(left, right); + } + + [Compiler(FSharpOperators, Reflection.WellKnown.Operator.Multiply, TargetKind.Operator, 3)] + public static SqlExpression OperationMultiply(MemberInfo member, SqlExpression left, SqlExpression right) + { + return SqlDml.Multiply(left, right); + } + + [Compiler(FSharpLanguagePrimitives, "MultiplyDynamic", TargetKind.Static | TargetKind.Method, 3)] + public static SqlExpression DynamicMultiply(MemberInfo member, SqlExpression left, SqlExpression right) + { + return OperationMultiply(member, left, right); + } + + [Compiler(FSharpOperators, Reflection.WellKnown.Operator.Division, TargetKind.Operator, 3)] + public static SqlExpression OperationDivision(MemberInfo member, SqlExpression left, SqlExpression right) + { + return SqlDml.Divide(left, right); + } + + [Compiler(FSharpLanguagePrimitives, "DivisionDynamic", TargetKind.Static | TargetKind.Method, 3)] + public static SqlExpression DynamicDivision(MemberInfo member, SqlExpression left, SqlExpression right) + { + return OperationDivision(member, left, right); + } + + [Compiler(FSharpOperators, Reflection.WellKnown.Operator.Equality, TargetKind.Operator, 1)] + public static SqlExpression OperationEquality(MemberInfo member, SqlExpression left, SqlExpression right) + { + return SqlDml.Equals(left, right); + } + + [Compiler(FSharpOperators, Reflection.WellKnown.Operator.Inequality, TargetKind.Operator, 1)] + public static SqlExpression OperationInequality(MemberInfo member, SqlExpression left, SqlExpression right) + { + return SqlDml.NotEquals(left, right); + } + + [Compiler(FSharpOperators, Reflection.WellKnown.Operator.GreaterThan, TargetKind.Operator, 1)] + public static SqlExpression OperationGreaterThan(MemberInfo member, SqlExpression left, SqlExpression right) + => SqlDml.GreaterThan(left, right); + + [Compiler(FSharpOperators, Reflection.WellKnown.Operator.GreaterThanOrEqual, TargetKind.Operator, 1)] + public static SqlExpression OperationGreaterThanOrEqual(MemberInfo member, SqlExpression left, SqlExpression right) + => SqlDml.GreaterThanOrEquals(left, right); + + [Compiler(FSharpOperators, Reflection.WellKnown.Operator.LessThan, TargetKind.Operator, 1)] + public static SqlExpression OperationLessThan(MemberInfo member, SqlExpression left, SqlExpression right) + => SqlDml.LessThan(left, right); + + [Compiler(FSharpOperators, Reflection.WellKnown.Operator.LessThanOrEqual, TargetKind.Operator, 1)] + public static SqlExpression OperationLessThanOrEqual(MemberInfo member, SqlExpression left, SqlExpression right) + => SqlDml.LessThanOrEquals(left, right); + + [Compiler(FSharpOperators, "IsNull", TargetKind.Static | TargetKind.Method, 1)] + public static SqlExpression OperationLessThanOrEqual(MemberInfo member, SqlExpression operand) + => SqlDml.IsNull(operand); + } +#pragma warning restore IDE0060 // Remove unused parameter +} diff --git a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpStringCompilers.cs b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpStringCompilers.cs new file mode 100644 index 000000000..948fa35b0 --- /dev/null +++ b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/FSharpStringCompilers.cs @@ -0,0 +1,47 @@ +// Copyright (C) 2026 Xtensive LLC. +// This code is distributed under MIT license terms. +// See the License.txt file in the project root for more information. + +using System; +using System.Linq; +using Xtensive.Sql; +using Xtensive.Sql.Dml; + +namespace Xtensive.Orm.Providers +{ + [CompilerContainer(typeof(SqlExpression))] + internal static class FSharpStringCompilers + { + [Compiler(typeof(string), nameof(string.Concat), TargetKind.Static | TargetKind.Method)] + public static SqlExpression StringConcat( + [Type(typeof(object))] SqlExpression str0, + [Type(typeof(object))] SqlExpression str1) + { + return SqlDml.Concat(str0, str1); + } + + [Compiler(typeof(string), nameof(string.Concat), TargetKind.Static | TargetKind.Method)] + public static SqlExpression StringConcat( + [Type(typeof(object))] SqlExpression str0, + [Type(typeof(object))] SqlExpression str1, + [Type(typeof(object))] SqlExpression str2) + { + return SqlDml.Concat(SqlDml.Concat(str0, str1), str2); + } + + [Compiler(typeof(string), nameof(string.Concat), TargetKind.Static | TargetKind.Method)] + public static SqlExpression StringConcat( + [Type(typeof(object[]))] SqlExpression values) + { + if (values.NodeType != SqlNodeType.Container) + throw new NotSupportedException(); + var container = (SqlContainer) values; + if (container.Value.GetType() != typeof(SqlExpression[])) + throw new NotSupportedException(); + var expressions = (SqlExpression[]) container.Value; + if (expressions.Length == 0) + return SqlDml.Literal(""); + return expressions.Aggregate(SqlDml.Concat); + } + } +} diff --git a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VBStringsCompilers.cs b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VBStringsCompilers.cs index 05c57c131..bb69c43ff 100644 --- a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VBStringsCompilers.cs +++ b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VBStringsCompilers.cs @@ -1,10 +1,9 @@ -// Copyright (C) 2003-2010 Xtensive LLC. -// All rights reserved. -// For conditions of distribution and use, see license. +// Copyright (C) 2010-2026 Xtensive LLC. +// This code is distributed under MIT license terms. +// See the License.txt file in the project root for more information. // Created by: Aleksey Gamzov // Created: 2010.11.02 -using Xtensive.Linq; using Xtensive.Sql; using Xtensive.Sql.Dml; @@ -13,7 +12,11 @@ namespace Xtensive.Orm.Providers [CompilerContainer(typeof(SqlExpression))] internal static class VbStringsCompilers { - private const string VbStrings = "Microsoft.VisualBasic.Strings, Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#if NET10_0_OR_GREATER + private const string VbStrings = "Microsoft.VisualBasic.Strings, Microsoft.VisualBasic.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#else + private const string VbStrings = "Microsoft.VisualBasic.Strings, Microsoft.VisualBasic.Core, Version=13.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#endif [Compiler(VbStrings, "Trim", TargetKind.Static)] public static SqlExpression Trim(SqlExpression stringExpression) diff --git a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VbConversionsCompilers.cs b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VbConversionsCompilers.cs index 8c82953e1..b1170e852 100644 --- a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VbConversionsCompilers.cs +++ b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VbConversionsCompilers.cs @@ -1,15 +1,10 @@ -// Copyright (C) 2003-2010 Xtensive LLC. -// All rights reserved. -// For conditions of distribution and use, see license. +// Copyright (C) 2010-2026 Xtensive LLC. +// This code is distributed under MIT license terms. +// See the License.txt file in the project root for more information. // Created by: Aleksey Gamzov // Created: 2010.11.02 using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Xtensive.Linq; -using Xtensive.Sql; using Xtensive.Sql.Dml; namespace Xtensive.Orm.Providers @@ -17,7 +12,11 @@ namespace Xtensive.Orm.Providers [CompilerContainer(typeof(SqlExpression))] internal static class VbConversionsCompilers { - private const string VbConversions = "Microsoft.VisualBasic.CompilerServices.Conversions, Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#if NET10_0_OR_GREATER + private const string VbConversions = "Microsoft.VisualBasic.CompilerServices.Conversions, Microsoft.VisualBasic.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#else + private const string VbConversions = "Microsoft.VisualBasic.CompilerServices.Conversions, Microsoft.VisualBasic.Core, Version=13.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#endif [Compiler(VbConversions, "ToBoolean", TargetKind.Static)] public static SqlExpression ToBoolean([Type(typeof(string))]SqlExpression stringExpression) diff --git a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VbDateAndTimeCompilers.cs b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VbDateAndTimeCompilers.cs index c87cf8bc9..be5e15fe1 100644 --- a/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VbDateAndTimeCompilers.cs +++ b/Orm/Xtensive.Orm/Orm/Providers/Expressions/MemberCompilers/VbDateAndTimeCompilers.cs @@ -1,14 +1,9 @@ -// Copyright (C) 2003-2010 Xtensive LLC. -// All rights reserved. -// For conditions of distribution and use, see license. +// Copyright (C) 2010-2026 Xtensive LLC. +// This code is distributed under MIT license terms. +// See the License.txt file in the project root for more information. // Created by: Aleksey Gamzov // Created: 2010.11.02 -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Xtensive.Linq; using Xtensive.Sql; using Xtensive.Sql.Dml; @@ -17,7 +12,11 @@ namespace Xtensive.Orm.Providers [CompilerContainer(typeof(SqlExpression))] internal static class VbDateAndTimeCompilers { - private const string VbDateAndTime = "Microsoft.VisualBasic.DateAndTime, Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#if NET10_0_OR_GREATER + private const string VbDateAndTime = "Microsoft.VisualBasic.DateAndTime, Microsoft.VisualBasic.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#else + private const string VbDateAndTime = "Microsoft.VisualBasic.DateAndTime, Microsoft.VisualBasic.Core, Version=13.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; +#endif [Compiler(VbDateAndTime, "Year", TargetKind.Static)] public static SqlExpression Year(SqlExpression dateExpression)