Skip to content

Commit

Permalink
DONT PUSH. Renames Filter method, continued work to break up Generate
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin-wojciechowski committed Nov 2, 2023
1 parent 814d9fb commit 4d7980b
Show file tree
Hide file tree
Showing 2 changed files with 671 additions and 567 deletions.
7 changes: 4 additions & 3 deletions src/bgen/Filters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void GenerateFilter (Type type)
}

// properties
GenerateProperties (type, type);
GenerateFilterProperties (type, type);

// protocols
GenerateProtocolProperties (type, type, new HashSet<string> ());
Expand Down Expand Up @@ -147,14 +147,14 @@ void GenerateProtocolProperties (Type type, Type originalType, HashSet<string> p

print ("");
print ($"// {pname} protocol members ");
GenerateProperties (i, originalType, fromProtocol: true);
GenerateFilterProperties (i, originalType, fromProtocol: true);

// also include base interfaces/protocols
GenerateProtocolProperties (i, originalType, processed);
}
}

void GenerateProperties (Type type, Type? originalType = null, bool fromProtocol = false)
void GenerateFilterProperties (Type type, Type? originalType = null, bool fromProtocol = false)
{
foreach (var p in type.GetProperties (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) {
if (p.IsUnavailable (this))
Expand Down Expand Up @@ -235,6 +235,7 @@ void GenerateProperties (Type type, Type? originalType = null, bool fromProtocol
}
}


void PrintFilterExport (PropertyInfo p, ExportAttribute? export, bool setter)
{
if (export is null)
Expand Down
Loading

0 comments on commit 4d7980b

Please sign in to comment.