Skip to content

Commit

Permalink
fix: Adjust DependencyObjectGenerator for macOS Support
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Apr 2, 2020
1 parent f78a38c commit bc2841f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,12 @@ public void ApplyCompiledBindings()

private void WriteDispose(INamedTypeSymbol typeSymbol, IndentedStringBuilder builder)
{
var hasDispose = typeSymbol.Is(_androidViewSymbol) || typeSymbol.Is(_iosViewSymbol);
var hasDispose = typeSymbol.Is(_androidViewSymbol) || typeSymbol.Is(_iosViewSymbol) || typeSymbol.Is(_macosViewSymbol);

if (hasDispose)
{
builder.AppendLine($@"
#if __IOS__
#if __IOS__ || __MACOS__
private bool _isDisposed;
[SuppressMessage(
Expand Down Expand Up @@ -625,7 +625,11 @@ protected sealed override void Dispose(bool disposing)
}}
}}
#if __IOS__
private void RequestCollect(UIKit.UIView[] subviews)
#elif __MACOS__
private void RequestCollect(AppKit.NSView[] subviews)
#endif
{{
if(subviews.Length != 0)
{{
Expand Down

0 comments on commit bc2841f

Please sign in to comment.