Exemple #1
0
        internal void Initialize(InterceptArgs e)
        {
            ApplicationContext.ClientContext["__dataportaltimer"] = DateTimeOffset.Now;
            Dashboard.InitializeCall(e);

            InterceptorManager.Initialize(e);
        }
Exemple #2
0
        internal void Complete(InterceptArgs e)
        {
            InterceptorManager.Complete(e);

            var timer = ApplicationContext.ClientContext.GetValueOrNull("__dataportaltimer");

            if (timer == null)
            {
                return;
            }

            var startTime = (DateTimeOffset)timer;

            e.Runtime = DateTimeOffset.Now - startTime;
            Dashboard.CompleteCall(e);
        }
Exemple #3
0
 /// <summary>
 /// Creates an instance of the type.
 /// </summary>
 /// <param name="applicationContext"></param>
 /// <param name="dashboard"></param>
 /// <param name="options"></param>
 /// <param name="activator"></param>
 /// <param name="authorizer"></param>
 /// <param name="exceptionInspector"></param>
 /// <param name="factoryLoader"></param>
 /// <param name="interceptors"></param>
 /// <param name="exceptionHandler"></param>
 public DataPortal(
     ApplicationContext applicationContext,
     IDashboard dashboard,
     CslaOptions options,
     IAuthorizeDataPortal authorizer,
     InterceptorManager interceptors,
     IObjectFactoryLoader factoryLoader,
     IDataPortalActivator activator,
     IDataPortalExceptionInspector exceptionInspector,
     DataPortalExceptionHandler exceptionHandler)
 {
     ApplicationContext         = applicationContext;
     Dashboard                  = dashboard;
     Options                    = options.DataPortalServerOptions;
     Authorizer                 = authorizer;
     InterceptorManager         = interceptors;
     FactoryLoader              = factoryLoader;
     Activator                  = activator;
     ExceptionInspector         = exceptionInspector;
     DataPortalExceptionHandler = exceptionHandler;
 }