-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: optimize, performance and the following
- remove old logic - public interface updates - text encoding option - follow attribute guideline - OverwriteIfFileExists is now enabled by default
- Loading branch information
1 parent
fc86d66
commit d2d1b04
Showing
5 changed files
with
88 additions
and
56 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 |
---|---|---|
@@ -1,18 +1,23 @@ | ||
using System; | ||
using System.Text; | ||
|
||
namespace SatorImaging.UnitySourceGenerator | ||
{ | ||
///<summary>NOTE: Implement "IUnitySourceGenerator" (C# 11.0)</summary> | ||
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] | ||
public sealed class UnitySourceGeneratorAttribute : Attribute | ||
{ | ||
Type generatorClass; | ||
|
||
public UnitySourceGeneratorAttribute(Type generatorClass = null) | ||
{ | ||
GeneratorClass = generatorClass; | ||
this.generatorClass = generatorClass; | ||
} | ||
|
||
public bool OverwriteIfFileExists { get; set; } = false; | ||
public Type GeneratorClass { get; set; } | ||
public Type GeneratorClass => generatorClass; | ||
|
||
public bool OverwriteIfFileExists { get; set; } = true; | ||
public Encoding OutputFileEncoding { get; set; } = Encoding.UTF8; | ||
|
||
} | ||
} |
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