wasSharp – Diff between revs 37 and 39
?pathlinks?
Rev 37 | Rev 39 | |||
---|---|---|---|---|
Line 256... | Line 256... | |||
256 | } |
256 | } |
|
Line 257... | Line 257... | |||
257 | |
257 | |
|
258 | /////////////////////////////////////////////////////////////////////////// |
258 | /////////////////////////////////////////////////////////////////////////// |
|
259 | // Copyright (C) 2016 Wizardry and Steamworks - License: GNU GPLv3 // |
259 | // Copyright (C) 2016 Wizardry and Steamworks - License: GNU GPLv3 // |
|
- | 260 | /////////////////////////////////////////////////////////////////////////// |
||
- | 261 | /// <summary>Return all the run-time properties for an object.</summary> |
||
- | 262 | /// <param name="o">the object whose properties to return</param> |
||
- | 263 | /// <returns>the property information for all the properties of the object</returns> |
||
- | 264 | public static IEnumerable<FieldInfo> GetFieldsInfo<T>(this T o) |
||
- | 265 | { |
||
- | 266 | foreach (var p in o.GetType().GetRuntimeFields()) |
||
- | 267 | yield return p; |
||
- | 268 | } |
||
- | 269 | |
||
- | 270 | /////////////////////////////////////////////////////////////////////////// |
||
- | 271 | // Copyright (C) 2016 Wizardry and Steamworks - License: GNU GPLv3 // |
||
260 | /////////////////////////////////////////////////////////////////////////// |
272 | /////////////////////////////////////////////////////////////////////////// |
|
261 | /// <summary> |
273 | /// <summary> |
|
262 | /// Enumerate all the base types recursively starting from a type. |
274 | /// Enumerate all the base types recursively starting from a type. |
|
263 | /// </summary> |
275 | /// </summary> |
|
264 | /// <param name="type">the type</param> |
276 | /// <param name="type">the type</param> |