Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
修正当主工程脚本中有没有命名空间的Enum时导出异常
  • Loading branch information
wuxiaoyu committed Nov 30, 2018
1 parent b3bde8d commit 4a93798
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 4 deletions.
Binary file added .vs/ASTool/DesignTimeBuild/.dtbcache
Binary file not shown.
Binary file modified BuildOutSDK/1.0.0/linkcodegencli/ASCompiler.dll
Binary file not shown.
Binary file modified BuildOutSDK/1.0.0/linkcodegencli/ASRuntime.dll
Binary file not shown.
Binary file modified BuildOutSDK/1.0.0/linkcodegencli/ASTool.dll
Binary file not shown.
Binary file modified BuildOutSDK/1.0.0/linkcodegencli/LinkCodeGen.dll
Binary file not shown.
Binary file modified BuildOutSDK/1.0.0/linkcodegencli/LinkCodeGenCLI.exe
Binary file not shown.
15 changes: 11 additions & 4 deletions LinkCodeGen/CreatorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,13 @@ public static bool IsSkipType(Type type,bool includeref=false)
var c = CustomAttributeData.GetCustomAttributes(type);
foreach (CustomAttributeData item in c)
{
if (item.Constructor.DeclaringType == typeof(System.ObsoleteAttribute))
{
return true;
}
if (item.Constructor != null)
{
if (item.Constructor.DeclaringType == typeof(System.ObsoleteAttribute))
{
return true;
}
}
}

//object[] objs = type.GetCustomAttributes(typeof(System.ObsoleteAttribute), false);
Expand Down Expand Up @@ -348,6 +351,8 @@ public static bool IsSkipType(Type type,bool includeref=false)
{
foreach (var item in NotCreateNameSpace)
{
if (type.Namespace == null)
return true;
if (type.Namespace == item)
return true;
if (type.Namespace.StartsWith(item + "."))
Expand Down Expand Up @@ -409,6 +414,8 @@ public static bool IsSkipType(Type type,bool includeref=false)

foreach (var item in NotCreateNameSpace)
{
if (type.Namespace == null)
return true;
if (type.Namespace == item)
return true;
if (type.Namespace.StartsWith(item + "."))
Expand Down

0 comments on commit 4a93798

Please sign in to comment.