Change-Id: I944cc72391283c90280fcc779e9ba7bc16e91890
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
{
get
{
- if (_disposed)
- {
- throw new ObjectDisposedException(nameof(ScreenMirroring));
- }
+ ThrowIfDisposed();
return _handle;
}
internal void ThrowIfNotConnected()
{
+ ThrowIfDisposed();
+
if (IsConnected == false)
{
throw new InvalidOperationException("ScreenMirroring is not connected.");
DetachDisplay();
}
+ private void ThrowIfDisposed()
+ {
+ if (_disposed)
+ {
+ throw new ObjectDisposedException(nameof(ScreenMirroring));
+ }
+ }
+
/// <summary>
/// Releases all resource used by the <see cref="ScreenMirroring"/> object.
/// </summary>