wasSharp – Diff between revs 10 and 19
?pathlinks?
Rev 10 | Rev 19 | |||
---|---|---|---|---|
Line 222... | Line 222... | |||
222 | } |
222 | } |
|
Line 223... | Line 223... | |||
223 | |
223 | |
|
224 | /////////////////////////////////////////////////////////////////////////// |
224 | /////////////////////////////////////////////////////////////////////////// |
|
225 | // Copyright (C) 2016 Wizardry and Steamworks - License: GNU GPLv3 // |
225 | // Copyright (C) 2016 Wizardry and Steamworks - License: GNU GPLv3 // |
|
- | 226 | /////////////////////////////////////////////////////////////////////////// |
||
- | 227 | /// <summary>Return all the run-time properties for an object.</summary> |
||
- | 228 | /// <param name="o">the object whose properties to return</param> |
||
- | 229 | /// <returns>the property information for all the properties of the object</returns> |
||
- | 230 | public static IEnumerable<PropertyInfo> GetPropertiesInfo<T>(this T o) |
||
- | 231 | { |
||
- | 232 | foreach (var p in o.GetType().GetRuntimeProperties()) |
||
- | 233 | yield return p; |
||
- | 234 | } |
||
- | 235 | |
||
- | 236 | /////////////////////////////////////////////////////////////////////////// |
||
- | 237 | // Copyright (C) 2016 Wizardry and Steamworks - License: GNU GPLv3 // |
||
226 | /////////////////////////////////////////////////////////////////////////// |
238 | /////////////////////////////////////////////////////////////////////////// |
|
227 | /// <summary> |
239 | /// <summary> |
|
228 | /// Enumerate all the base types recursively starting from a type. |
240 | /// Enumerate all the base types recursively starting from a type. |
|
229 | /// </summary> |
241 | /// </summary> |
|
230 | /// <param name="type">the type</param> |
242 | /// <param name="type">the type</param> |