summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eina_mono/eina_array.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/mono/eina_mono/eina_array.cs')
-rw-r--r--src/bindings/mono/eina_mono/eina_array.cs35
1 files changed, 23 insertions, 12 deletions
diff --git a/src/bindings/mono/eina_mono/eina_array.cs b/src/bindings/mono/eina_mono/eina_array.cs
index 78388a5..ce26acd 100644
--- a/src/bindings/mono/eina_mono/eina_array.cs
+++ b/src/bindings/mono/eina_mono/eina_array.cs
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#pragma warning disable 1591 16#pragma warning disable 1591
2 17
3using System; 18using System;
@@ -132,12 +147,10 @@ public class Array<T> : IEnumerable<T>, IDisposable
132 [EditorBrowsable(EditorBrowsableState.Never)] 147 [EditorBrowsable(EditorBrowsableState.Never)]
133 public Array(IntPtr handle, bool own) 148 public Array(IntPtr handle, bool own)
134 { 149 {
135 if (handle == IntPtr.Zero) 150 Handle = (handle != IntPtr.Zero)
136 { 151 ? handle
137 throw new ArgumentNullException("Handle can't be null"); 152 : throw new ArgumentNullException(nameof(handle),
138 } 153 $"{nameof(Handle)} can't be null");
139
140 Handle = handle;
141 Own = own; 154 Own = own;
142 OwnContent = own; 155 OwnContent = own;
143 } 156 }
@@ -151,12 +164,10 @@ public class Array<T> : IEnumerable<T>, IDisposable
151 [EditorBrowsable(EditorBrowsableState.Never)] 164 [EditorBrowsable(EditorBrowsableState.Never)]
152 public Array(IntPtr handle, bool own, bool ownContent) 165 public Array(IntPtr handle, bool own, bool ownContent)
153 { 166 {
154 if (handle == IntPtr.Zero) 167 Handle = (handle != IntPtr.Zero)
155 { 168 ? handle
156 throw new ArgumentNullException("Handle can't be null"); 169 : throw new ArgumentNullException(nameof(handle),
157 } 170 $"{nameof(Handle)} can't be null");
158
159 Handle = handle;
160 Own = own; 171 Own = own;
161 OwnContent = ownContent; 172 OwnContent = ownContent;
162 } 173 }