diff --git a/.github/workflows/PublishToNuGet.yml b/.github/workflows/PublishToNuGet.yml index 145f74e51..179cdcb59 100644 --- a/.github/workflows/PublishToNuGet.yml +++ b/.github/workflows/PublishToNuGet.yml @@ -25,6 +25,7 @@ jobs: Get-ChildItem ./src -Recurse -Filter *.csproj | ForEach-Object { dotnet build $_.FullName -c Release + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } } - name: Pack projects @@ -33,6 +34,7 @@ jobs: Get-ChildItem ./src -Recurse -Filter *.csproj | ForEach-Object { dotnet pack $_.FullName -c Release --no-build -o ./packages + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } } - name: NuGet login (OIDC → temp API key) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7336c6448..baa66578d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: - name: Run Tests EFCore net10.0 run: | - dotnet test ./test/System.Linq.Dynamic.Core.Tests/System.Linq.Dynamic.Core.Tests.csproj -c Release + dotnet test ./test/System.Linq.Dynamic.Core.Tests/System.Linq.Dynamic.Core.Tests.csproj -c Release -p:CollectCoverage=false - name: Build and pack projects shell: pwsh diff --git a/.gitignore b/.gitignore index 93b7d410e..de756100b 100644 --- a/.gitignore +++ b/.gitignore @@ -186,9 +186,6 @@ ClientBin/ node_modules/ orleans.codegen.cs -# RIA/Silverlight projects -Generated_Code/ - # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) @@ -237,6 +234,6 @@ _Pvt_Extensions /coverage.xml /dynamic-coverage-*.xml -/test/**/coverage.net8.0.opencover.xml +/test/**/coverage.*.opencover.xml /test/**/coverage.opencover.xml .nuget/ diff --git a/README.md b/README.md index 7fc386082..f53e93cee 100644 --- a/README.md +++ b/README.md @@ -101,8 +101,7 @@ Or provide a list of additional types in the [DefaultDynamicLinqCustomTypeProvid The following frameworks are supported: - net35, net40, net45, net46 and up - netstandard1.3, netstandard2.0 and netstandard2.1 -- netcoreapp3.1, net5.0, net6.0, net7.0, net8.0 and net9.0 -- uap10.0 +- netcoreapp3.1, net5.0, net6.0, net7.0, net8.0, net9.0 and net10.0 ### Fork details This fork takes the basic library to a new level. Also adds unit tests to help ensure that it works properly. diff --git a/System.Linq.Dynamic.Core.sln b/System.Linq.Dynamic.Core.sln index a2dfd6456..a49e06a66 100644 --- a/System.Linq.Dynamic.Core.sln +++ b/System.Linq.Dynamic.Core.sln @@ -86,8 +86,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp_net5.0_EF5", "sr EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExpressionSample", "test-xamarin\ExpressionSample\ExpressionSample\ExpressionSample.csproj", "{060F5395-623F-464F-9C84-120E9496CBBA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExpressionSample.UWP", "test-xamarin\ExpressionSample\ExpressionSample.UWP\ExpressionSample.UWP.csproj", "{C7020A29-724F-40D3-9493-E6E9C018DE57}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestSLDC", "test-xamarin\TestSLDC\TestSLDC.csproj", "{C530A693-66FD-48A9-B42A-D613BB4CB754}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp_net5.0_EF5_InMemory", "src-console\ConsoleAppEF5_InMemory\ConsoleApp_net5.0_EF5_InMemory.csproj", "{1D30F4EB-3CD9-446C-BDFB-107F79F05BBC}" @@ -106,12 +104,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp_net6.0_EF6_InMem EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp_net6.0", "src-console\ConsoleApp_net6.0\ConsoleApp_net6.0.csproj", "{C206917D-6E90-4A31-8533-AF2DD68FF738}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Actions", "Actions", "{A42F1470-7801-4A19-BCA3-08AF24F3BFC5}" - ProjectSection(SolutionItems) = preProject - .github\workflows\ci.yml = .github\workflows\ci.yml - .github\workflows\CreateRelease.yml = .github\workflows\CreateRelease.yml - EndProjectSection -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Linq.Dynamic.Core.Tests.Net5", "test\System.Linq.Dynamic.Core.Tests.Net5\System.Linq.Dynamic.Core.Tests.Net5.csproj", "{2AC8773A-FCDD-4613-8758-E45E5F10CA3A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Linq.Dynamic.Core.Tests.Net6", "test\System.Linq.Dynamic.Core.Tests.Net6\System.Linq.Dynamic.Core.Tests.Net6.csproj", "{EDAB46DA-7079-42D7-819D-1932C542872F}" @@ -514,26 +506,6 @@ Global {060F5395-623F-464F-9C84-120E9496CBBA}.Release|x64.Build.0 = Release|Any CPU {060F5395-623F-464F-9C84-120E9496CBBA}.Release|x86.ActiveCfg = Release|Any CPU {060F5395-623F-464F-9C84-120E9496CBBA}.Release|x86.Build.0 = Release|Any CPU - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|Any CPU.ActiveCfg = Debug|x86 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|ARM.ActiveCfg = Debug|ARM - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|ARM.Build.0 = Debug|ARM - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|ARM.Deploy.0 = Debug|ARM - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x64.ActiveCfg = Debug|x64 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x64.Build.0 = Debug|x64 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x64.Deploy.0 = Debug|x64 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x86.ActiveCfg = Debug|x86 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x86.Build.0 = Debug|x86 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Debug|x86.Deploy.0 = Debug|x86 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|Any CPU.ActiveCfg = Release|x86 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|ARM.ActiveCfg = Release|ARM - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|ARM.Build.0 = Release|ARM - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|ARM.Deploy.0 = Release|ARM - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x64.ActiveCfg = Release|x64 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x64.Build.0 = Release|x64 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x64.Deploy.0 = Release|x64 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x86.ActiveCfg = Release|x86 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x86.Build.0 = Release|x86 - {C7020A29-724F-40D3-9493-E6E9C018DE57}.Release|x86.Deploy.0 = Release|x86 {C530A693-66FD-48A9-B42A-D613BB4CB754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C530A693-66FD-48A9-B42A-D613BB4CB754}.Debug|Any CPU.Build.0 = Debug|Any CPU {C530A693-66FD-48A9-B42A-D613BB4CB754}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -1136,7 +1108,6 @@ Global {D3804228-91F4-4502-9595-39584E519901} = {DBD7D9B6-FCC7-4650-91AF-E6457573A68F} {B3D1A89E-CE12-4A0D-B23E-8970D681C719} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62} {060F5395-623F-464F-9C84-120E9496CBBA} = {ECA5702B-5D32-4888-A34E-9461FC533F23} - {C7020A29-724F-40D3-9493-E6E9C018DE57} = {ECA5702B-5D32-4888-A34E-9461FC533F23} {C530A693-66FD-48A9-B42A-D613BB4CB754} = {ECA5702B-5D32-4888-A34E-9461FC533F23} {1D30F4EB-3CD9-446C-BDFB-107F79F05BBC} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62} {38FDDF50-5F86-4B6D-9062-F687C6FD41A8} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62} @@ -1146,7 +1117,6 @@ Global {D28F6393-B56B-40A2-AF67-E8D669F42546} = {DBD7D9B6-FCC7-4650-91AF-E6457573A68F} {4CC563F6-5352-4A77-A8C0-DC0D77A71DBB} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62} {C206917D-6E90-4A31-8533-AF2DD68FF738} = {7971CAEB-B9F2-416B-966D-2D697C4C1E62} - {A42F1470-7801-4A19-BCA3-08AF24F3BFC5} = {25E69107-C89E-4807-AA31-C49423F0F1E3} {2AC8773A-FCDD-4613-8758-E45E5F10CA3A} = {8463ED7E-69FB-49AE-85CF-0791AFD98E38} {EDAB46DA-7079-42D7-819D-1932C542872F} = {8463ED7E-69FB-49AE-85CF-0791AFD98E38} {B133DA55-339D-4600-AED3-46214AD9F08A} = {122BC4FA-7563-4E35-9D17-077F16F1629F} diff --git a/src-console/ConsoleAppEF3.1_nhibernate/ConsoleApp_netcore3.1_nhibernate.csproj b/src-console/ConsoleAppEF3.1_nhibernate/ConsoleApp_netcore3.1_nhibernate.csproj index b3cbc7eac..b69ec263f 100644 --- a/src-console/ConsoleAppEF3.1_nhibernate/ConsoleApp_netcore3.1_nhibernate.csproj +++ b/src-console/ConsoleAppEF3.1_nhibernate/ConsoleApp_netcore3.1_nhibernate.csproj @@ -16,7 +16,7 @@ - + diff --git a/src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs b/src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs index 68bd90a09..6802b0cb3 100644 --- a/src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs +++ b/src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableExtensions.cs @@ -956,7 +956,7 @@ public static Task SumAsync([NotNull] this IQueryable source, Cancellat #region Private Helpers private static readonly MethodInfo _executeAsyncMethod = typeof(EntityFrameworkDynamicQueryableExtensions) -#if NETSTANDARD || UAP10_0 +#if NETSTANDARD .GetMethods(BindingFlags.Static | BindingFlags.NonPublic) .Single(m => m.Name == nameof(ExecuteAsync) && m.GetParameters().Select(p => p.ParameterType).SequenceEqual(new[] { typeof(MethodInfo), typeof(IQueryable), typeof(CancellationToken) })); #else @@ -1007,7 +1007,7 @@ private static Task ExecuteAsync(MethodInfo operatorMethodInfo private static readonly MethodInfo _executeAsyncMethodWithExpression = typeof(EntityFrameworkDynamicQueryableExtensions) -#if NETSTANDARD || UAP10_0 +#if NETSTANDARD .GetMethods(BindingFlags.Static | BindingFlags.NonPublic) .Single(m => m.Name == nameof(ExecuteAsync) && m.GetParameters().Select(p => p.ParameterType).SequenceEqual(new[] { typeof(MethodInfo), typeof(IQueryable), typeof(Expression), typeof(CancellationToken) })); #else @@ -1102,13 +1102,11 @@ private static Expression OptimizeExpression(Expression expression) { var optimized = ExtensibilityPoint.QueryOptimizer(expression); -#if !(SILVERLIGHT) if (optimized != expression) { TraceSource.TraceEvent(TraceEventType.Verbose, 0, "Expression before : {0}", expression); TraceSource.TraceEvent(TraceEventType.Verbose, 0, "Expression after : {0}", optimized); } -#endif return optimized; } diff --git a/src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableWithFormattableStringExtensions.cs b/src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableWithFormattableStringExtensions.cs index ae2506104..59859a36d 100644 --- a/src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableWithFormattableStringExtensions.cs +++ b/src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/EFDynamicQueryableWithFormattableStringExtensions.cs @@ -23,7 +23,7 @@ namespace Microsoft.EntityFrameworkCore.DynamicLinq namespace EntityFramework.DynamicLinq #endif { -#if EFCORE || (NET46_OR_GREATER || NET5_0_OR_GREATER || NETCOREAPP2_1_OR_GREATER || NETSTANDARD1_3_OR_GREATER || UAP10_0) +#if EFCORE || NET46_OR_GREATER || NET5_0_OR_GREATER || NETCOREAPP2_1_OR_GREATER || NETSTANDARD1_3_OR_GREATER public static class EFDynamicQueryableWithFormattableStringExtensions { diff --git a/src/System.Linq.Dynamic.Core/AssemblyBuilderFactory.cs b/src/System.Linq.Dynamic.Core/AssemblyBuilderFactory.cs index 8717004db..aaa1eaf6b 100644 --- a/src/System.Linq.Dynamic.Core/AssemblyBuilderFactory.cs +++ b/src/System.Linq.Dynamic.Core/AssemblyBuilderFactory.cs @@ -1,5 +1,4 @@ -#if !UAP10_0 -using System.Reflection; +using System.Reflection; using System.Reflection.Emit; namespace System.Linq.Dynamic.Core @@ -14,7 +13,7 @@ internal static class AssemblyBuilderFactory /// An object that represents the new assembly. public static AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) { -#if (NET35 || NET40 || SILVERLIGHT) +#if NET35 || NET40 return AppDomain.CurrentDomain.DefineDynamicAssembly(name, access); #else return AssemblyBuilder.DefineDynamicAssembly(name, access); @@ -22,4 +21,3 @@ public static AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyB } } } -#endif \ No newline at end of file diff --git a/src/System.Linq.Dynamic.Core/Compatibility/CodeAnalysis/NotNullWhenAttribute.cs b/src/System.Linq.Dynamic.Core/Compatibility/CodeAnalysis/NotNullWhenAttribute.cs index 64c73cb6b..13ee236c0 100644 --- a/src/System.Linq.Dynamic.Core/Compatibility/CodeAnalysis/NotNullWhenAttribute.cs +++ b/src/System.Linq.Dynamic.Core/Compatibility/CodeAnalysis/NotNullWhenAttribute.cs @@ -22,7 +22,7 @@ // SOFTWARE. #endregion -#if NETSTANDARD1_3 || NETSTANDARD2_0 || NET35 || NET40 || NET45 || NET452 || NET46 || NETCOREAPP2_1 || UAP10_0 +#if NETSTANDARD1_3 || NETSTANDARD2_0 || NET35 || NET40 || NET45 || NET452 || NET46 || NETCOREAPP2_1 // ReSharper disable once CheckNamespace namespace System.Diagnostics.CodeAnalysis; diff --git a/src/System.Linq.Dynamic.Core/Compatibility/CustomIntrospectionExtensions.cs b/src/System.Linq.Dynamic.Core/Compatibility/CustomIntrospectionExtensions.cs index 7b3ec3eea..2c59ba03d 100644 --- a/src/System.Linq.Dynamic.Core/Compatibility/CustomIntrospectionExtensions.cs +++ b/src/System.Linq.Dynamic.Core/Compatibility/CustomIntrospectionExtensions.cs @@ -7,11 +7,11 @@ namespace System.Reflection /// https://github.com/castleproject/Core/blob/netcore/src/Castle.Core/Compatibility/IntrospectionExtensions.cs /// internal static class CustomIntrospectionExtensions - { -#if NET35 || NET40 || PORTABLE || SILVERLIGHT || WPSL - // This allows us to use the new reflection API which separates Type and TypeInfo - // while still supporting .NET 3.5 and 4.0. This class matches the API of the same - // class in .NET 4.5+, and so is only needed on .NET Framework versions before that. + { +#if NET35 || NET40 || PORTABLE + // This allows us to use the new reflection API which separates Type and TypeInfo + // while still supporting .NET 3.5 and 4.0. This class matches the API of the same + // class in .NET 4.5+, and so is only needed on .NET Framework versions before that. // // Return the System.Type for now, we will probably need to create a TypeInfo class // which inherits from Type like .NET 4.5+ and implement the additional methods and diff --git a/src/System.Linq.Dynamic.Core/Compatibility/CustomTypeBuilderExtensions.cs b/src/System.Linq.Dynamic.Core/Compatibility/CustomTypeBuilderExtensions.cs index 528492beb..27046f332 100644 --- a/src/System.Linq.Dynamic.Core/Compatibility/CustomTypeBuilderExtensions.cs +++ b/src/System.Linq.Dynamic.Core/Compatibility/CustomTypeBuilderExtensions.cs @@ -5,14 +5,14 @@ namespace System.Reflection { internal static class CustomTypeBuilderExtensions { -#if !(NET35 || NET40 || SILVERLIGHT || WPSL || UAP10_0) +#if !(NET35 || NET40) public static Type CreateType(this TypeBuilder tb) { return tb.CreateTypeInfo().AsType(); } #endif -#if NET35 || NET40 || SILVERLIGHT || WPSL || NETCOREAPP || NETSTANDARD2_1 +#if NET35 || NET40 || NETCOREAPP || NETSTANDARD2_1 public static PropertyBuilder DefineProperty(this TypeBuilder tb, string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) { return tb.DefineProperty(name, attributes, returnType, parameterTypes); diff --git a/src/System.Linq.Dynamic.Core/Compatibility/CustomTypeConverterExtensions.cs b/src/System.Linq.Dynamic.Core/Compatibility/CustomTypeConverterExtensions.cs deleted file mode 100644 index a533c7bfe..000000000 --- a/src/System.Linq.Dynamic.Core/Compatibility/CustomTypeConverterExtensions.cs +++ /dev/null @@ -1,18 +0,0 @@ -#if SILVERLIGHT -namespace System.ComponentModel -{ - internal static class CustomTypeConverterExtensions - { - /// - /// Converts the given string to the type of this converter. - /// - /// The System.ComponentModel.TypeConverter - /// The System.String to convert - /// An System.Object that represents the converted text. - public static object ConvertFromInvariantString(this TypeConverter typeConverter, string text) - { - return typeConverter.ConvertFromString(text); - } - } -} -#endif diff --git a/src/System.Linq.Dynamic.Core/Compatibility/TypeExtensions.cs b/src/System.Linq.Dynamic.Core/Compatibility/TypeExtensions.cs index b7ce2fbc2..5cc01f020 100644 --- a/src/System.Linq.Dynamic.Core/Compatibility/TypeExtensions.cs +++ b/src/System.Linq.Dynamic.Core/Compatibility/TypeExtensions.cs @@ -1,4 +1,4 @@ -#if NETSTANDARD1_3 || UAP10_0 +#if NETSTANDARD1_3 using System.Linq; namespace System.Reflection; diff --git a/src/System.Linq.Dynamic.Core/CustomTypeProviders/AbstractDynamicLinqCustomTypeProvider.cs b/src/System.Linq.Dynamic.Core/CustomTypeProviders/AbstractDynamicLinqCustomTypeProvider.cs index 370ac3496..d9f328983 100644 --- a/src/System.Linq.Dynamic.Core/CustomTypeProviders/AbstractDynamicLinqCustomTypeProvider.cs +++ b/src/System.Linq.Dynamic.Core/CustomTypeProviders/AbstractDynamicLinqCustomTypeProvider.cs @@ -73,7 +73,7 @@ protected Type[] FindTypesMarkedWithDynamicLinqTypeAttribute(IEnumerable t.FullName == firstMatchingFullname); } -#if (UAP10_0 || NETSTANDARD) +#if NETSTANDARD /// /// Gets the assembly types annotated with in an Exception friendly way. /// diff --git a/src/System.Linq.Dynamic.Core/DefaultAssemblyHelper.cs b/src/System.Linq.Dynamic.Core/DefaultAssemblyHelper.cs index 0c081407f..3575c010d 100644 --- a/src/System.Linq.Dynamic.Core/DefaultAssemblyHelper.cs +++ b/src/System.Linq.Dynamic.Core/DefaultAssemblyHelper.cs @@ -11,7 +11,7 @@ internal class DefaultAssemblyHelper(ParsingConfig parsingConfig) : IAssemblyHel public Assembly[] GetAssemblies() { -#if UAP10_0 || NETSTANDARD || WPSL +#if NETSTANDARD throw new NotSupportedException(); #elif NET35 return AppDomain.CurrentDomain.GetAssemblies(); diff --git a/src/System.Linq.Dynamic.Core/DynamicClass.cs b/src/System.Linq.Dynamic.Core/DynamicClass.cs index 64685f5e4..c4870b7eb 100644 --- a/src/System.Linq.Dynamic.Core/DynamicClass.cs +++ b/src/System.Linq.Dynamic.Core/DynamicClass.cs @@ -1,4 +1,4 @@ -#if !UAP10_0 && !NET35 +#if !NET35 using System.Collections.Generic; using System.Dynamic; using System.Reflection; diff --git a/src/System.Linq.Dynamic.Core/DynamicClass.uap.cs b/src/System.Linq.Dynamic.Core/DynamicClass.uap.cs deleted file mode 100644 index cf28afd3c..000000000 --- a/src/System.Linq.Dynamic.Core/DynamicClass.uap.cs +++ /dev/null @@ -1,122 +0,0 @@ -#if UAP10_0 -using System.Collections.Generic; -using System.Dynamic; -using System.Runtime.CompilerServices; - -namespace System.Linq.Dynamic.Core; - -/// -/// Provides a base class for dynamic objects for UAP10_0. -/// -public class DynamicClass : DynamicObject -{ - internal const string IndexerName = "System_Linq_Dynamic_Core_DynamicClass_Indexer"; - - private readonly Dictionary _properties = new(); - - /// - /// Initializes a new instance of the class. - /// - /// The propertylist. - public DynamicClass(params KeyValuePair[] propertylist) - { - foreach (var kvp in propertylist) - { - _properties.Add(kvp.Key, kvp.Value); - } - } - - /// - /// Gets or sets the with the specified name. - /// - /// - /// The . - /// - /// The name. - /// Value from the property. - [IndexerName(IndexerName)] - public object? this[string name] - { - get - { - if (_properties.TryGetValue(name, out object result)) - { - return result; - } - - return null; - } - set - { - if (_properties.ContainsKey(name)) - { - _properties[name] = value; - } - else - { - _properties.Add(name, value); - } - } - } - - /// - /// Determines whether a property with the specified name exists in the collection. - /// - /// The name of the property to locate. Cannot be null. - /// true if a property with the specified name exists; otherwise, false. - public bool ContainsProperty(string name) - { - return _properties.ContainsKey(name); - } - - /// - /// Returns the enumeration of all dynamic member names. - /// - /// - /// A sequence that contains dynamic member names. - /// - public override IEnumerable GetDynamicMemberNames() - { - return _properties.Keys; - } - - /// - /// Provides the implementation for operations that get member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as getting a value for a property. - /// - /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. - /// The result of the get operation. For example, if the method is called for a property, you can assign the property value to . - /// - /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a run-time exception is thrown.) - /// - public override bool TryGetMember(GetMemberBinder binder, out object result) - { - var name = binder.Name; - _properties.TryGetValue(name, out result); - - return true; - } - - /// - /// Provides the implementation for operations that set member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as setting a value for a property. - /// - /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member to which the value is being assigned. For example, for the statement sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. - /// The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, the is "Test". - /// - /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.) - /// - public override bool TrySetMember(SetMemberBinder binder, object value) - { - string name = binder.Name; - if (_properties.ContainsKey(name)) - { - _properties[name] = value; - } - else - { - _properties.Add(name, value); - } - - return true; - } -} -#endif \ No newline at end of file diff --git a/src/System.Linq.Dynamic.Core/DynamicClassFactory.cs b/src/System.Linq.Dynamic.Core/DynamicClassFactory.cs index 6c70dcbee..0c8955c04 100644 --- a/src/System.Linq.Dynamic.Core/DynamicClassFactory.cs +++ b/src/System.Linq.Dynamic.Core/DynamicClassFactory.cs @@ -1,5 +1,4 @@ -#if !UAP10_0 -using System.Collections; +using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; @@ -29,7 +28,7 @@ public static class DynamicClassFactory private static readonly ConstructorInfo ObjectCtor = typeof(object).GetConstructor(Type.EmptyTypes)!; private static readonly ConstructorInfo StringBuilderCtor = typeof(StringBuilder).GetConstructor(Type.EmptyTypes)!; -#if UAP10_0 || NETSTANDARD +#if NETSTANDARD private static readonly MethodInfo StringBuilderAppendString = typeof(StringBuilder).GetMethod(nameof(StringBuilder.Append), [typeof(string)])!; private static readonly MethodInfo StringBuilderAppendObject = typeof(StringBuilder).GetMethod(nameof(StringBuilder.Append), [typeof(object)])!; #else @@ -551,4 +550,3 @@ internal static void ClearGeneratedTypes() } } } -#endif \ No newline at end of file diff --git a/src/System.Linq.Dynamic.Core/DynamicGetMemberBinder.cs b/src/System.Linq.Dynamic.Core/DynamicGetMemberBinder.cs index cbc8542a9..7f49e380d 100644 --- a/src/System.Linq.Dynamic.Core/DynamicGetMemberBinder.cs +++ b/src/System.Linq.Dynamic.Core/DynamicGetMemberBinder.cs @@ -1,4 +1,4 @@ -#if !NET35 && !UAP10_0 && !NETSTANDARD1_3 +#if !NET35 && !NETSTANDARD1_3 using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/src/System.Linq.Dynamic.Core/DynamicQueryableExtensions.cs b/src/System.Linq.Dynamic.Core/DynamicQueryableExtensions.cs index e15ecdc82..59eddaf31 100644 --- a/src/System.Linq.Dynamic.Core/DynamicQueryableExtensions.cs +++ b/src/System.Linq.Dynamic.Core/DynamicQueryableExtensions.cs @@ -10,9 +10,7 @@ using System.Linq.Dynamic.Core.Parser; using System.Linq.Dynamic.Core.Util; -#if !(SILVERLIGHT) using System.Diagnostics; -#endif namespace System.Linq.Dynamic.Core { @@ -24,9 +22,7 @@ namespace System.Linq.Dynamic.Core [SuppressMessage("ReSharper", "PossibleMultipleEnumeration")] public static class DynamicQueryableExtensions { -#if !SILVERLIGHT private static readonly TraceSource TraceSource = new(nameof(DynamicQueryableExtensions)); -#endif private static Expression OptimizeExpression(Expression expression) { @@ -34,13 +30,11 @@ private static Expression OptimizeExpression(Expression expression) { var optimized = ExtensibilityPoint.QueryOptimizer(expression); -#if !SILVERLIGHT if (optimized != expression) { TraceSource.TraceEvent(TraceEventType.Verbose, 0, "Expression before : {0}", expression); TraceSource.TraceEvent(TraceEventType.Verbose, 0, "Expression after : {0}", optimized); } -#endif return optimized; } @@ -1628,12 +1622,8 @@ internal static IOrderedQueryable InternalOrderBy(IQueryable source, ParsingConf } else { -#if !UAP10_0 var newType = DynamicClassFactory.CreateGenericComparerType(comparerGenericType, comparer.GetType()); constant = Expression.Constant(Activator.CreateInstance(newType), comparerGenericType); -#else - constant = Expression.Constant(comparer, comparerGenericType); -#endif } queryExpr = Expression.Call( diff --git a/src/System.Linq.Dynamic.Core/DynamicQueryableWithFormattableStringExtensions.cs b/src/System.Linq.Dynamic.Core/DynamicQueryableWithFormattableStringExtensions.cs index e81ad188a..be4edbf59 100644 --- a/src/System.Linq.Dynamic.Core/DynamicQueryableWithFormattableStringExtensions.cs +++ b/src/System.Linq.Dynamic.Core/DynamicQueryableWithFormattableStringExtensions.cs @@ -6,7 +6,7 @@ namespace System.Linq.Dynamic.Core; -#if NET46_OR_GREATER || NET5_0_OR_GREATER || NETCOREAPP2_1_OR_GREATER || NETSTANDARD1_3_OR_GREATER || UAP10_0 +#if NET46_OR_GREATER || NET5_0_OR_GREATER || NETCOREAPP2_1_OR_GREATER || NETSTANDARD1_3_OR_GREATER /// /// Provides a set of static extension methods for querying data structures that implement . /// It supports a FormattableString string as predicate. diff --git a/src/System.Linq.Dynamic.Core/Exceptions/ParseException.cs b/src/System.Linq.Dynamic.Core/Exceptions/ParseException.cs index 42cca6700..e8ff7e19d 100644 --- a/src/System.Linq.Dynamic.Core/Exceptions/ParseException.cs +++ b/src/System.Linq.Dynamic.Core/Exceptions/ParseException.cs @@ -1,6 +1,6 @@ using System.Globalization; -#if !(SILVERLIGHT || WINDOWS_APP || UAP10_0 || NETSTANDARD || PORTABLE || WPSL) +#if !(WINDOWS_APP || NETSTANDARD || PORTABLE) using System.Runtime.Serialization; #endif @@ -9,7 +9,7 @@ namespace System.Linq.Dynamic.Core.Exceptions; /// /// Represents errors that occur while parsing dynamic linq string expressions. /// -#if !(SILVERLIGHT || UAP10_0 || NETSTANDARD || PORTABLE || WPSL || NETSTANDARD2_0) +#if !(NETSTANDARD || PORTABLE || NETSTANDARD2_0) [Serializable] #endif public sealed class ParseException : Exception @@ -63,7 +63,7 @@ public override string ToString() return text; } -#if !(SILVERLIGHT || UAP10_0 || NETSTANDARD || PORTABLE || WPSL || NETSTANDARD2_0) +#if !(NETSTANDARD || PORTABLE || NETSTANDARD2_0) private ParseException(SerializationInfo info, StreamingContext context) : base(info, context) { Position = (int)info.GetValue("position", typeof(int))!; diff --git a/src/System.Linq.Dynamic.Core/GroupResult.cs b/src/System.Linq.Dynamic.Core/GroupResult.cs index 591911dab..810408486 100644 --- a/src/System.Linq.Dynamic.Core/GroupResult.cs +++ b/src/System.Linq.Dynamic.Core/GroupResult.cs @@ -12,7 +12,7 @@ public class GroupResult /// /// The key value of the group. /// -#if NET35 || SILVERLIGHT +#if NET35 public object Key { get; internal set; } = null!; #else public dynamic Key { get; internal set; } = null!; diff --git a/src/System.Linq.Dynamic.Core/Parser/ConstantExpressionWrapper.cs b/src/System.Linq.Dynamic.Core/Parser/ConstantExpressionWrapper.cs index 97db08bc5..c8c95eeac 100644 --- a/src/System.Linq.Dynamic.Core/Parser/ConstantExpressionWrapper.cs +++ b/src/System.Linq.Dynamic.Core/Parser/ConstantExpressionWrapper.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; -#if UAP10_0 || NETSTANDARD1_3 +#if NETSTANDARD1_3 using System.Reflection; #endif diff --git a/src/System.Linq.Dynamic.Core/Parser/ExpressionHelper.cs b/src/System.Linq.Dynamic.Core/Parser/ExpressionHelper.cs index f4c389d71..01aa15520 100644 --- a/src/System.Linq.Dynamic.Core/Parser/ExpressionHelper.cs +++ b/src/System.Linq.Dynamic.Core/Parser/ExpressionHelper.cs @@ -353,7 +353,7 @@ public bool MemberExpressionIsDynamic(Expression expression) public Expression ConvertToExpandoObjectAndCreateDynamicExpression(Expression expression, Type type, string propertyName) { -#if !NET35 && !UAP10_0 && !NETSTANDARD1_3 +#if !NET35 && !NETSTANDARD1_3 return Expression.Dynamic(new DynamicGetMemberBinder(propertyName, _parsingConfig), type, expression); #else throw new NotSupportedException(Res.DynamicExpandoObjectIsNotSupported); diff --git a/src/System.Linq.Dynamic.Core/Parser/ExpressionParser.cs b/src/System.Linq.Dynamic.Core/Parser/ExpressionParser.cs index add680a58..491d3796d 100644 --- a/src/System.Linq.Dynamic.Core/Parser/ExpressionParser.cs +++ b/src/System.Linq.Dynamic.Core/Parser/ExpressionParser.cs @@ -1645,32 +1645,7 @@ private Expression CreateNewExpression(List properties, List); - - ConstructorInfo constructorForKeyValuePair = typeForKeyValuePair.GetTypeInfo().DeclaredConstructors.First(); - - var arrayIndexParams = new List(); - for (int i = 0; i < expressions.Count; i++) - { - // Just convert the expression always to an object expression. - UnaryExpression boxingExpression = Expression.Convert(expressions[i], typeof(object)); - NewExpression parameter = Expression.New(constructorForKeyValuePair, (Expression)Expression.Constant(properties[i].Name), boxingExpression); - - arrayIndexParams.Add(parameter); - } - - // Create an expression tree that represents creating and initializing a one-dimensional array of type KeyValuePair. - NewArrayExpression newArrayExpression = Expression.NewArrayInit(typeof(KeyValuePair), arrayIndexParams); - - // Get the "public DynamicClass(KeyValuePair[])" constructor - ConstructorInfo constructor = type.GetTypeInfo().DeclaredConstructors.First(); - - return Expression.New(constructor, newArrayExpression); -#else type = DynamicClassFactory.CreateType(properties, _createParameterCtor); -#endif } // Option 1. Try to bind via properties (TODO : investigate if this code block is 100% correct and is needed) @@ -2056,7 +2031,7 @@ private Expression ParseMemberAccess(Type? type, Expression? expression, string? return Expression.Constant(enumValue); } -#if UAP10_0 || NETSTANDARD1_3 +#if NETSTANDARD1_3 if (type == typeof(DynamicClass)) { return Expression.MakeIndex(expression!, typeof(DynamicClass).GetProperty(DynamicClass.IndexerName), [Expression.Constant(id)]); @@ -2105,7 +2080,7 @@ private Expression ParseMemberAccess(Type? type, Expression? expression, string? } } -#if !NET35 && !UAP10_0 && !NETSTANDARD1_3 +#if !NET35 && !NETSTANDARD1_3 if (type == typeof(object)) { // The member is a dynamic or ExpandoObject, so convert this @@ -2609,14 +2584,6 @@ private static bool TryGetMemberName(Expression expression, out string? memberNa return true; } -#if NETFX_CORE - var indexExpression = expression as IndexExpression; - if (indexExpression != null && indexExpression.Indexer.DeclaringType == typeof(DynamicObjectClass)) - { - memberName = ((ConstantExpression)indexExpression.Arguments.First()).Value as string; - return true; - } -#endif memberName = null; return false; } @@ -2723,7 +2690,7 @@ private static Exception IncompatibleOperandsError(string opName, Expression lef private MemberInfo? FindPropertyOrField(Type type, string memberName, bool staticAccess) { -#if !(UAP10_0 || NETSTANDARD) +#if !NETSTANDARD var extraBindingFlag = _parsingConfig.PrioritizePropertyOrFieldOverTheType && staticAccess ? BindingFlags.Static : BindingFlags.Instance | BindingFlags.Static; var bindingFlags = BindingFlags.Public | BindingFlags.DeclaredOnly | extraBindingFlag; foreach (Type t in TypeHelper.GetSelfAndBaseTypes(type)) diff --git a/src/System.Linq.Dynamic.Core/Parser/ExpressionPromoter.cs b/src/System.Linq.Dynamic.Core/Parser/ExpressionPromoter.cs index c82c13f98..d6c450563 100644 --- a/src/System.Linq.Dynamic.Core/Parser/ExpressionPromoter.cs +++ b/src/System.Linq.Dynamic.Core/Parser/ExpressionPromoter.cs @@ -60,7 +60,7 @@ public ExpressionPromoter(ParsingConfig config) Type target = TypeHelper.GetNonNullableType(type); object? value = null; -#if !(UAP10_0 || NETSTANDARD) +#if !NETSTANDARD switch (Type.GetTypeCode(ce.Type)) { case TypeCode.Int32: diff --git a/src/System.Linq.Dynamic.Core/Parser/NumberParser.cs b/src/System.Linq.Dynamic.Core/Parser/NumberParser.cs index f4bbc7311..db9cb8570 100644 --- a/src/System.Linq.Dynamic.Core/Parser/NumberParser.cs +++ b/src/System.Linq.Dynamic.Core/Parser/NumberParser.cs @@ -206,7 +206,7 @@ public bool TryParseNumber(string text, Type type, out object? result) { try { -#if !(UAP10_0 || NETSTANDARD) +#if !NETSTANDARD switch (Type.GetTypeCode(TypeHelper.GetNonNullableType(type))) { case TypeCode.SByte: diff --git a/src/System.Linq.Dynamic.Core/Parser/SupportedMethods/MethodFinder.cs b/src/System.Linq.Dynamic.Core/Parser/SupportedMethods/MethodFinder.cs index 41ee4aa85..ad181ea8c 100644 --- a/src/System.Linq.Dynamic.Core/Parser/SupportedMethods/MethodFinder.cs +++ b/src/System.Linq.Dynamic.Core/Parser/SupportedMethods/MethodFinder.cs @@ -87,7 +87,7 @@ public bool ContainsMethod(Type type, string methodName, bool staticAccess = tru { Check.NotNull(type); -#if !(UAP10_0 || NETSTANDARD) +#if !NETSTANDARD var flags = BindingFlags.Public | BindingFlags.DeclaredOnly | (staticAccess ? BindingFlags.Static : BindingFlags.Instance); return type.FindMembers(MemberTypes.Method, flags, Type.FilterNameIgnoreCase, methodName).Any(); #else @@ -107,7 +107,7 @@ public bool ContainsMethod(Type type, string methodName, bool staticAccess, Expr public int FindMethod(Type? type, string methodName, bool staticAccess, ref Expression? instance, ref Expression[] args, out MethodBase? method) { -#if !(UAP10_0 || NETSTANDARD) +#if !NETSTANDARD BindingFlags flags = BindingFlags.Public | BindingFlags.DeclaredOnly | (staticAccess ? BindingFlags.Static : BindingFlags.Instance); foreach (Type t in SelfAndBaseTypes(type)) { @@ -233,7 +233,7 @@ public int FindIndexer(Type type, Expression[] args, out MethodBase? method) if (members.Length != 0) { IEnumerable methods = members.OfType(). -#if !(UAP10_0 || NETSTANDARD) +#if !NETSTANDARD Select(p => (MethodBase?)p.GetGetMethod()). OfType(); #else diff --git a/src/System.Linq.Dynamic.Core/Parser/TypeHelper.cs b/src/System.Linq.Dynamic.Core/Parser/TypeHelper.cs index fd2009302..864c9fcb8 100644 --- a/src/System.Linq.Dynamic.Core/Parser/TypeHelper.cs +++ b/src/System.Linq.Dynamic.Core/Parser/TypeHelper.cs @@ -71,7 +71,7 @@ public static bool TryFindGenericType(Type generic, Type? type, [NotNullWhen(tru public static bool IsCompatibleWith(Type source, Type target) { -#if !(UAP10_0 || NETSTANDARD) +#if !NETSTANDARD if (source == target) { return true; @@ -386,7 +386,7 @@ private static int GetNumericTypeKind(Type type) { type = GetNonNullableType(type); -#if !(UAP10_0 || NETSTANDARD) +#if !NETSTANDARD if (type.GetTypeInfo().IsEnum) { return 0; diff --git a/src/System.Linq.Dynamic.Core/ParsingConfig.cs b/src/System.Linq.Dynamic.Core/ParsingConfig.cs index 300ff594a..731d460e4 100644 --- a/src/System.Linq.Dynamic.Core/ParsingConfig.cs +++ b/src/System.Linq.Dynamic.Core/ParsingConfig.cs @@ -58,7 +58,7 @@ public IDynamicLinqCustomTypeProvider? CustomTypeProvider { get { -#if !(UAP10_0 || NETSTANDARD) +#if !NETSTANDARD // Only use DefaultDynamicLinqCustomTypeProvider for full .NET Framework and .NET Core App 2.x and higher. return _customTypeProvider ??= new DefaultDynamicLinqCustomTypeProvider(this); #else diff --git a/src/System.Linq.Dynamic.Core/Res.cs b/src/System.Linq.Dynamic.Core/Res.cs index 3d4234957..ac791eb07 100644 --- a/src/System.Linq.Dynamic.Core/Res.cs +++ b/src/System.Linq.Dynamic.Core/Res.cs @@ -19,7 +19,7 @@ internal static class Res public const string DotExpected = "'.' expected"; public const string DotOrOpenParenExpected = "'.' or '(' expected"; public const string DotOrOpenParenOrStringLiteralExpected = "'.' or '(' or string literal expected"; - public const string DynamicExpandoObjectIsNotSupported = "Dynamic / ExpandoObject is not supported in .NET 3.5, UAP and .NETStandard 1.3"; + public const string DynamicExpandoObjectIsNotSupported = "Dynamic / ExpandoObject is not supported in .NET 3.5 and .NETStandard 1.3"; public const string DuplicateIdentifier = "The identifier '{0}' was defined more than once"; public const string EnumTypeNotFound = "Enum type '{0}' not found"; public const string EnumValueExpected = "Enum value expected"; diff --git a/src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj b/src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj index 15734595b..dceaacfb7 100644 --- a/src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj +++ b/src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj @@ -1,4 +1,4 @@ - + @@ -9,7 +9,7 @@ This is a .NETStandard / .NET Core port of the the Microsoft assembly for the .Net 4.0 Dynamic language functionality. system;linq;dynamic;core;dotnet;NETCoreApp;NETStandard {D3804228-91F4-4502-9595-39584E510002} - net35;net40;net45;net452;net46;netstandard1.3;netstandard2.0;netstandard2.1;uap10.0;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0 + net35;net40;net45;net452;net46;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0 1.7.$(PatchVersion) @@ -26,10 +26,6 @@ true - - net35;net40;net45;net452;net46;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0 - - $(DefineConstants);NETSTANDARD @@ -38,18 +34,6 @@ $(DefineConstants);ASYNCENUMERABLE - - false - UAP,Version=v10.0 - UAP - 10.0.19041.0 - 10.0.10240.0 - .NETCore - v5.0 - $(DefineConstants);WINDOWS_UWP;UAP10_0 - $(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets - - @@ -77,10 +61,4 @@ - - - - - - \ No newline at end of file diff --git a/src/System.Linq.Dynamic.Core/TypeConverters/TypeConverterFactory.cs b/src/System.Linq.Dynamic.Core/TypeConverters/TypeConverterFactory.cs index 7d3604c32..847403f93 100644 --- a/src/System.Linq.Dynamic.Core/TypeConverters/TypeConverterFactory.cs +++ b/src/System.Linq.Dynamic.Core/TypeConverters/TypeConverterFactory.cs @@ -37,21 +37,6 @@ public TypeConverter GetConverter(Type type) return typeConverter; } -#if !SILVERLIGHT return TypeDescriptor.GetConverter(type); -#else - var attributes = type.GetCustomAttributes(typeof(TypeConverterAttribute), false); - - if (attributes.Length != 1) - return new TypeConverter(); - - var converterAttribute = (TypeConverterAttribute)attributes[0]; - var converterType = Type.GetType(converterAttribute.ConverterTypeName); - - if (converterType == null) - return new TypeConverter(); - - return (TypeConverter) Activator.CreateInstance(converterType); -#endif } } \ No newline at end of file diff --git a/src/System.Linq.Dynamic.Core/Util/RuntimeInformationUtils.cs b/src/System.Linq.Dynamic.Core/Util/RuntimeInformationUtils.cs index 77e550329..9f2f56981 100644 --- a/src/System.Linq.Dynamic.Core/Util/RuntimeInformationUtils.cs +++ b/src/System.Linq.Dynamic.Core/Util/RuntimeInformationUtils.cs @@ -6,7 +6,7 @@ internal static class RuntimeInformationUtils static RuntimeInformationUtils() { -#if NET35 || NET40 || NET45 || NET452 || NET46 || UAP10_0 +#if NET35 || NET40 || NET45 || NET452 || NET46 IsBlazorWASM = false; #else IsBlazorWASM = diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/App.xaml b/test-xamarin/ExpressionSample/ExpressionSample.UWP/App.xaml deleted file mode 100644 index 5c8fb7499..000000000 --- a/test-xamarin/ExpressionSample/ExpressionSample.UWP/App.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/App.xaml.cs b/test-xamarin/ExpressionSample/ExpressionSample.UWP/App.xaml.cs deleted file mode 100644 index c41837330..000000000 --- a/test-xamarin/ExpressionSample/ExpressionSample.UWP/App.xaml.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.ApplicationModel; -using Windows.ApplicationModel.Activation; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -namespace ExpressionSample.UWP -{ - /// - /// Provides application-specific behavior to supplement the default Application class. - /// - sealed partial class App : Application - { - /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// - public App() - { - this.InitializeComponent(); - this.Suspending += OnSuspending; - } - - /// - /// Invoked when the application is launched normally by the end user. Other entry points - /// will be used such as when the application is launched to open a specific file. - /// - /// Details about the launch request and process. - protected override void OnLaunched(LaunchActivatedEventArgs e) - { -#if DEBUG - if (System.Diagnostics.Debugger.IsAttached) - { - this.DebugSettings.EnableFrameRateCounter = true; - } -#endif - - Frame rootFrame = Window.Current.Content as Frame; - - // Do not repeat app initialization when the Window already has content, - // just ensure that the window is active - if (rootFrame == null) - { - // Create a Frame to act as the navigation context and navigate to the first page - rootFrame = new Frame(); - - rootFrame.NavigationFailed += OnNavigationFailed; - - Xamarin.Forms.Forms.Init(e); - - if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - //TODO: Load state from previously suspended application - } - - // Place the frame in the current Window - Window.Current.Content = rootFrame; - } - - if (rootFrame.Content == null) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - rootFrame.Navigate(typeof(MainPage), e.Arguments); - } - // Ensure the current window is active - Window.Current.Activate(); - } - - /// - /// Invoked when Navigation to a certain page fails - /// - /// The Frame which failed navigation - /// Details about the navigation failure - void OnNavigationFailed(object sender, NavigationFailedEventArgs e) - { - throw new Exception("Failed to load Page " + e.SourcePageType.FullName); - } - - /// - /// Invoked when application execution is being suspended. Application state is saved - /// without knowing whether the application will be terminated or resumed with the contents - /// of memory still intact. - /// - /// The source of the suspend request. - /// Details about the suspend request. - private void OnSuspending(object sender, SuspendingEventArgs e) - { - var deferral = e.SuspendingOperation.GetDeferral(); - //TODO: Save application state and stop any background activity - deferral.Complete(); - } - } -} diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/LargeTile.scale-100.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/LargeTile.scale-100.png deleted file mode 100644 index c3e93b09c..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/LargeTile.scale-100.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/LargeTile.scale-200.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/LargeTile.scale-200.png deleted file mode 100644 index 2709372a2..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/LargeTile.scale-200.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/LargeTile.scale-400.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/LargeTile.scale-400.png deleted file mode 100644 index ff031995a..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/LargeTile.scale-400.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SmallTile.scale-100.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SmallTile.scale-100.png deleted file mode 100644 index 41108536a..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SmallTile.scale-100.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SmallTile.scale-200.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SmallTile.scale-200.png deleted file mode 100644 index c63509583..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SmallTile.scale-200.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SmallTile.scale-400.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SmallTile.scale-400.png deleted file mode 100644 index e28c05283..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SmallTile.scale-400.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SplashScreen.scale-100.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SplashScreen.scale-100.png deleted file mode 100644 index eacdf203d..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SplashScreen.scale-100.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SplashScreen.scale-200.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SplashScreen.scale-200.png deleted file mode 100644 index caa5fc9cb..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SplashScreen.scale-400.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SplashScreen.scale-400.png deleted file mode 100644 index 16d97844d..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/SplashScreen.scale-400.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square150x150Logo.scale-100.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square150x150Logo.scale-100.png deleted file mode 100644 index c1709f2b8..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square150x150Logo.scale-100.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square150x150Logo.scale-200.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index 48732ffe3..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square150x150Logo.scale-400.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square150x150Logo.scale-400.png deleted file mode 100644 index 95456beb9..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square150x150Logo.scale-400.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png deleted file mode 100644 index 0c6fd15fa..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png deleted file mode 100644 index 6635c80f6..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png deleted file mode 100644 index ee58ea6df..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.scale-100.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.scale-100.png deleted file mode 100644 index 06fc87c13..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.scale-100.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.scale-200.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index eaf27573f..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.scale-400.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.scale-400.png deleted file mode 100644 index 8a4ee54f9..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.scale-400.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.targetsize-16.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.targetsize-16.png deleted file mode 100644 index 0c6fd15fa..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.targetsize-16.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.targetsize-256.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.targetsize-256.png deleted file mode 100644 index 6635c80f6..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.targetsize-256.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.targetsize-48.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.targetsize-48.png deleted file mode 100644 index ee58ea6df..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Square44x44Logo.targetsize-48.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.backup.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.backup.png deleted file mode 100644 index a197aaf55..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.backup.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.scale-100.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.scale-100.png deleted file mode 100644 index 4fbbc70d8..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.scale-100.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.scale-200.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.scale-200.png deleted file mode 100644 index 29db5019f..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.scale-200.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.scale-400.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.scale-400.png deleted file mode 100644 index 383ad6e49..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/StoreLogo.scale-400.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Wide310x150Logo.scale-100.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Wide310x150Logo.scale-100.png deleted file mode 100644 index 476954a07..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Wide310x150Logo.scale-100.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Wide310x150Logo.scale-200.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index eacdf203d..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Wide310x150Logo.scale-400.png b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Wide310x150Logo.scale-400.png deleted file mode 100644 index caa5fc9cb..000000000 Binary files a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Assets/Wide310x150Logo.scale-400.png and /dev/null differ diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/ExpressionSample.UWP.csproj b/test-xamarin/ExpressionSample/ExpressionSample.UWP/ExpressionSample.UWP.csproj deleted file mode 100644 index f8aff5127..000000000 --- a/test-xamarin/ExpressionSample/ExpressionSample.UWP/ExpressionSample.UWP.csproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - - Debug - x86 - {C7020A29-724F-40D3-9493-E6E9C018DE57} - AppContainerExe - Properties - ExpressionSample.UWP - ExpressionSample.UWP - en-US - UAP - 10.0.18362.0 - 10.0.18362.0 - 14 - true - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - false - - - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM - false - prompt - true - - - bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM - false - prompt - true - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x64 - false - prompt - true - - - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x64 - false - prompt - true - true - - - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x86 - false - prompt - true - - - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x86 - false - prompt - true - true - - - - App.xaml - - - MainPage.xaml - - - - - - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - - - - - - {2B1797B7-A3CB-4405-A7D1-F44C378EBA4D} - ExpressionSample - - - - 14.0 - - - \ No newline at end of file diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/MainPage.xaml b/test-xamarin/ExpressionSample/ExpressionSample.UWP/MainPage.xaml deleted file mode 100644 index c6df4391c..000000000 --- a/test-xamarin/ExpressionSample/ExpressionSample.UWP/MainPage.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/MainPage.xaml.cs b/test-xamarin/ExpressionSample/ExpressionSample.UWP/MainPage.xaml.cs deleted file mode 100644 index ac1d58052..000000000 --- a/test-xamarin/ExpressionSample/ExpressionSample.UWP/MainPage.xaml.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -namespace ExpressionSample.UWP -{ - public sealed partial class MainPage - { - public MainPage() - { - this.InitializeComponent(); - - LoadApplication(new ExpressionSample.App()); - } - } -} diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Package.appxmanifest b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Package.appxmanifest deleted file mode 100644 index 20b7c3e62..000000000 --- a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Package.appxmanifest +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - ExpressionSample.UWP - a8155a52-88d7-4117-a5d4-94bd3aed151b - Assets\StoreLogo.png - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Properties/AssemblyInfo.cs b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Properties/AssemblyInfo.cs deleted file mode 100644 index b7a49ac2b..000000000 --- a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using 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. -[assembly: AssemblyTitle("ExpressionSample.UWP")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ExpressionSample.UWP")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 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: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Properties/Default.rd.xml b/test-xamarin/ExpressionSample/ExpressionSample.UWP/Properties/Default.rd.xml deleted file mode 100644 index 7c40ffeb1..000000000 --- a/test-xamarin/ExpressionSample/ExpressionSample.UWP/Properties/Default.rd.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-xamarin/WindowsUniversalTestApp14393/App.xaml b/test-xamarin/WindowsUniversalTestApp14393/App.xaml deleted file mode 100644 index a9b3e503c..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/App.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/test-xamarin/WindowsUniversalTestApp14393/App.xaml.cs b/test-xamarin/WindowsUniversalTestApp14393/App.xaml.cs deleted file mode 100644 index e5ce998bc..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/App.xaml.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Windows.ApplicationModel; -using Windows.ApplicationModel.Activation; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Navigation; -using System.Linq.Dynamic.Core; - -namespace WindowsUniversalTestApp14393 -{ - /// - /// Provides application-specific behavior to supplement the default Application class. - /// - sealed partial class App : Application - { - /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// - public App() - { - InitializeComponent(); - Suspending += OnSuspending; - - var config = new ParsingConfig - { - CustomTypeProvider = new WindowsAppCustomTypeProvider() - }; - - var containsList = new List { 0, 1, 2, 3 }; - var q = containsList.AsQueryable().Where("it > 1"); - var a = q.ToDynamicArray(); - - - var lst = new List { TestEnum.Var1, TestEnum.Var2, TestEnum.Var3, TestEnum.Var4, TestEnum.Var5, TestEnum.Var6 }; - var qry = lst.AsQueryable(); - - //Act - var result1 = qry.Where("it < TestEnum.Var4").ToDynamicList(); - var result2 = qry.Where("TestEnum.Var4 > it").ToDynamicList(); - var result3 = qry.Where("it = Var5").ToDynamicList(); - var result4 = qry.Where("it = @0", TestEnum.Var5).ToDynamicList(); - var result5 = qry.Where("it = @0", 8).ToDynamicList(); - - var resultNewList1 = containsList.AsQueryable().Select("new (it as i)").ToDynamicList(); - var resultNew1 = resultNewList1[0]; - int i1 = resultNew1.i; - - var resultNew4List = containsList.AsQueryable().Select("new (it as a, it as b, \"c\" as c, 200 as d)").ToDynamicList(); - var resultNew4 = resultNew4List[0]; - int a4 = resultNew4.a; - int b4 = resultNew4.b; - string c4 = resultNew4.c; - int d4 = resultNew4.d; - - var resultNewList5TestClass = containsList.AsQueryable().Select("new (it as a, it as b, \"c\" as c, 200 as d)").ToList(); - var firstTestClass = resultNewList5TestClass.First(); - - var resultNewList4WithMyClass = containsList.AsQueryable().Select("new (it as a, it as b, \"c\" as c, 200 as d)").ToList(); - var firstTestClassWithConstructor = resultNewList4WithMyClass.First(); - - var resultNewList5 = containsList.AsQueryable().Select("new (it as a, it as b, \"c\" as c, 200 as d, 300 as e)").ToDynamicList(); - int y = 0; - } - - /// - /// Invoked when the application is launched normally by the end user. Other entry points - /// will be used such as when the application is launched to open a specific file. - /// - /// Details about the launch request and process. - protected override void OnLaunched(LaunchActivatedEventArgs e) - { - Frame rootFrame = Window.Current.Content as Frame; - - // Do not repeat app initialization when the Window already has content, - // just ensure that the window is active - if (rootFrame == null) - { - // Create a Frame to act as the navigation context and navigate to the first page - rootFrame = new Frame(); - - rootFrame.NavigationFailed += OnNavigationFailed; - - if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - //TODO: Load state from previously suspended application - } - - // Place the frame in the current Window - Window.Current.Content = rootFrame; - } - - if (e.PrelaunchActivated == false) - { - if (rootFrame.Content == null) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - rootFrame.Navigate(typeof(MainPage), e.Arguments); - } - // Ensure the current window is active - Window.Current.Activate(); - } - } - - /// - /// Invoked when Navigation to a certain page fails - /// - /// The Frame which failed navigation - /// Details about the navigation failure - void OnNavigationFailed(object sender, NavigationFailedEventArgs e) - { - throw new Exception("Failed to load Page " + e.SourcePageType.FullName); - } - - /// - /// Invoked when application execution is being suspended. Application state is saved - /// without knowing whether the application will be terminated or resumed with the contents - /// of memory still intact. - /// - /// The source of the suspend request. - /// Details about the suspend request. - private void OnSuspending(object sender, SuspendingEventArgs e) - { - var deferral = e.SuspendingOperation.GetDeferral(); - //TODO: Save application state and stop any background activity - deferral.Complete(); - } - } -} diff --git a/test-xamarin/WindowsUniversalTestApp14393/Assets/LockScreenLogo.scale-200.png b/test-xamarin/WindowsUniversalTestApp14393/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57adb..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp14393/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp14393/Assets/SplashScreen.scale-200.png b/test-xamarin/WindowsUniversalTestApp14393/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 023e7f1fe..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp14393/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp14393/Assets/Square150x150Logo.scale-200.png b/test-xamarin/WindowsUniversalTestApp14393/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index af49fec1a..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp14393/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp14393/Assets/Square44x44Logo.scale-200.png b/test-xamarin/WindowsUniversalTestApp14393/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index ce342a2ec..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp14393/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp14393/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/test-xamarin/WindowsUniversalTestApp14393/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index f6c02ce97..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp14393/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp14393/Assets/StoreLogo.png b/test-xamarin/WindowsUniversalTestApp14393/Assets/StoreLogo.png deleted file mode 100644 index 7385b56c0..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp14393/Assets/StoreLogo.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp14393/Assets/Wide310x150Logo.scale-200.png b/test-xamarin/WindowsUniversalTestApp14393/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 288995b39..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp14393/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp14393/MainPage.xaml b/test-xamarin/WindowsUniversalTestApp14393/MainPage.xaml deleted file mode 100644 index 36b86d927..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/MainPage.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/test-xamarin/WindowsUniversalTestApp14393/MainPage.xaml.cs b/test-xamarin/WindowsUniversalTestApp14393/MainPage.xaml.cs deleted file mode 100644 index 48641b7f2..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/MainPage.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 - -namespace WindowsUniversalTestApp14393 -{ - /// - /// An empty page that can be used on its own or navigated to within a Frame. - /// - public sealed partial class MainPage : Page - { - public MainPage() - { - this.InitializeComponent(); - } - } -} diff --git a/test-xamarin/WindowsUniversalTestApp14393/Package.appxmanifest b/test-xamarin/WindowsUniversalTestApp14393/Package.appxmanifest deleted file mode 100644 index 3bbbe95f1..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/Package.appxmanifest +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - WindowsUniversalTestApp14393 - azureuser - Assets\StoreLogo.png - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-xamarin/WindowsUniversalTestApp14393/Properties/AssemblyInfo.cs b/test-xamarin/WindowsUniversalTestApp14393/Properties/AssemblyInfo.cs deleted file mode 100644 index eb3ba93e7..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using 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. -[assembly: AssemblyTitle("WindowsUniversalTestApp14393")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WindowsUniversalTestApp14393")] -[assembly: AssemblyCopyright("Copyright © Stef Heyenrath 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 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: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] diff --git a/test-xamarin/WindowsUniversalTestApp14393/Properties/Default.rd.xml b/test-xamarin/WindowsUniversalTestApp14393/Properties/Default.rd.xml deleted file mode 100644 index af00722cd..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/Properties/Default.rd.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-xamarin/WindowsUniversalTestApp14393/TestClass.cs b/test-xamarin/WindowsUniversalTestApp14393/TestClass.cs deleted file mode 100644 index 136c122dd..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/TestClass.cs +++ /dev/null @@ -1,11 +0,0 @@ - -namespace WindowsUniversalTestApp14393 -{ - public class TestClass - { - public int a { get; set; } - public int b { get; set; } - public string c { get; set; } - public int d { get; set; } - } -} diff --git a/test-xamarin/WindowsUniversalTestApp14393/TestClassWithConstructor.cs b/test-xamarin/WindowsUniversalTestApp14393/TestClassWithConstructor.cs deleted file mode 100644 index ea053420b..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/TestClassWithConstructor.cs +++ /dev/null @@ -1,19 +0,0 @@ - -namespace WindowsUniversalTestApp14393 -{ - public class TestClassWithConstructor - { - public int a { get; set; } - public int b { get; set; } - public string c { get; set; } - public int d { get; set; } - - public TestClassWithConstructor(int a, int b, string c, int d) - { - this.a = a; - this.b = b; - this.c = c; - this.d = d; - } - } -} diff --git a/test-xamarin/WindowsUniversalTestApp14393/TestEnum.cs b/test-xamarin/WindowsUniversalTestApp14393/TestEnum.cs deleted file mode 100644 index d8ddef28e..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/TestEnum.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Linq.Dynamic.Core.CustomTypeProviders; - -namespace WindowsUniversalTestApp14393 -{ - [DynamicLinqType] - public enum TestEnum - { - Var1 = 0, - Var2 = 1, - Var3 = 2, - Var4 = 4, - Var5 = 8, - Var6 = 16, - } -} diff --git a/test-xamarin/WindowsUniversalTestApp14393/WindowsAppCustomTypeProvider.cs b/test-xamarin/WindowsUniversalTestApp14393/WindowsAppCustomTypeProvider.cs deleted file mode 100644 index e637a5f62..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/WindowsAppCustomTypeProvider.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Linq.Dynamic.Core.CustomTypeProviders; -using System.Reflection; -using System.Threading.Tasks; - -namespace WindowsUniversalTestApp14393 -{ - class WindowsAppCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDynamicLinqCustomTypeProvider - { - public HashSet GetCustomTypes() - { - var assemblies = GetAssemblyListAsync().Result.Where(x => !x.IsDynamic).ToArray(); - - return new HashSet(FindTypesMarkedWithDynamicLinqTypeAttribute(assemblies)); - } - - public Type ResolveType(string typeName) - { - var assemblies = GetAssemblyListAsync().Result; - return ResolveType(assemblies, typeName); - } - - public Type ResolveTypeBySimpleName(string typeName) - { - var assemblies = GetAssemblyListAsync().Result; - return ResolveTypeBySimpleName(assemblies, typeName); - } - - private static async Task> GetAssemblyListAsync() - { - List assemblies = new List(); - - var files = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFilesAsync(); - if (files == null) - return assemblies; - - foreach (var file in files.Where(file => file.FileType == ".dll" || file.FileType == ".exe")) - { - try - { - var assembly = Assembly.Load(new AssemblyName(file.DisplayName)); - - // just load all types and skip this assembly of one or more types cannot be resolved - var dummy = assembly.DefinedTypes.ToArray(); - assemblies.Add(assembly); - } - catch (Exception ex) - { - Debug.Write(ex.Message); - } - } - - return assemblies; - } - } -} diff --git a/test-xamarin/WindowsUniversalTestApp14393/WindowsUniversalTestApp14393.csproj b/test-xamarin/WindowsUniversalTestApp14393/WindowsUniversalTestApp14393.csproj deleted file mode 100644 index 9a6761799..000000000 --- a/test-xamarin/WindowsUniversalTestApp14393/WindowsUniversalTestApp14393.csproj +++ /dev/null @@ -1,159 +0,0 @@ - - - - - Debug - x86 - {926D446C-8358-465A-AFAC-2F9078C22262} - AppContainerExe - Properties - WindowsUniversalTestApp14393 - WindowsUniversalTestApp14393 - en-US - UAP - 10.0.18362.0 - 10.0.18362.0 - 14 - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - true - WindowsUniversalTestApp14393_TemporaryKey.pfx - - - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x86 - false - prompt - true - - - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x86 - false - prompt - true - true - - - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM - false - prompt - true - - - bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM - false - prompt - true - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x64 - false - prompt - true - - - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x64 - false - prompt - true - true - - - PackageReference - - - - App.xaml - - - MainPage.xaml - - - - - - - - - - Designer - - - - - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - 6.0.10 - - - 4.1.0 - - - 4.0.0 - - - - - ..\..\src\System.Linq.Dynamic.Core\bin\Debug\net35\System.Linq.Dynamic.Core.dll - - - - 14.0 - - - - \ No newline at end of file diff --git a/test-xamarin/WindowsUniversalTestApp16299/App.xaml b/test-xamarin/WindowsUniversalTestApp16299/App.xaml deleted file mode 100644 index 23c761a08..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/test-xamarin/WindowsUniversalTestApp16299/App.xaml.cs b/test-xamarin/WindowsUniversalTestApp16299/App.xaml.cs deleted file mode 100644 index 81461888d..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/App.xaml.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.ApplicationModel; -using Windows.ApplicationModel.Activation; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; -using System.Linq.Dynamic.Core; - -namespace WindowsUniversalTestApp16299 -{ - /// - /// Provides application-specific behavior to supplement the default Application class. - /// - sealed partial class App : Application - { - /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// - public App() - { - this.InitializeComponent(); - this.Suspending += OnSuspending; - - GlobalConfig.CustomTypeProvider = new WindowsAppCustomTypeProvider(); - - var containsList = new List { 0, 1, 2, 3 }; - var q = containsList.AsQueryable().Where("it > 1"); - var a = q.ToDynamicArray(); - - - var lst = new List { TestEnum.Var1, TestEnum.Var2, TestEnum.Var3, TestEnum.Var4, TestEnum.Var5, TestEnum.Var6 }; - var qry = lst.AsQueryable(); - - //Act - var result1 = qry.Where("it < TestEnum.Var4").ToDynamicList(); - var result2 = qry.Where("TestEnum.Var4 > it").ToDynamicList(); - var result3 = qry.Where("it = Var5").ToDynamicList(); - var result4 = qry.Where("it = @0", TestEnum.Var5).ToDynamicList(); - var result5 = qry.Where("it = @0", 8).ToDynamicList(); - - var resultNewList1 = containsList.AsQueryable().Select("new (it as i)").ToDynamicList(); - var resultNew1 = resultNewList1[0]; - int i1 = resultNew1.i; - - var resultNew4List = containsList.AsQueryable().Select("new (it as a, it as b, \"c\" as c, 200 as d)").ToDynamicList(); - var resultNew4 = resultNew4List[0]; - int a4 = resultNew4.a; - int b4 = resultNew4.b; - string c4 = resultNew4.c; - int d4 = resultNew4.d; - - var resultNewList5TestClass = containsList.AsQueryable().Select("new (it as a, it as b, \"c\" as c, 200 as d)").ToList(); - var firstTestClass = resultNewList5TestClass.First(); - - var resultNewList4WithMyClass = containsList.AsQueryable().Select("new (it as a, it as b, \"c\" as c, 200 as d)").ToList(); - var firstTestClassWithConstructor = resultNewList4WithMyClass.First(); - - var resultNewList5 = containsList.AsQueryable().Select("new (it as a, it as b, \"c\" as c, 200 as d, 300 as e)").ToDynamicList(); - int y = 0; - } - - /// - /// Invoked when the application is launched normally by the end user. Other entry points - /// will be used such as when the application is launched to open a specific file. - /// - /// Details about the launch request and process. - protected override void OnLaunched(LaunchActivatedEventArgs e) - { - Frame rootFrame = Window.Current.Content as Frame; - - // Do not repeat app initialization when the Window already has content, - // just ensure that the window is active - if (rootFrame == null) - { - // Create a Frame to act as the navigation context and navigate to the first page - rootFrame = new Frame(); - - rootFrame.NavigationFailed += OnNavigationFailed; - - if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - //TODO: Load state from previously suspended application - } - - // Place the frame in the current Window - Window.Current.Content = rootFrame; - } - - if (e.PrelaunchActivated == false) - { - if (rootFrame.Content == null) - { - // When the navigation stack isn't restored navigate to the first page, - // configuring the new page by passing required information as a navigation - // parameter - rootFrame.Navigate(typeof(MainPage), e.Arguments); - } - // Ensure the current window is active - Window.Current.Activate(); - } - } - - /// - /// Invoked when Navigation to a certain page fails - /// - /// The Frame which failed navigation - /// Details about the navigation failure - void OnNavigationFailed(object sender, NavigationFailedEventArgs e) - { - throw new Exception("Failed to load Page " + e.SourcePageType.FullName); - } - - /// - /// Invoked when application execution is being suspended. Application state is saved - /// without knowing whether the application will be terminated or resumed with the contents - /// of memory still intact. - /// - /// The source of the suspend request. - /// Details about the suspend request. - private void OnSuspending(object sender, SuspendingEventArgs e) - { - var deferral = e.SuspendingOperation.GetDeferral(); - //TODO: Save application state and stop any background activity - deferral.Complete(); - } - } -} diff --git a/test-xamarin/WindowsUniversalTestApp16299/Assets/LockScreenLogo.scale-200.png b/test-xamarin/WindowsUniversalTestApp16299/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57adb..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp16299/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp16299/Assets/SplashScreen.scale-200.png b/test-xamarin/WindowsUniversalTestApp16299/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 023e7f1fe..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp16299/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp16299/Assets/Square150x150Logo.scale-200.png b/test-xamarin/WindowsUniversalTestApp16299/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index af49fec1a..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp16299/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp16299/Assets/Square44x44Logo.scale-200.png b/test-xamarin/WindowsUniversalTestApp16299/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index ce342a2ec..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp16299/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp16299/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/test-xamarin/WindowsUniversalTestApp16299/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index f6c02ce97..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp16299/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp16299/Assets/StoreLogo.png b/test-xamarin/WindowsUniversalTestApp16299/Assets/StoreLogo.png deleted file mode 100644 index 7385b56c0..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp16299/Assets/StoreLogo.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp16299/Assets/Wide310x150Logo.scale-200.png b/test-xamarin/WindowsUniversalTestApp16299/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 288995b39..000000000 Binary files a/test-xamarin/WindowsUniversalTestApp16299/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/test-xamarin/WindowsUniversalTestApp16299/MainPage.xaml b/test-xamarin/WindowsUniversalTestApp16299/MainPage.xaml deleted file mode 100644 index c74e7c2c6..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/MainPage.xaml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/test-xamarin/WindowsUniversalTestApp16299/MainPage.xaml.cs b/test-xamarin/WindowsUniversalTestApp16299/MainPage.xaml.cs deleted file mode 100644 index d9c0a3d1e..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/MainPage.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 - -namespace WindowsUniversalTestApp16299 -{ - /// - /// An empty page that can be used on its own or navigated to within a Frame. - /// - public sealed partial class MainPage : Page - { - public MainPage() - { - this.InitializeComponent(); - } - } -} diff --git a/test-xamarin/WindowsUniversalTestApp16299/Package.appxmanifest b/test-xamarin/WindowsUniversalTestApp16299/Package.appxmanifest deleted file mode 100644 index 824e0e6e1..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/Package.appxmanifest +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - WindowsUniversalTestApp16299 - azureuser - Assets\StoreLogo.png - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-xamarin/WindowsUniversalTestApp16299/Properties/AssemblyInfo.cs b/test-xamarin/WindowsUniversalTestApp16299/Properties/AssemblyInfo.cs deleted file mode 100644 index d8573e008..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using 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. -[assembly: AssemblyTitle("WindowsUniversalTestApp16299")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WindowsUniversalTestApp16299")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 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: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/test-xamarin/WindowsUniversalTestApp16299/Properties/Default.rd.xml b/test-xamarin/WindowsUniversalTestApp16299/Properties/Default.rd.xml deleted file mode 100644 index af00722cd..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/Properties/Default.rd.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-xamarin/WindowsUniversalTestApp16299/TestClass.cs b/test-xamarin/WindowsUniversalTestApp16299/TestClass.cs deleted file mode 100644 index 5224d3d46..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/TestClass.cs +++ /dev/null @@ -1,11 +0,0 @@ - -namespace WindowsUniversalTestApp16299 -{ - public class TestClass - { - public int a { get; set; } - public int b { get; set; } - public string c { get; set; } - public int d { get; set; } - } -} diff --git a/test-xamarin/WindowsUniversalTestApp16299/TestClassWithConstructor.cs b/test-xamarin/WindowsUniversalTestApp16299/TestClassWithConstructor.cs deleted file mode 100644 index c70e9310c..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/TestClassWithConstructor.cs +++ /dev/null @@ -1,19 +0,0 @@ - -namespace WindowsUniversalTestApp16299 -{ - public class TestClassWithConstructor - { - public int a { get; set; } - public int b { get; set; } - public string c { get; set; } - public int d { get; set; } - - public TestClassWithConstructor(int a, int b, string c, int d) - { - this.a = a; - this.b = b; - this.c = c; - this.d = d; - } - } -} diff --git a/test-xamarin/WindowsUniversalTestApp16299/TestEnum.cs b/test-xamarin/WindowsUniversalTestApp16299/TestEnum.cs deleted file mode 100644 index 5d306ab31..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/TestEnum.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Linq.Dynamic.Core.CustomTypeProviders; - -namespace WindowsUniversalTestApp16299 -{ - [DynamicLinqType] - public enum TestEnum - { - Var1 = 0, - Var2 = 1, - Var3 = 2, - Var4 = 4, - Var5 = 8, - Var6 = 16, - } -} diff --git a/test-xamarin/WindowsUniversalTestApp16299/WindowsAppCustomTypeProvider.cs b/test-xamarin/WindowsUniversalTestApp16299/WindowsAppCustomTypeProvider.cs deleted file mode 100644 index 7e7c47478..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/WindowsAppCustomTypeProvider.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Linq.Dynamic.Core.CustomTypeProviders; -using System.Reflection; -using System.Threading.Tasks; - -namespace WindowsUniversalTestApp16299 -{ - class WindowsAppCustomTypeProvider : AbstractDynamicLinqCustomTypeProvider, IDynamicLinqCustomTypeProvider - { - public HashSet GetCustomTypes() - { - var assemblies = GetAssemblyListAsync().Result.Where(x => !x.IsDynamic).ToArray(); - - return new HashSet(FindTypesMarkedWithDynamicLinqTypeAttribute(assemblies)); - } - - private static async Task> GetAssemblyListAsync() - { - List assemblies = new List(); - - var files = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFilesAsync(); - if (files == null) - return assemblies; - - foreach (var file in files.Where(file => file.FileType == ".dll" || file.FileType == ".exe")) - { - try - { - var assembly = Assembly.Load(new AssemblyName(file.DisplayName)); - - // just load all types and skip this assembly of one or more types cannot be resolved - var dummy = assembly.DefinedTypes.ToArray(); - assemblies.Add(assembly); - } - catch (Exception ex) - { - Debug.Write(ex.Message); - } - } - - return assemblies; - } - } -} diff --git a/test-xamarin/WindowsUniversalTestApp16299/WindowsUniversalTestApp16299.csproj b/test-xamarin/WindowsUniversalTestApp16299/WindowsUniversalTestApp16299.csproj deleted file mode 100644 index c4a36debc..000000000 --- a/test-xamarin/WindowsUniversalTestApp16299/WindowsUniversalTestApp16299.csproj +++ /dev/null @@ -1,180 +0,0 @@ - - - - - Debug - x86 - {7AD84091-A582-47B9-9165-9B8E53C32F22} - AppContainerExe - Properties - WindowsUniversalTestApp16299 - WindowsUniversalTestApp16299 - en-US - UAP - 10.0.16299.0 - 10.0.10240.0 - 14 - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - true - WindowsUniversalTestApp16299_TemporaryKey.pfx - - - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x86 - false - prompt - true - - - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x86 - false - prompt - true - true - - - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM - false - prompt - true - - - bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM - false - prompt - true - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x64 - false - prompt - true - - - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x64 - false - prompt - true - true - - - PackageReference - - - - App.xaml - - - MainPage.xaml - - - - - - - - - - Designer - - - - - - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - 6.0.6 - - - - - ..\..\src\System.Linq.Dynamic.Core\bin\Debug\net35\System.Linq.Dynamic.Core.dll - - - - 14.0 - - - true - bin\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS - ;2008 - true - full - AnyCPU - false - prompt - MinimumRecommendedRules.ruleset - true - - - bin\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS - true - ;2008 - true - pdbonly - AnyCPU - false - prompt - MinimumRecommendedRules.ruleset - true - - - - \ No newline at end of file diff --git a/test/System.Linq.Dynamic.Core.Tests/EntitiesTests.FormattableString.cs b/test/System.Linq.Dynamic.Core.Tests/EntitiesTests.FormattableString.cs index 2f5494dec..b40490038 100644 --- a/test/System.Linq.Dynamic.Core.Tests/EntitiesTests.FormattableString.cs +++ b/test/System.Linq.Dynamic.Core.Tests/EntitiesTests.FormattableString.cs @@ -11,7 +11,7 @@ using System.Linq.Expressions; namespace System.Linq.Dynamic.Core.Tests; -#if EFCORE || (NET46_OR_GREATER || NET5_0_OR_GREATER || NETCOREAPP2_1_OR_GREATER || NETSTANDARD1_3_OR_GREATER || UAP10_0) +#if EFCORE || NET46_OR_GREATER || NET5_0_OR_GREATER || NETCOREAPP2_1_OR_GREATER || NETSTANDARD1_3_OR_GREATER public partial class EntitiesTests { [Fact] diff --git a/test/System.Linq.Dynamic.Core.Tests/QueryableTests.FormattableString.cs b/test/System.Linq.Dynamic.Core.Tests/QueryableTests.FormattableString.cs index 126218357..9247a127c 100644 --- a/test/System.Linq.Dynamic.Core.Tests/QueryableTests.FormattableString.cs +++ b/test/System.Linq.Dynamic.Core.Tests/QueryableTests.FormattableString.cs @@ -7,7 +7,7 @@ namespace System.Linq.Dynamic.Core.Tests { -#if NET46_OR_GREATER || NET5_0_OR_GREATER || NETCOREAPP2_1_OR_GREATER || NETSTANDARD1_3_OR_GREATER || UAP10_0 +#if NET46_OR_GREATER || NET5_0_OR_GREATER || NETCOREAPP2_1_OR_GREATER || NETSTANDARD1_3_OR_GREATER public partial class QueryableTests {