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); }
public BeginMethod(MethodInfo syncMethod, AsyncType type) : base(syncMethod, type) { parameters = ObtainParameters(syncMethod); }