Skip to content

Commit 6bcc924

Browse files
committed
Simplify member access
1 parent 1cc017a commit 6bcc924

File tree

9 files changed

+61
-61
lines changed

9 files changed

+61
-61
lines changed

src/Tizen.WindowSystem/src/KVMService.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public KVMService(TizenShell tzShell, IWindowProvider win)
6969
if (_kvmService.IsInvalid)
7070
{
7171
int err = Tizen.Internals.Errors.ErrorFacts.GetLastResult();
72-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(err);
72+
ErrorUtils.ThrowIfError(err);
7373
}
7474
}
7575

@@ -107,7 +107,7 @@ public event EventHandler DragStarted
107107
{
108108
_onDragStarted = OnDragStarted;
109109
int res = Interop.KVMService.SetDragStartEventHandler(_kvmService, _onDragStarted, IntPtr.Zero);
110-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
110+
ErrorUtils.ThrowIfError(res);
111111
}
112112
_dragStarted += value;
113113
}
@@ -117,7 +117,7 @@ public event EventHandler DragStarted
117117
if (_dragStarted == null)
118118
{
119119
int res = Interop.KVMService.SetDragStartEventHandler(_kvmService, null, IntPtr.Zero);
120-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
120+
ErrorUtils.ThrowIfError(res);
121121
}
122122
}
123123
}
@@ -134,7 +134,7 @@ public event EventHandler DragEnded
134134
{
135135
_onDragEnded = OnDragEnded;
136136
int res = Interop.KVMService.SetDragEndEventHandler(_kvmService, _onDragEnded, IntPtr.Zero);
137-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
137+
ErrorUtils.ThrowIfError(res);
138138
}
139139
_dragEnded += value;
140140
}
@@ -144,7 +144,7 @@ public event EventHandler DragEnded
144144
if (_dragEnded == null)
145145
{
146146
int res = Interop.KVMService.SetDragEndEventHandler(_kvmService, null, IntPtr.Zero);
147-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
147+
ErrorUtils.ThrowIfError(res);
148148
}
149149
}
150150
}
@@ -166,7 +166,7 @@ void OnDragEnded(IntPtr data, IntPtr softkeyService)
166166
public void PerformDrop()
167167
{
168168
int res = Interop.KVMService.PerformDrop(_kvmService);
169-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
169+
ErrorUtils.ThrowIfError(res);
170170
}
171171

172172
/// <summary>
@@ -176,7 +176,7 @@ public void PerformDrop()
176176
public void PerformDrop(DropTarget target)
177177
{
178178
int res = Interop.KVMService.PerformDropTarget(_kvmService, (uint)target);
179-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
179+
ErrorUtils.ThrowIfError(res);
180180
}
181181

182182
/// <summary>
@@ -186,7 +186,7 @@ public void PerformDrop(DropTarget target)
186186
public void CancelDrag()
187187
{
188188
int res = Interop.KVMService.CancelDrag(_kvmService);
189-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
189+
ErrorUtils.ThrowIfError(res);
190190
}
191191

192192
/// <summary>
@@ -197,7 +197,7 @@ public void CancelDrag()
197197
public void ReceiveDragData(string mimeType)
198198
{
199199
int res = Interop.KVMService.ReceiveDragData(_kvmService, mimeType);
200-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
200+
ErrorUtils.ThrowIfError(res);
201201
}
202202

203203
/// <summary>
@@ -211,7 +211,7 @@ public void ReceiveDragData(string mimeType)
211211
public IEnumerable<string> GetSourceMimetypes()
212212
{
213213
int res = Interop.KVMService.GetSourceMimetypes(_kvmService, out IntPtr mimeTypesPtr, out int mimeTypeCount);
214-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
214+
ErrorUtils.ThrowIfError(res);
215215

216216
if (mimeTypesPtr == IntPtr.Zero || mimeTypeCount == 0)
217217
{
@@ -233,7 +233,7 @@ public IEnumerable<string> GetSourceMimetypes()
233233
public void SetSecondarySelection()
234234
{
235235
int res = Interop.KVMService.SetSecondarySelection(_kvmService);
236-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
236+
ErrorUtils.ThrowIfError(res);
237237
}
238238

239239
/// <summary>
@@ -243,7 +243,7 @@ public void SetSecondarySelection()
243243
public void UnsetSecondarySelection()
244244
{
245245
int res = Interop.KVMService.UnsetSecondarySelection(_kvmService);
246-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
246+
ErrorUtils.ThrowIfError(res);
247247
}
248248
}
249249
}

src/Tizen.WindowSystem/src/QuickPanelClient.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public QuickPanelClient(TizenShell tzShell, IWindowProvider win, QuickPanelCateg
7878
if (_tzshQpClient.IsInvalid)
7979
{
8080
int err = Tizen.Internals.Errors.ErrorFacts.GetLastResult();
81-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(err);
81+
ErrorUtils.ThrowIfError(err);
8282
}
8383

8484
Information.TryGetValue("http://tizen.org/feature/screen.width", out width);
@@ -130,7 +130,7 @@ public event EventHandler<QuickPanelVisibility> VisibleChanged
130130
if (_visibleEventHandler == IntPtr.Zero)
131131
{
132132
int err = Tizen.Internals.Errors.ErrorFacts.GetLastResult();
133-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(err);
133+
ErrorUtils.ThrowIfError(err);
134134
}
135135
}
136136
_visibleChanged += value;
@@ -142,7 +142,7 @@ public event EventHandler<QuickPanelVisibility> VisibleChanged
142142
if (_visibleChanged == null)
143143
{
144144
_res = Interop.QuickPanelClient.DelEventHandler(_tzshQpClient, _visibleEventHandler);
145-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(_res);
145+
ErrorUtils.ThrowIfError(_res);
146146
}
147147
}
148148
}
@@ -172,7 +172,7 @@ public event EventHandler<WindowOrientation> OrientationChanged
172172
if (_orientationEventHandler == IntPtr.Zero)
173173
{
174174
int err = Tizen.Internals.Errors.ErrorFacts.GetLastResult();
175-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(err);
175+
ErrorUtils.ThrowIfError(err);
176176
}
177177
}
178178
_orientationChanged += value;
@@ -184,7 +184,7 @@ public event EventHandler<WindowOrientation> OrientationChanged
184184
if (_orientationChanged == null)
185185
{
186186
_res = Interop.QuickPanelClient.DelEventHandler(_tzshQpClient, _orientationEventHandler);
187-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(_res);
187+
ErrorUtils.ThrowIfError(_res);
188188
}
189189
}
190190
}
@@ -301,7 +301,7 @@ void OnVisibleChanged(int type, IntPtr ev_info, IntPtr data)
301301
int state;
302302

303303
res = Interop.QuickPanelClient.GetEventVisible(ev_info, out state);
304-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
304+
ErrorUtils.ThrowIfError(res);
305305

306306
_visibleChanged?.Invoke(this, (QuickPanelVisibility)state);
307307
}
@@ -314,7 +314,7 @@ void OnOrientationChanged(int type, IntPtr ev_info, IntPtr data)
314314
WindowOrientation orientation;
315315

316316
res = Interop.QuickPanelClient.GetEventOrientation(ev_info, out state);
317-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
317+
ErrorUtils.ThrowIfError(res);
318318

319319
orientation = ConvertOrientation((OrientationState)state);
320320

@@ -347,7 +347,7 @@ QuickPanelVisibility GetVisibility()
347347

348348
res = Interop.QuickPanelClient.GetVisible(_tzshQpClient, out vis);
349349

350-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
350+
ErrorUtils.ThrowIfError(res);
351351

352352
return (QuickPanelVisibility)vis;
353353
}
@@ -383,7 +383,7 @@ QuickPanelScrollMode GetScrollable()
383383

384384
res = Interop.QuickPanelClient.GetScrollableState(_tzshQpClient, out scroll);
385385

386-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
386+
ErrorUtils.ThrowIfError(res);
387387

388388
return (QuickPanelScrollMode)scroll;
389389
}
@@ -394,7 +394,7 @@ void SetScrollable(QuickPanelScrollMode scroll)
394394

395395
res = Interop.QuickPanelClient.SetScrollableState(_tzshQpClient, scroll);
396396

397-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
397+
ErrorUtils.ThrowIfError(res);
398398
}
399399

400400
/// <summary>
@@ -424,7 +424,7 @@ WindowOrientation GetOrientation()
424424

425425
res = Interop.QuickPanelClient.GetOrientation(_tzshQpClient, out state);
426426

427-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
427+
ErrorUtils.ThrowIfError(res);
428428
orientation = ConvertOrientation((OrientationState)state);
429429

430430
return orientation;
@@ -445,7 +445,7 @@ public void Show()
445445
int res;
446446

447447
res = Interop.QuickPanelClient.Show(_tzshQpClient);
448-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
448+
ErrorUtils.ThrowIfError(res);
449449
}
450450

451451
/// <summary>
@@ -462,7 +462,7 @@ public void Hide()
462462
int res;
463463

464464
res = Interop.QuickPanelClient.Hide(_tzshQpClient);
465-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
465+
ErrorUtils.ThrowIfError(res);
466466
}
467467
}
468468
}

src/Tizen.WindowSystem/src/QuickPanelService.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public QuickPanelService(TizenShell tzShell, IWindowProvider win, QuickPanelCate
6666
if (_tzshQpService.IsInvalid)
6767
{
6868
int err = Tizen.Internals.Errors.ErrorFacts.GetLastResult();
69-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(err);
69+
ErrorUtils.ThrowIfError(err);
7070
}
7171
}
7272

@@ -106,7 +106,7 @@ public QuickPanelEffect Effect
106106
set
107107
{
108108
int res = Interop.QuickPanelService.SetEffectType(_tzshQpService, value);
109-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
109+
ErrorUtils.ThrowIfError(res);
110110
_currentEffect = value;
111111
}
112112
}
@@ -124,7 +124,7 @@ public bool IsLocked
124124
set
125125
{
126126
int res = Interop.QuickPanelService.LockScroll(_tzshQpService, value);
127-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
127+
ErrorUtils.ThrowIfError(res);
128128
_isLocked = value;
129129
}
130130
}
@@ -149,7 +149,7 @@ QuickPanelCategory GetServiceType()
149149

150150
res = Interop.QuickPanelService.GetType(_tzshQpService, out type);
151151

152-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
152+
ErrorUtils.ThrowIfError(res);
153153

154154
return (QuickPanelCategory)type;
155155
}
@@ -163,7 +163,7 @@ public void Show()
163163
int res;
164164

165165
res = Interop.QuickPanelService.Show(_tzshQpService);
166-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
166+
ErrorUtils.ThrowIfError(res);
167167
}
168168

169169
/// <summary>
@@ -175,7 +175,7 @@ public void Hide()
175175
int res;
176176

177177
res = Interop.QuickPanelService.Hide(_tzshQpService);
178-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
178+
ErrorUtils.ThrowIfError(res);
179179
}
180180

181181
/// <summary>
@@ -194,7 +194,7 @@ public void SetContentRegion(uint angle, ShellRegion region)
194194
throw new ArgumentNullException(nameof(region));
195195
}
196196
res = Interop.QuickPanelService.SetContentRegion(_tzshQpService, angle, region.SafeHandle);
197-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
197+
ErrorUtils.ThrowIfError(res);
198198
}
199199

200200
/// <summary>
@@ -213,7 +213,7 @@ public void SetHandlerRegion(uint angle, ShellRegion region)
213213
throw new ArgumentNullException(nameof(region));
214214
}
215215
res = Interop.QuickPanelService.SetHandlerRegion(_tzshQpService, angle, region.SafeHandle);
216-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
216+
ErrorUtils.ThrowIfError(res);
217217
}
218218
}
219219
}

src/Tizen.WindowSystem/src/ScreensaverService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public ScreensaverService(TizenShell tzShell, IWindowProvider win)
6161
if (_screensaverService.IsInvalid)
6262
{
6363
int err = Tizen.Internals.Errors.ErrorFacts.GetLastResult();
64-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(err);
64+
ErrorUtils.ThrowIfError(err);
6565
}
6666
}
6767

src/Tizen.WindowSystem/src/ShellRegion.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public ShellRegion(TizenShell tzShell)
5555
if (_region.IsInvalid)
5656
{
5757
int err = Tizen.Internals.Errors.ErrorFacts.GetLastResult();
58-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(err);
58+
ErrorUtils.ThrowIfError(err);
5959
}
6060
}
6161

@@ -95,7 +95,7 @@ public void Add(int x, int y, int width, int height)
9595
int res;
9696

9797
res = Interop.TizenShellRegion.Add(_region, x, y, width, height);
98-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
98+
ErrorUtils.ThrowIfError(res);
9999
}
100100

101101
/// <summary>
@@ -111,7 +111,7 @@ public void Subtract(int x, int y, int width, int height)
111111
int res;
112112

113113
res = Interop.TizenShellRegion.Subtract(_region, x, y, width, height);
114-
Tizen.WindowSystem.ErrorUtils.ThrowIfError(res);
114+
ErrorUtils.ThrowIfError(res);
115115
}
116116

117117
internal SafeHandles.ShellRegionHandle SafeHandle

0 commit comments

Comments
 (0)