public virtual IStepBody ConstructBody(IServiceProvider serviceProvider) { IStepBody body = (serviceProvider.GetService(BodyType) as IStepBody); if (body == null) { var stepCtor = BodyType.GetConstructor(new Type[] { }); if (stepCtor != null) { body = (stepCtor.Invoke(null) as IStepBody); } } return(body); }