-
Notifications
You must be signed in to change notification settings - Fork 4
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 #6 from dynasist/parser-refactor
Parser refactor
- Loading branch information
Showing
38 changed files
with
730 additions
and
1,166 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
Binary file modified
BIN
-512 Bytes
(92%)
ALObjectParser.Console/bin/Debug/netcoreapp3.0/ALObjectParser.Cmd.dll
Binary file not shown.
Binary file modified
BIN
-108 Bytes
(88%)
ALObjectParser.Console/bin/Debug/netcoreapp3.0/ALObjectParser.Cmd.pdb
Binary file not shown.
Binary file modified
BIN
-8.5 KB
(78%)
ALObjectParser.Console/bin/Debug/netcoreapp3.0/ALObjectParser.Library.dll
Binary file not shown.
Binary file modified
BIN
-2.31 KB
(84%)
ALObjectParser.Console/bin/Debug/netcoreapp3.0/ALObjectParser.Library.pdb
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
ALObjectParser.Library/Helpers/TestScenarioElementComparer.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace ALObjectParser.Library | ||
{ | ||
public class ALComment | ||
{ | ||
public string Content { get; set; } | ||
public int StartPos { get; set; } | ||
public int EndPos { get; set; } | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
ALObjectParser.Library/Models/ALObjectParts/ALMethodBody.cs
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,16 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace ALObjectParser.Library | ||
{ | ||
public class ALMethodBody | ||
{ | ||
public ALMethodBody() | ||
{ | ||
Comments = new List<ALComment>(); | ||
} | ||
|
||
public IEnumerable<string> ContentLines { get; set; } | ||
public string Content { get; set; } | ||
public IEnumerable<ALComment> Comments { get; set; } | ||
} | ||
} |
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,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace ALObjectParser.Library | ||
{ | ||
public class ALObjectTypeMap: Dictionary<ALObjectType, Type> | ||
{ | ||
public ALObjectTypeMap() | ||
{ | ||
Add(ALObjectType.table, typeof(ALTable)); | ||
Add(ALObjectType.tableextension, typeof(ALTableExtension)); | ||
Add(ALObjectType.page, typeof(ALPage)); | ||
Add(ALObjectType.pagecustomization, typeof(ALPageCustomization)); | ||
Add(ALObjectType.pageextension, typeof(ALPageExtension)); | ||
Add(ALObjectType.report, typeof(ALTable)); | ||
Add(ALObjectType.xmlport, typeof(ALTable)); | ||
Add(ALObjectType.query, typeof(ALTable)); | ||
Add(ALObjectType.codeunit, typeof(ALCodeunit)); | ||
Add(ALObjectType.controladdin, typeof(ALTable)); | ||
Add(ALObjectType.dotnet, typeof(ALTable)); | ||
Add(ALObjectType.@enum, typeof(ALTable)); | ||
Add(ALObjectType.profile, typeof(ALTable)); | ||
} | ||
|
||
public static IALObject CreateInstance(ALObjectType type) | ||
{ | ||
var items = new ALObjectTypeMap(); | ||
dynamic instance = Activator.CreateInstance(items[type]); | ||
|
||
return instance; | ||
} | ||
} | ||
} |
Oops, something went wrong.