Skip to content

Commit

Permalink
feat: Add ITypeReferenceProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Pd233 committed Oct 26, 2023
1 parent 328e92c commit 04aab72
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
</PropertyGroup>
</Project>
10 changes: 10 additions & 0 deletions src/Generation/ITypeReferenceProvider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Text.RegularExpressions;

namespace Hosihikari.NativeInterop.Generation;

public interface ITypeReferenceProvider
{
public static abstract Regex Regex { get; }

public static abstract Type Matched(Regex regex);
}
11 changes: 4 additions & 7 deletions src/Generation/PredefinedTypeAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hosihikari.NativeInterop.Generation;
namespace Hosihikari.NativeInterop.Generation;

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
public class PredefinedTypeAttribute : Attribute
{
public string NativeTypeName { get; set; } = string.Empty;

public string NativeTypeNamespace { get; set; } = string.Empty;
}

0 comments on commit 04aab72

Please sign in to comment.