private static void ResolveAssertionService() { var provider = Environment.GetEnvironmentVariable(PROVIDER_PROPERTY); if (provider == null) { throw new ApplicationException("Failed to find '" + PROVIDER_PROPERTY + "' system property"); } if (provider.ToLower().Trim() == "default") { AssertionService = new DefaultInstrumentationAssertionService(); } else { AssertionService = TypeHelper.Instantiate <InstrumentationAssertionService>(provider); } }
private static void ResolveAssertionService(EPServiceProvider epServiceProvider) { string provider = Environment.GetEnvironmentVariable(PROVIDER_PROPERTY); if (provider == null) { throw new EPException("Failed to find '" + PROVIDER_PROPERTY + "' system property"); } if (provider.ToLowerInvariant().Trim().Equals("default")) { AssertionService = new DefaultInstrumentationAssertionService(); } else { var spi = (EPServiceProviderSPI)epServiceProvider; AssertionService = TypeHelper.Instantiate <InstrumentationAssertionService>( provider, spi.EngineImportService.GetClassForNameProvider()); } }
private static void ResolveAssertionService(EPRuntime runtime) { var provider = Environment.GetEnvironmentVariable(PROVIDER_PROPERTY); if (provider == null) { throw new EPRuntimeException("Failed to find '" + PROVIDER_PROPERTY + "' system property"); } if (string.Equals(provider.Trim(), "default", StringComparison.InvariantCultureIgnoreCase)) { assertionService = new DefaultInstrumentationAssertionService(); } else { var spi = (EPRuntimeSPI) runtime; assertionService = TypeHelper.Instantiate<InstrumentationAssertionService>( provider, spi.ServicesContext.ImportServiceRuntime.ClassForNameProvider); } }