-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #510 from paillave/v
redo xml parser
- Loading branch information
Showing
12 changed files
with
534 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System; | ||
using System.IO; | ||
using System.Threading; | ||
|
||
namespace Paillave.Etl.XmlFile.Core; | ||
|
||
public interface IXmlObjectReader | ||
{ | ||
void Read(Stream fileStream, CancellationToken cancellationToken); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
|
||
namespace Paillave.Etl.XmlFile.Core | ||
{ | ||
public class XmlNodeParsed | ||
{ | ||
public string SourceName { get; internal set; } | ||
public string NodeDefinitionName { get; internal set; } | ||
public string NodePath { get; internal set; } | ||
public Type Type { get; internal set; } | ||
public object Value { get; internal set; } | ||
public XmlNodeParsed(string sourceName, string nodeDefinitionName, string nodePath, Type type, object value, IDictionary<Type, Guid> correlationKeys) | ||
{ | ||
SourceName = sourceName; | ||
NodeDefinitionName = nodeDefinitionName; | ||
NodePath = nodePath; | ||
Type = type; | ||
Value = value; | ||
CorrelationKeys = new ReadOnlyDictionary<Type, Guid>(correlationKeys); | ||
} | ||
public string SourceName { get; } | ||
public string NodeDefinitionName { get; } | ||
public string NodePath { get; } | ||
public Type Type { get; } | ||
public object Value { get; } | ||
public T GetValue<T>() => (T)Value; | ||
// public object[] ParentValues { get; internal set; } | ||
// public T GetValue<T>(int level = 0) => (T)(level == 0 ? Value : ParentValues[level - 1]); | ||
public HashSet<Guid> CorrelationKeys { get; set; } = new HashSet<Guid>(); | ||
public ReadOnlyDictionary<Type, Guid> CorrelationKeys { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.