using System; namespace core.extensions { public static class Dynamic { public static void call_as(this object target, Action command) where DynamicType : class { target.downcast_to().run(command); } public static void run(this T target, Action command) { if (null == target) return; command(target); } } }