mirror of
https://bitbucket.org/anguist/ntpa
synced 2026-10-09 04:57:13 +00:00
Simplified setup & improved error handling
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
// THE SOFTWARE.
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ntp.Analyzer.Log;
|
||||
|
||||
namespace Ntp.Data
|
||||
{
|
||||
@@ -33,6 +34,17 @@ namespace Ntp.Data
|
||||
/// </summary>
|
||||
public abstract class DataMapper<T> : IEnumerable<T>
|
||||
{
|
||||
protected DataMapper(LogBase log)
|
||||
{
|
||||
this.log = log;
|
||||
}
|
||||
|
||||
private LogBase log;
|
||||
|
||||
protected LogBase Log {
|
||||
get { return log; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read all data from table in a sequential manner.
|
||||
/// </summary>
|
||||
|
||||
@@ -24,12 +24,14 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System;
|
||||
using Ntp.Analyzer.Log;
|
||||
|
||||
namespace Ntp.Data
|
||||
{
|
||||
public abstract class FileDataMapper<T> : DataMapper<T>
|
||||
{
|
||||
public FileDataMapper ()
|
||||
public FileDataMapper (LogBase log)
|
||||
: base(log)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Ntp.Data</RootNamespace>
|
||||
<AssemblyName>Ntp.Data</AssemblyName>
|
||||
<ReleaseVersion>8.8.5</ReleaseVersion>
|
||||
<ReleaseVersion>0.3</ReleaseVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -36,4 +36,10 @@
|
||||
<Compile Include="DataMapper.cs" />
|
||||
<Compile Include="FileDataMapper.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ntp.Analyzer.Log\Ntp.Analyzer.Log.csproj">
|
||||
<Project>{909C8729-ED63-4603-85EA-34A1FC4D63D9}</Project>
|
||||
<Name>Ntp.Analyzer.Log</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user