using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace Atesa.Utilitarios { public static class Extensiones { public static TSource ClearProperties(this TSource source) { foreach (PropertyInfo info in source.GetType().GetProperties()) { if (info.GetGetMethod().IsVirtual) { info.SetValue(source, null, null); } } return source; } public static bool In(this T obj, params T[] args) { return args.Contains(obj); } } }