protected override void InitializeProperties() { ActivityHelpers.InitializeCorrelationTokenCollection(this, this.CorrelationToken); Type type = this.InterfaceType; if (type == null) { throw new InvalidOperationException(SR.GetString(SR.InterfaceTypeMissing, this.Name)); } string methodName = this.MethodName; if (methodName == null) { throw new InvalidOperationException(SR.GetString(SR.MethodNameMissing, this.Name)); } MethodInfo methodInfo = type.GetMethod(methodName); if (methodInfo != null) { InvokeHelper.InitializeParameters(methodInfo, this.ParameterBindings); } else { throw new InvalidOperationException(SR.GetString(SR.MethodInfoMissing, this.MethodName, this.InterfaceType.Name)); } base.InitializeProperties(); }
protected override void InitializeProperties() { ActivityHelpers.InitializeCorrelationTokenCollection(this, this.CorrelationToken); Type interfaceType = this.InterfaceType; if (interfaceType == null) { throw new InvalidOperationException(SR.GetString("InterfaceTypeMissing", new object[] { base.Name })); } string methodName = this.MethodName; if (methodName == null) { throw new InvalidOperationException(SR.GetString("MethodNameMissing", new object[] { base.Name })); } MethodInfo method = interfaceType.GetMethod(methodName); if (method == null) { throw new InvalidOperationException(SR.GetString("MethodInfoMissing", new object[] { this.MethodName, this.InterfaceType.Name })); } InvokeHelper.InitializeParameters(method, this.ParameterBindings); base.InitializeProperties(); }