Skip to content

Commit

Permalink
feat: [BveTypes]インターフェイスに対応
Browse files Browse the repository at this point in the history
  • Loading branch information
automatic9045 committed Oct 18, 2023
1 parent 05f6141 commit 4ab0050
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Libs/BveTypes/BveTypeSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ static BveTypeSet()
private BveTypeSet(IEnumerable<TypeMemberSetBase> types, Version profileVersion)
{
#if DEBUG
TypeMemberSetBase illegalType = types.FirstOrDefault(type => !(type.WrapperType.IsClass && type.WrapperType.IsSubclassOf(typeof(ClassWrapperBase))) && !type.WrapperType.IsEnum);
TypeMemberSetBase illegalType = types.FirstOrDefault(type =>
{
if (type.WrapperType.IsInterface || type.WrapperType.IsEnum) return false;

bool isClassWrapperBaseSubclass = type.WrapperType.IsClass && type.WrapperType.IsSubclassOf(typeof(ClassWrapperBase));
return !isClassWrapperBaseSubclass;
});
if (!(illegalType is null))
{
throw new ArgumentException(
Expand Down

0 comments on commit 4ab0050

Please sign in to comment.