Exemplo n.º 1
0
 public JMXSqlFactory(MdbContext mdbContext, ILogger logger) : base(mdbContext)
 {
     if (!mdbContext.ProviderName.Equals(ProviderInvariantName, StringComparison.CurrentCultureIgnoreCase))
     {
         throw new ArgumentException($"MdbContext must be created using { ProviderInvariantName} provider.");
     }
     this.Logger = logger;
     _repo       = new JMXSqlRepo(mdbContext, logger);
     _jmx        = new JMXSqlProvider(mdbContext, logger);
 }
Exemplo n.º 2
0
        public JMXSqlFactory(MdbContext workMdbContext)
        {
            string providerName = workMdbContext.ProviderName;

            if (!providerName
                .Equals(ProviderInvariantName, StringComparison.OrdinalIgnoreCase))
            {
                throw new ArgumentException($"MdbContext must be created using { ProviderInvariantName} provider.");
            }
            _jmx = new JMXSqlProvider(this);
        }