Prepare for NuGet
This commit is contained in:
@@ -1,133 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{63963ED7-9C78-4672-A4D4-339B6E825503}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DynamORM</RootNamespace>
|
||||
<AssemblyName>DynamORM</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<SignAssembly>False</SignAssembly>
|
||||
<DelaySign>False</DelaySign>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
<NoStdLib>False</NoStdLib>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
||||
<BaseAddress>4194304</BaseAddress>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>PdbOnly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DocumentationFile>bin\Release\DynamORM.xml</DocumentationFile>
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
||||
<BaseAddress>4194304</BaseAddress>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
||||
<BaseAddress>4194304</BaseAddress>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data">
|
||||
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Builders\Extensions\DynamicHavingQueryExtensions.cs" />
|
||||
<Compile Include="Builders\IDynamicInsertQueryBuilder.cs" />
|
||||
<Compile Include="Builders\IDynamicSelectQueryBuilder.cs" />
|
||||
<Compile Include="Builders\IDynamicUpdateQueryBuilder.cs" />
|
||||
<Compile Include="Builders\Implementation\DynamicDeleteQueryBuilder.cs" />
|
||||
<Compile Include="Builders\Implementation\DynamicInsertQueryBuilder.cs" />
|
||||
<Compile Include="Builders\Implementation\DynamicModifyBuilder.cs" />
|
||||
<Compile Include="Builders\Implementation\DynamicQueryBuilder.cs" />
|
||||
<Compile Include="Builders\Extensions\DynamicModifyBuilderExtensions.cs" />
|
||||
<Compile Include="Builders\Extensions\DynamicWhereQueryExtensions.cs" />
|
||||
<Compile Include="Builders\Implementation\DynamicSelectQueryBuilder.cs" />
|
||||
<Compile Include="Builders\Implementation\DynamicUpdateQueryBuilder.cs" />
|
||||
<Compile Include="Builders\IDynamicDeleteQueryBuilder.cs" />
|
||||
<Compile Include="Builders\IDynamicQueryBuilder.cs" />
|
||||
<Compile Include="Builders\IParameter.cs" />
|
||||
<Compile Include="Builders\ITableInfo.cs" />
|
||||
<Compile Include="DynamicCachedReader.cs" />
|
||||
<Compile Include="DynamicColumn.cs" />
|
||||
<Compile Include="DynamicCommand.cs" />
|
||||
<Compile Include="DynamicConnection.cs" />
|
||||
<Compile Include="DynamicDatabase.cs" />
|
||||
<Compile Include="DynamicDatabaseOptions.cs" />
|
||||
<Compile Include="DynamicExtensions.cs" />
|
||||
<Compile Include="DynamicProcedureInvoker.cs" />
|
||||
<Compile Include="DynamicQueryException.cs" />
|
||||
<Compile Include="DynamicSchemaColumn.cs" />
|
||||
<Compile Include="DynamicTable.cs" />
|
||||
<Compile Include="DynamicTransaction.cs" />
|
||||
<Compile Include="Helpers\CollectionComparer.cs" />
|
||||
<Compile Include="Helpers\Dynamics\DynamicParser.cs" />
|
||||
<Compile Include="Helpers\Dynamics\DynamicProxy.cs" />
|
||||
<Compile Include="Helpers\IExtendedDisposable.cs" />
|
||||
<Compile Include="Helpers\FrameworkTools.cs" />
|
||||
<Compile Include="Helpers\StringExtensions.cs" />
|
||||
<Compile Include="Helpers\UnclassifiedExtensions.cs" />
|
||||
<Compile Include="Mapper\ColumnAttribute.cs" />
|
||||
<Compile Include="Mapper\DynamicMapperCache.cs" />
|
||||
<Compile Include="Mapper\DynamicMapperException.cs" />
|
||||
<Compile Include="Mapper\DynamicPropertyInvoker.cs" />
|
||||
<Compile Include="Mapper\DynamicTypeMap.cs" />
|
||||
<Compile Include="Mapper\IgnoreAttribute.cs" />
|
||||
<Compile Include="Objects\DynamicEntityBase.cs" />
|
||||
<Compile Include="Objects\DynamicEntityState.cs" />
|
||||
<Compile Include="Objects\DynamicPropertyChangingEventArgs.cs" />
|
||||
<Compile Include="Objects\DynamicRepositoryBase.cs" />
|
||||
<Compile Include="Validation\RequiredAttribute.cs" />
|
||||
<Compile Include="Mapper\TableAttribute.cs" />
|
||||
<Compile Include="Mapper\DynamicCast.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="DynamicExpando.cs" />
|
||||
<Compile Include="Helpers\IFinalizerDisposable.cs" />
|
||||
<Compile Include="Validation\ValidateResult.cs" />
|
||||
<Compile Include="Validation\ValidationResult.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net472;net5.0;net6.0</TargetFrameworks>
|
||||
<Description>Dynamic Object-Relational Mapping library.</Description>
|
||||
<Copyright>Copyright © RUSSEK Software 2012-2022</Copyright>
|
||||
<Company>RUSSEK Software</Company>
|
||||
<Authors>Grzegorz Russek</Authors>
|
||||
<VersionPrefix>1.2.1</VersionPrefix>
|
||||
<RepositoryUrl>https://svn.dr4cul4.pl/svn/DynamORM/</RepositoryUrl>
|
||||
<PackageProjectUrl>https://dr4cul4.pl</PackageProjectUrl>
|
||||
<Product>DynamORM</Product>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="System.Data.Common" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="$(TargetFramework.StartsWith('net4')) AND '$(MSBuildRuntimeType)' == 'Core' AND '$(OS)' != 'Windows_NT'">
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -146,6 +146,8 @@ namespace DynamORM
|
||||
/// <value>The dump command delegate.</value>
|
||||
public Action<IDbCommand, string> DumpCommandDelegate { get; set; }
|
||||
|
||||
#if NETFRAMEWORK
|
||||
// https://github.com/dotnet/runtime/issues/26229
|
||||
/// <summary>Initializes a new instance of the <see cref="DynamicDatabase" /> class.</summary>
|
||||
/// <param name="provider">Database provider by name.</param>
|
||||
/// <param name="connectionString">Connection string to provided database.</param>
|
||||
@@ -154,6 +156,7 @@ namespace DynamORM
|
||||
: this(DbProviderFactories.GetFactory(provider), connectionString, options)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="DynamicDatabase" /> class.</summary>
|
||||
/// <param name="provider">Database provider.</param>
|
||||
@@ -249,9 +252,9 @@ namespace DynamORM
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion Properties and Constructors
|
||||
#endregion Properties and Constructors
|
||||
|
||||
#region Table
|
||||
#region Table
|
||||
|
||||
#if !DYNAMORM_OMMIT_OLDSYNTAX
|
||||
|
||||
@@ -326,7 +329,7 @@ namespace DynamORM
|
||||
|
||||
#endif
|
||||
|
||||
#endregion Table
|
||||
#endregion Table
|
||||
|
||||
/// <summary>Adds cached builder.</summary>
|
||||
/// <param name="builder">New dynamic builder.</param>
|
||||
@@ -344,7 +347,7 @@ namespace DynamORM
|
||||
RemainingBuilders.Remove(builder);
|
||||
}
|
||||
|
||||
#region From/Insert/Update/Delete
|
||||
#region From/Insert/Update/Delete
|
||||
|
||||
/// <summary>
|
||||
/// Adds to the <code>FROM</code> clause the contents obtained by parsing the dynamic lambda expressions given. The supported
|
||||
@@ -627,7 +630,7 @@ namespace DynamORM
|
||||
{
|
||||
try
|
||||
{
|
||||
#region Update
|
||||
#region Update
|
||||
|
||||
Dictionary<IDbDataParameter, DynamicPropertyInvoker> parametersUp = new Dictionary<IDbDataParameter, DynamicPropertyInvoker>();
|
||||
|
||||
@@ -650,9 +653,9 @@ namespace DynamORM
|
||||
else
|
||||
PrepareBatchUpdate(t, mapper, cmdUp, parametersUp);
|
||||
|
||||
#endregion Update
|
||||
#endregion Update
|
||||
|
||||
#region Insert
|
||||
#region Insert
|
||||
|
||||
Dictionary<IDbDataParameter, DynamicPropertyInvoker> parametersIn = new Dictionary<IDbDataParameter, DynamicPropertyInvoker>();
|
||||
|
||||
@@ -675,7 +678,7 @@ namespace DynamORM
|
||||
else
|
||||
PrepareBatchInsert(t, mapper, cmdIn, parametersIn);
|
||||
|
||||
#endregion Insert
|
||||
#endregion Insert
|
||||
|
||||
foreach (var o in e)
|
||||
{
|
||||
@@ -1020,9 +1023,9 @@ namespace DynamORM
|
||||
mapper.DeleteCommandText = cmd.CommandText;
|
||||
}
|
||||
|
||||
#endregion From/Insert/Update/Delete
|
||||
#endregion From/Insert/Update/Delete
|
||||
|
||||
#region Procedure
|
||||
#region Procedure
|
||||
|
||||
/// <summary>Execute stored procedure.</summary>
|
||||
/// <param name="procName">Name of stored procedure to execute.</param>
|
||||
@@ -1089,9 +1092,9 @@ namespace DynamORM
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Procedure
|
||||
#endregion Procedure
|
||||
|
||||
#region Execute
|
||||
#region Execute
|
||||
|
||||
/// <summary>Execute non query.</summary>
|
||||
/// <param name="sql">SQL query containing numbered parameters in format provided by
|
||||
@@ -1148,9 +1151,9 @@ namespace DynamORM
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endregion Execute
|
||||
#endregion Execute
|
||||
|
||||
#region Scalar
|
||||
#region Scalar
|
||||
|
||||
/// <summary>Returns a single result.</summary>
|
||||
/// <param name="sql">SQL query containing numbered parameters in format provided by
|
||||
@@ -1221,9 +1224,9 @@ namespace DynamORM
|
||||
|
||||
#endif
|
||||
|
||||
#endregion Scalar
|
||||
#endregion Scalar
|
||||
|
||||
#region Query
|
||||
#region Query
|
||||
|
||||
/// <summary>Enumerate the reader and yield the result.</summary>
|
||||
/// <param name="sql">SQL query containing numbered parameters in format provided by
|
||||
@@ -1305,9 +1308,9 @@ namespace DynamORM
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Query
|
||||
#endregion Query
|
||||
|
||||
#region Schema
|
||||
#region Schema
|
||||
|
||||
/// <summary>Builds query cache if necessary and returns it.</summary>
|
||||
/// <param name="builder">The builder containing query to read schema from.</param>
|
||||
@@ -1518,7 +1521,7 @@ namespace DynamORM
|
||||
(Options & DynamicDatabaseOptions.SupportSchema) == DynamicDatabaseOptions.SupportSchema;
|
||||
bool mapperSchema = mapper != null && mapper.Table != null && (mapper.Table.Override || !databaseSchemaSupport);
|
||||
|
||||
#region Database schema
|
||||
#region Database schema
|
||||
|
||||
if (databaseSchemaSupport && !Schema.ContainsKey(tableName.ToLower()))
|
||||
{
|
||||
@@ -1530,9 +1533,9 @@ namespace DynamORM
|
||||
Schema[tableName.ToLower()] = schema;
|
||||
}
|
||||
|
||||
#endregion Database schema
|
||||
#endregion Database schema
|
||||
|
||||
#region Type schema
|
||||
#region Type schema
|
||||
|
||||
if ((mapperSchema && !Schema.ContainsKey(mapper.Type.FullName)) ||
|
||||
(schema == null && mapper != null && !mapper.Type.IsAnonymous()))
|
||||
@@ -1540,7 +1543,7 @@ namespace DynamORM
|
||||
// TODO: Ged rid of this monster below...
|
||||
if (databaseSchemaSupport)
|
||||
{
|
||||
#region Merge with db schema
|
||||
#region Merge with db schema
|
||||
|
||||
schema = mapper.ColumnsMap.ToDictionary(k => k.Key, (v) =>
|
||||
{
|
||||
@@ -1576,11 +1579,11 @@ namespace DynamORM
|
||||
};
|
||||
});
|
||||
|
||||
#endregion Merge with db schema
|
||||
#endregion Merge with db schema
|
||||
}
|
||||
else
|
||||
{
|
||||
#region MapEnumerable based only on type
|
||||
#region MapEnumerable based only on type
|
||||
|
||||
schema = mapper.ColumnsMap.ToDictionary(k => k.Key,
|
||||
v => new DynamicSchemaColumn
|
||||
@@ -1595,21 +1598,21 @@ namespace DynamORM
|
||||
Scale = DynamicExtensions.CoalesceNullable<byte>(v.Value.Column != null ? v.Value.Column.Scale : null, 0).Value,
|
||||
});
|
||||
|
||||
#endregion MapEnumerable based only on type
|
||||
#endregion MapEnumerable based only on type
|
||||
}
|
||||
}
|
||||
|
||||
if (mapper != null && schema != null)
|
||||
Schema[mapper.Type.FullName] = schema;
|
||||
|
||||
#endregion Type schema
|
||||
#endregion Type schema
|
||||
|
||||
return schema;
|
||||
}
|
||||
|
||||
#endregion Schema
|
||||
#endregion Schema
|
||||
|
||||
#region Decorators
|
||||
#region Decorators
|
||||
|
||||
/// <summary>Gets or sets left side decorator for database objects.</summary>
|
||||
public string LeftDecorator
|
||||
@@ -1698,9 +1701,9 @@ namespace DynamORM
|
||||
cmd.Dump(Console.Out);
|
||||
}
|
||||
|
||||
#endregion Decorators
|
||||
#endregion Decorators
|
||||
|
||||
#region Connection
|
||||
#region Connection
|
||||
|
||||
/// <summary>Open managed connection.</summary>
|
||||
/// <returns>Opened connection.</returns>
|
||||
@@ -1806,9 +1809,9 @@ namespace DynamORM
|
||||
.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
#endregion Connection
|
||||
#endregion Connection
|
||||
|
||||
#region Transaction
|
||||
#region Transaction
|
||||
|
||||
/// <summary>Begins a global database transaction.</summary>
|
||||
/// <remarks>Using this method connection is set to single open
|
||||
@@ -1870,9 +1873,9 @@ namespace DynamORM
|
||||
});
|
||||
}
|
||||
|
||||
#endregion Transaction
|
||||
#endregion Transaction
|
||||
|
||||
#region IExtendedDisposable Members
|
||||
#region IExtendedDisposable Members
|
||||
|
||||
/// <summary>Performs application-defined tasks associated with freeing,
|
||||
/// releasing, or resetting unmanaged resources.</summary>
|
||||
@@ -1941,6 +1944,6 @@ namespace DynamORM
|
||||
/// <summary>Gets a value indicating whether this instance is disposed.</summary>
|
||||
public bool IsDisposed { get; private set; }
|
||||
|
||||
#endregion IExtendedDisposable Members
|
||||
#endregion IExtendedDisposable Members
|
||||
}
|
||||
}
|
||||
@@ -73,6 +73,7 @@ namespace DynamORM.Helpers
|
||||
func(obj) : elseFunc != null ? elseFunc() : default(R);
|
||||
}
|
||||
|
||||
#if !NET6_0_OR_GREATER
|
||||
/// <summary>Simple distinct by selector extension.</summary>
|
||||
/// <returns>The enumerator of elements distinct by specified selector.</returns>
|
||||
/// <param name="source">Source collection.</param>
|
||||
@@ -86,5 +87,6 @@ namespace DynamORM.Helpers
|
||||
if (seenKeys.Add(keySelector(element)))
|
||||
yield return element;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -35,40 +35,7 @@
|
||||
|
||||
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("DynamORM")]
|
||||
[assembly: AssemblyDescription("Dynamic Object-Relational Mapping library.")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("RUSSEK Software")]
|
||||
[assembly: AssemblyProduct("DynamORM")]
|
||||
[assembly: AssemblyCopyright("Copyright © RUSSEK Software 2012-2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0a42480b-bba7-4b01-807f-9962a76e4e47")]
|
||||
|
||||
// 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.1.0.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.0.1")]
|
||||
[assembly: InternalsVisibleTo("DynamORM.Tests")]
|
||||
[assembly: Obfuscation(Feature = "encrypt symbol names with password #dr4cul4#", Exclude = false)]
|
||||
[assembly: Obfuscation(Feature = "code control flow obfuscation", Exclude = false)]
|
||||
|
||||
Reference in New Issue
Block a user