-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring of the Source Code Generator (#1141)
* Refactoring of the Source Code Generator - Moved the Svg_Model.cs file as SvgModel.cs into the main source. - Restore the standard naming of the generated code files with "*.g.cs" suffix. - Set the output directory of the generated codes to "Generated". - Added the Generated directory to the main source codes. - Moved the Svg.Custom project to Tests directory. * Update runtests.yml - NuGet/setup-nuget@v1 to NuGet/setup-nuget@v2 - Needed to eliminate the warning: Node.js 16 actions are deprecated. * Update AvailableElementsGenerator.cs Removed the comment out portions.
- Loading branch information
Showing
14 changed files
with
264 additions
and
238 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
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using System.Collections.Generic; | ||
using Microsoft.CodeAnalysis; | ||
|
||
namespace Svg.Generators | ||
{ | ||
/// <summary> | ||
/// The SvgElement object. | ||
/// </summary> | ||
class Element | ||
{ | ||
/// <summary> | ||
/// Gets or sets element type symbol. | ||
/// </summary> | ||
public INamedTypeSymbol Symbol { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets element name. | ||
/// </summary> | ||
public string? ElementName { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets classes that use element name. | ||
/// </summary> | ||
public List<string> ClassNames { get; } | ||
|
||
/// <summary> | ||
/// Gets or sets element properties list. | ||
/// </summary> | ||
public List<Property> Properties { get; } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Element"/> class. | ||
/// </summary> | ||
/// <param name="symbol">The element type symbol.</param> | ||
/// <param name="elementName">The element name.</param> | ||
/// <param name="classNames">The classes that use element name.</param> | ||
/// <param name="properties">The element properties list.</param> | ||
public Element(INamedTypeSymbol symbol, string? elementName, List<string> classNames, List<Property> properties) | ||
{ | ||
Symbol = symbol; | ||
ElementName = elementName; | ||
ClassNames = classNames; | ||
Properties = properties; | ||
} | ||
} | ||
} |
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,17 @@ | ||
namespace Svg.Generators | ||
{ | ||
/// <summary> | ||
/// Symbol member type. | ||
/// </summary> | ||
enum MemberType | ||
{ | ||
/// <summary> | ||
/// Property symbol. | ||
/// </summary> | ||
Property, | ||
/// <summary> | ||
/// Event symbol. | ||
/// </summary> | ||
Event | ||
} | ||
} |
Oops, something went wrong.