コード例 #1
0
ファイル: AsyncMethod.cs プロジェクト: zjnny/Windsor
        protected AsyncMethod(MethodInfo syncMethod, AsyncType type)
        {
            if (syncMethod == null)
            {
                throw new ArgumentNullException("syncMethod");
            }

            if (type == null)
            {
                throw new ArgumentNullException("type");
            }

            if (type.SyncType != syncMethod.DeclaringType)
            {
                throw new ArgumentException("The given method is not defined on given type", "syncMethod");
            }

            VerifyContract(syncMethod);

            SyncMethod = syncMethod;
            AsyncType  = type;
            handle     = ObtainNewHandle(syncMethod);
        }
コード例 #2
0
ファイル: BeginMethod.cs プロジェクト: zjnny/Windsor
 public BeginMethod(MethodInfo syncMethod, AsyncType type)
     : base(syncMethod, type)
 {
     parameters = ObtainParameters(syncMethod);
 }