private void SetInterceptedComponentModel(ParentServiceRequestInfo target) { Contract.Ensures(_MetaInfo != null); Contract.Assume(target.ImplementationType != null); _MetaInfo = _Store.GetMetaFromType(target.ImplementationType); _State = InterceptorState.Initialized; }
public TransactionInterceptor(IContainer container, ITransactionMetaInfoStore store, ParentServiceRequestInfo parentServiceRequestInfo, AutoTxOptions autoTxOptions, ILoggerFactory loggerFactory) { Contract.Requires(container != null, "container must be non null"); Contract.Requires(store != null, "store must be non null"); Contract.Ensures(_State == InterceptorState.Constructed); _Container = container; _Store = store; _AutoTxOptions = autoTxOptions; _LoggerFactory = loggerFactory; _Logger = loggerFactory.CreateLogger(GetType()); _State = InterceptorState.Constructed; _Logger.LogDebug($"created transaction interceptor for {parentServiceRequestInfo.ImplementationType}"); SetInterceptedComponentModel(parentServiceRequestInfo); }
public ServiceWithParentInfo(ParentServiceRequestInfo parentServiceRequestInfo) { ParentServiceRequestInfo = parentServiceRequestInfo; }