コード例 #1
0
ファイル: WinRTFixup.cs プロジェクト: DavidBasarab/MoqRT
 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()));
     }
 }
コード例 #2
0
ファイル: DotNetFixup.cs プロジェクト: rajgit31/MoqRT
        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()));
            }
        }