Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/Tizen.WindowSystem/src/KVMService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,12 @@ public class KVMService : IDisposable
/// <since_tizen> 12 </since_tizen>
public KVMService(TizenShell tzShell, IWindowProvider win)
{
if (tzShell == null)
{
throw new ArgumentNullException(nameof(tzShell));
}
ArgumentNullException.ThrowIfNull(tzShell);
if (tzShell.SafeHandle == null || tzShell.SafeHandle.IsInvalid)
{
throw new ArgumentException("tzShell is not initialized.");
}
if (win == null)
{
throw new ArgumentNullException(nameof(win));
}
ArgumentNullException.ThrowIfNull(win);

_tzsh = tzShell;
_tzshWin = WindowSystem.Interop.EcoreWl2.GetWindowId(win.WindowHandle);
Expand Down
10 changes: 2 additions & 8 deletions src/Tizen.WindowSystem/src/QuickPanelClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,12 @@ public class QuickPanelClient : IDisposable
public QuickPanelClient(TizenShell tzShell, IWindowProvider win, QuickPanelCategory type)
{
int width = 0, height = 0;
if (tzShell == null)
{
throw new ArgumentNullException("tzShell");
}
ArgumentNullException.ThrowIfNull(tzShell);
if (tzShell.SafeHandle == null || tzShell.SafeHandle.IsInvalid)
{
throw new ArgumentException("tzShell is not initialized.");
}
if (win == null)
{
throw new ArgumentNullException("win");
}
ArgumentNullException.ThrowIfNull(win);

_tzsh = tzShell;
_tzshWin = WindowSystem.Interop.EcoreWl2.GetWindowId(win.WindowHandle);
Expand Down
20 changes: 4 additions & 16 deletions src/Tizen.WindowSystem/src/QuickPanelService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,12 @@ public class QuickPanelService : IDisposable
/// <since_tizen> 12 </since_tizen>
public QuickPanelService(TizenShell tzShell, IWindowProvider win, QuickPanelCategory type)
{
if (tzShell == null)
{
throw new ArgumentNullException(nameof(tzShell));
}
ArgumentNullException.ThrowIfNull(tzShell);
if (tzShell.SafeHandle == null || tzShell.SafeHandle.IsInvalid)
{
throw new ArgumentException("tzShell is not initialized.");
}
if (win == null)
{
throw new ArgumentNullException(nameof(win));
}
ArgumentNullException.ThrowIfNull(win);

_tzsh = tzShell;
_tzshWin = WindowSystem.Interop.EcoreWl2.GetWindowId(win.WindowHandle);
Expand Down Expand Up @@ -187,10 +181,7 @@ public void Hide()
/// <exception cref="ArgumentNullException">Thrown when an argument is null.</exception>
public void SetContentRegion(uint angle, params (int x, int y, int width, int height)[] regions)
{
if (regions == null)
{
throw new ArgumentNullException(nameof(regions));
}
ArgumentNullException.ThrowIfNull(regions);

var regionHandle = Interop.TizenShellRegion.Create(_tzsh.SafeHandle);
if (regionHandle.IsInvalid)
Expand Down Expand Up @@ -224,10 +215,7 @@ public void SetContentRegion(uint angle, params (int x, int y, int width, int he
/// <exception cref="ArgumentNullException">Thrown when an argument is null.</exception>
public void SetHandlerRegion(uint angle, params (int x, int y, int width, int height)[] regions)
{
if (regions == null)
{
throw new ArgumentNullException(nameof(regions));
}
ArgumentNullException.ThrowIfNull(regions);

var regionHandle = Interop.TizenShellRegion.Create(_tzsh.SafeHandle);
if (regionHandle.IsInvalid)
Expand Down
10 changes: 2 additions & 8 deletions src/Tizen.WindowSystem/src/ScreensaverService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,12 @@ public class ScreensaverService : IDisposable
/// <exception cref="ArgumentNullException">Thrown when an argument is null.</exception>
public ScreensaverService(TizenShell tzShell, IWindowProvider win)
{
if (tzShell == null)
{
throw new ArgumentNullException(nameof(tzShell));
}
ArgumentNullException.ThrowIfNull(tzShell);
if (tzShell.SafeHandle == null || tzShell.SafeHandle.IsInvalid)
{
throw new ArgumentException("tzShell is not initialized.");
}
if (win == null)
{
throw new ArgumentNullException(nameof(win));
}
ArgumentNullException.ThrowIfNull(win);

_tzsh = tzShell;
_tzshWin = WindowSystem.Interop.EcoreWl2.GetWindowId(win.WindowHandle);
Expand Down
10 changes: 2 additions & 8 deletions src/Tizen.WindowSystem/src/SoftkeyClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,12 @@ public class SoftkeyClient : IDisposable
/// <since_tizen> 12 </since_tizen>
public SoftkeyClient(TizenShell tzShell, IWindowProvider win)
{
if (tzShell == null)
{
throw new ArgumentNullException(nameof(tzShell));
}
ArgumentNullException.ThrowIfNull(tzShell);
if (tzShell.SafeHandle == null || tzShell.SafeHandle.IsInvalid)
{
throw new ArgumentException("tzShell is not initialized.");
}
if (win == null)
{
throw new ArgumentNullException(nameof(win));
}
ArgumentNullException.ThrowIfNull(win);

_tzsh = tzShell;
_tzshWin = WindowSystem.Interop.EcoreWl2.GetWindowId(win.WindowHandle);
Expand Down
10 changes: 2 additions & 8 deletions src/Tizen.WindowSystem/src/SoftkeyService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,12 @@ public class SoftkeyService : IDisposable
/// <exception cref="ArgumentNullException">Thrown when a argument is null.</exception>
public SoftkeyService(TizenShell tzShell, IWindowProvider win)
{
if (tzShell == null)
{
throw new ArgumentNullException(nameof(tzShell));
}
ArgumentNullException.ThrowIfNull(tzShell);
if (tzShell.SafeHandle == null || tzShell.SafeHandle.IsInvalid)
{
throw new ArgumentException("tzShell is not initialized.");
}
if (win == null)
{
throw new ArgumentNullException(nameof(win));
}
ArgumentNullException.ThrowIfNull(win);

_tzsh = tzShell;
_tzshWin = WindowSystem.Interop.EcoreWl2.GetWindowId(win.WindowHandle);
Expand Down
10 changes: 2 additions & 8 deletions src/Tizen.WindowSystem/src/TaskbarService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,12 @@ public class TaskbarService : IDisposable
/// <exception cref="ArgumentNullException">Thrown when a argument is null.</exception>
public TaskbarService(TizenShell tzShell, IWindowProvider win, TaskbarPosition position = TaskbarPosition.Bottom)
{
if (tzShell == null)
{
throw new ArgumentNullException(nameof(tzShell));
}
ArgumentNullException.ThrowIfNull(tzShell);
if (tzShell.SafeHandle == null || tzShell.SafeHandle.IsInvalid)
{
throw new ArgumentException("tzShell is not initialized.");
}
if (win == null)
{
throw new ArgumentNullException(nameof(win));
}
ArgumentNullException.ThrowIfNull(win);

_tzsh = tzShell;
_tzshWin = WindowSystem.Interop.EcoreWl2.GetWindowId(win.WindowHandle);
Expand Down
Loading