コード例 #1
0
 public TradeGenerator(ITypeIdGenerator typeIdGenerator, IPriceChecker priceChecker, ISolarSystemFactory solarSystemFactory, ISolarSystemRouteFinder solarSystemRouteFinder)
 {
     m_TypeIdGenerator        = typeIdGenerator;
     m_PriceChecker           = priceChecker;
     m_SolarSystemFactory     = solarSystemFactory;
     m_SolarSystemRouteFinder = solarSystemRouteFinder;
 }
コード例 #2
0
 /// <summary>
 ///     Internal constructor with all dependencies.
 /// </summary>
 internal InjectionDetector(
     IInjectionAlerter alerter,
     ITypeIdGenerator typeIdGenerator,
     IStamper <object> stateStamper,
     IStamper <Type> codeStamper,
     bool scanCode, bool scanState,
     InjectionAlertChannel alertChannel)
 {
     if (alerter == null)
     {
         throw new ArgumentNullException(nameof(alerter));
     }
     if (stateStamper == null)
     {
         throw new ArgumentNullException(nameof(stateStamper));
     }
     if (codeStamper == null)
     {
         throw new ArgumentNullException(nameof(codeStamper));
     }
     _alerter         = alerter;
     _typeIdGenerator = typeIdGenerator;
     _stateStamper    = stateStamper;
     _codeStamper     = codeStamper;
     _alertChannel    = alertChannel;
     ScanCode         = scanCode;
     ScanState        = scanState;
 }
コード例 #3
0
ファイル: SafeContainer.cs プロジェクト: qcjxberin/SafeOrbit
 internal SafeContainer(
     ITypeIdGenerator typeIdGenerator,
     IInstanceProviderFactory instanceFactory,
     IInstanceValidator instanceValidator,
     ISafeObjectFactory safeObjectFactory,
     SafeContainerProtectionMode protectionMode = Defaults.ContainerProtectionMode,
     InjectionAlertChannel alertChannel         = Defaults.AlertChannel) : base(protectionMode)
 {
     if (typeIdGenerator == null)
     {
         throw new ArgumentNullException(nameof(typeIdGenerator));
     }
     if (instanceFactory == null)
     {
         throw new ArgumentNullException(nameof(instanceFactory));
     }
     if (instanceValidator == null)
     {
         throw new ArgumentNullException(nameof(instanceValidator));
     }
     if (safeObjectFactory == null)
     {
         throw new ArgumentNullException(nameof(safeObjectFactory));
     }
     _typeIdGenerator   = typeIdGenerator;
     _instanceFactory   = instanceFactory;
     _instanceValidator = instanceValidator;
     _safeObjectFactory = safeObjectFactory;
     _alertChannel      = alertChannel;
     ChangeProtectionMode(new ProtectionChangeContext <SafeContainerProtectionMode>(protectionMode));
     SetAlertChannelInternal(alertChannel);
 }