diff options
Diffstat (limited to 'Xamarin.PropertyEditing.Mac.Standalone/MockedControlButton.cs')
-rw-r--r-- | Xamarin.PropertyEditing.Mac.Standalone/MockedControlButton.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Mac.Standalone/MockedControlButton.cs b/Xamarin.PropertyEditing.Mac.Standalone/MockedControlButton.cs new file mode 100644 index 0000000..91e3acf --- /dev/null +++ b/Xamarin.PropertyEditing.Mac.Standalone/MockedControlButton.cs @@ -0,0 +1,32 @@ +using System; +using Foundation; +using AppKit; +using Xamarin.PropertyEditing.Tests.MockControls; + +namespace Xamarin.PropertyEditing.Mac.Standalone +{ + public abstract class MockedControlButton<T> : NSButtonCell, IMockedControl + where T : MockControl + { + protected MockedControlButton (T mockedControl, IntPtr handle) : base (handle) + { + MockedControl = mockedControl; + Initialize (); + } + + protected MockedControlButton (T mockedControl, NSCoder coder) : base (coder) + { + Initialize (); + MockedControl = mockedControl; + } + + // Shared initialization code + void Initialize () + { + } + + public T MockedControl { get; } + + object IMockedControl.MockedControl => MockedControl; + } +} |