internal static ConstructorInfo AsConstructorInfo(this IConstructorInfo wrapper) { if (wrapper is ConstructorInfoWrapper) { return((ConstructorInfo)((ConstructorInfoWrapper)wrapper).Inner); } else { throw new NotSupportedException(string.Format("Cannot handle '{0}'.", wrapper.GetType())); } }
internal static ConstructorInfo AsConstructorInfo(this IConstructorInfo info) { if (info == null) { return(null); } if (info is ConstructorInfoWrapper) { return(((ConstructorInfoWrapper)info).Inner); } else { throw new NotSupportedException(string.Format("Cannot handle '{0}'.", info.GetType())); } }