private OrbServices()
 {
     m_orbInitalizers          = new ArrayList();
     m_piCurrentManager        = new PICurrentManager();
     m_interceptorManager      = new InterceptorManager(this);
     m_serializerFactoryConfig =
         new Ch.Elca.Iiop.Marshalling.SerializerFactoryConfig();
 }
Exemple #2
0
        public void InterceptorTestMethod()
        {
            InterceptorManager manager = new InterceptorManager();
            TestClass          test    = new TestClass();

            test.number = 1; // 1

            MethodInfo add      = typeof(TestClass).GetMethod("Add", BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly);
            MethodInfo multiply = typeof(TestClass).GetMethod("Multiply", BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly);

            Assert.IsNotNull(add);
            Assert.IsNotNull(multiply);
            manager.DefineInterceptor <LogAddInterceptor, Operation>(add);
            manager.DefineInterceptor <LogMulInterceptor, Operation>(multiply);


            test.Add(1);      // 1 + 1
            Assert.AreEqual(2, test.number);
            test.Multiply(2); // 2 * 2
            Assert.AreEqual(4, test.number);
            Assert.IsNotNull(s_Logs);
            Assert.AreEqual(2, s_Logs.Count);
        }
Exemple #3
0
 public TestableDataPortal(
     ApplicationContext applicationContext,
     IDashboard dashboard,
     CslaOptions options,
     IAuthorizeDataPortal authorizer,
     InterceptorManager interceptors,
     IObjectFactoryLoader factoryLoader,
     IDataPortalActivator activator,
     IDataPortalExceptionInspector exceptionInspector,
     DataPortalExceptionHandler exceptionHandler
     ) : base(
         applicationContext,
         dashboard,
         options,
         authorizer,
         interceptors,
         factoryLoader,
         activator,
         exceptionInspector,
         exceptionHandler
         )
 {
     _authorizer = authorizer;
 }
Exemple #4
0
 public RazorCSharpInterceptionMiddleLayer(InterceptorManager interceptorManager)
 {
     _underlyingMiddleLayer = new InterceptionMiddleLayer(interceptorManager, RazorLSPConstants.CSharpContentTypeName);
 }
Exemple #5
0
        public Startup(IConfiguration configuration)
        {
            InterceptorManager <WeatherForecastController> .Intercept();

            Configuration = configuration;
        }