Skip to content

Commit 7d11547

Browse files
committed
Multiple fixes + C# Libraries moved to .NetStandard
1 parent a7c7ce4 commit 7d11547

File tree

146 files changed

+3977
-6311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+3977
-6311
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ Packages/NuGet
3636
/Packages/*.zip
3737
build/
3838
*.userprefs
39+
/Packages/*

NiWrapper.Net/Array.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ You should have received a copy of the GNU Lesser General Public
1515
License along with this library; if not, write to the Free Software
1616
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
18+
19+
using System;
20+
using System.Runtime.InteropServices;
21+
1822
namespace OpenNIWrapper
1923
{
2024
#region
2125

22-
using System;
23-
using System.Runtime.InteropServices;
24-
2526
#endregion
2627

2728
[StructLayout(LayoutKind.Sequential)]

NiWrapper.Net/CameraSettings.cs

Lines changed: 19 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ You should have received a copy of the GNU Lesser General Public
1515
License along with this library; if not, write to the Free Software
1616
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
18+
19+
using System;
20+
using System.Runtime.InteropServices;
21+
1822
namespace OpenNIWrapper
1923
{
2024
#region
2125

22-
using System;
23-
using System.Runtime.InteropServices;
24-
2526
#endregion
2627

2728
public class CameraSettings : OpenNIBase
@@ -30,7 +31,7 @@ public class CameraSettings : OpenNIBase
3031

3132
internal CameraSettings(IntPtr handle)
3233
{
33-
this.Handle = handle;
34+
Handle = handle;
3435
}
3536

3637
#endregion
@@ -39,62 +40,35 @@ internal CameraSettings(IntPtr handle)
3940

4041
public bool AutoExposure
4142
{
42-
get
43-
{
44-
return CameraSettings_getAutoExposureEnabled(this.Handle);
45-
}
46-
47-
set
48-
{
49-
OpenNI.ThrowIfError(CameraSettings_setAutoExposureEnabled(this.Handle, value));
50-
}
43+
get => CameraSettings_getAutoExposureEnabled(Handle);
44+
45+
set => OpenNI.ThrowIfError(CameraSettings_setAutoExposureEnabled(Handle, value));
5146
}
5247

5348
public bool AutoWhiteBalance
5449
{
55-
get
56-
{
57-
return CameraSettings_getAutoWhiteBalanceEnabled(this.Handle);
58-
}
59-
60-
set
61-
{
62-
OpenNI.ThrowIfError(CameraSettings_setAutoWhiteBalanceEnabled(this.Handle, value));
63-
}
50+
get => CameraSettings_getAutoWhiteBalanceEnabled(Handle);
51+
52+
set => OpenNI.ThrowIfError(CameraSettings_setAutoWhiteBalanceEnabled(Handle, value));
6453
}
6554

6655
public int Exposure
6756
{
68-
get
69-
{
70-
return CameraSettings_getExposure(this.Handle);
71-
}
72-
73-
set
74-
{
75-
OpenNI.ThrowIfError(CameraSettings_setExposure(this.Handle, value));
76-
}
57+
get => CameraSettings_getExposure(Handle);
58+
59+
set => OpenNI.ThrowIfError(CameraSettings_setExposure(Handle, value));
7760
}
7861

7962
public int Gain
8063
{
81-
get
82-
{
83-
return CameraSettings_getGain(this.Handle);
84-
}
85-
86-
set
87-
{
88-
OpenNI.ThrowIfError(CameraSettings_setGain(this.Handle, value));
89-
}
64+
get => CameraSettings_getGain(Handle);
65+
66+
set => OpenNI.ThrowIfError(CameraSettings_setGain(Handle, value));
9067
}
9168

9269
public new bool IsValid
9370
{
94-
get
95-
{
96-
return base.IsValid && CameraSettings_isValid(this.Handle);
97-
}
71+
get => base.IsValid && CameraSettings_isValid(Handle);
9872
}
9973

10074
#endregion
@@ -121,7 +95,7 @@ public int Gain
12195

12296
[DllImport("NiWrapper", CallingConvention = CallingConvention.Cdecl)]
12397
private static extern OpenNI.Status CameraSettings_setAutoWhiteBalanceEnabled(
124-
IntPtr objectHandler,
98+
IntPtr objectHandler,
12599
bool isEnable);
126100

127101
[DllImport("NiWrapper", CallingConvention = CallingConvention.Cdecl)]

NiWrapper.Net/Common.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ You should have received a copy of the GNU Lesser General Public
1515
License along with this library; if not, write to the Free Software
1616
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1717
*/
18+
19+
using System;
20+
using System.Runtime.InteropServices;
21+
1822
namespace OpenNIWrapper
1923
{
2024
#region
2125

22-
using System;
23-
using System.Runtime.InteropServices;
24-
2526
#endregion
2627

2728
internal static class Common

0 commit comments

Comments
 (0)