protected IRecordProcessorBase GetExecuteRecord(string file, string token, string guid) { //IExecuteRecordInfo is not to revealed to user IExecuteRecordInfo item = new ExecuteRecordInfo(file, guid); //IExecuteLogic is user defined IExecuteLogic executeLogic = container.GetInstance <IExecuteLogic>(token); using (var subContainer = container.GetNestedContainer()) { subContainer.Inject <IExecuteRecordInfo>(item); subContainer.Inject <IExecuteLogic>(executeLogic); return(subContainer.GetInstance <IRecordProcessorBase>("forinject")); } }
public RecordProcessorBase(IExecuteRecordInfo recordInfo, IExecuteLogic logic) { this.logic = logic; this.executeRecordInfo = recordInfo; }