/// <summary> /// Initializes an instance of <see cref="ExecutionContext"/> /// </summary> /// <param name="principal"><see cref="IPrincipal"/> to populate with</param> /// <param name="cultureInfo"><see cref="CultureInfo"/> for the <see cref="ExecutionContext"/></param> /// <param name="detailsPopulator">Callback that gets called for populating the details of the <see cref="ExecutionContext"/></param> /// <param name="system">Name of the system that is running</param> public ExecutionContext(IPrincipal principal, CultureInfo cultureInfo, ExecutionContextPopulator detailsPopulator, string system) { Principal = principal; Culture = cultureInfo; System = system; Details = new WriteOnceExpandoObject(d => detailsPopulator(this,d)); }
/// <summary> /// Initializes an instance of <see cref="ExecutionContext"/> /// </summary> /// <param name="principal"><see cref="ClaimsPrincipal"/> to populate with</param> /// <param name="cultureInfo"><see cref="CultureInfo"/> for the <see cref="ExecutionContext"/></param> /// <param name="detailsPopulator">Callback that gets called for populating the details of the <see cref="ExecutionContext"/></param> /// <param name="application"><see cref="Application"/> that is currently executing</param> /// <param name="boundedContext"><see cref="BoundedContext"/> that is currently executing</param> /// <param name="tenant"><see cref="ITenant"/> that is currently part of the <see cref="IExecutionContext"/></param> public ExecutionContext( ClaimsPrincipal principal, CultureInfo cultureInfo, ExecutionContextPopulator detailsPopulator, Application application, BoundedContext boundedContext, ITenant tenant) { Principal = principal; Culture = cultureInfo; Application = application; BoundedContext = boundedContext; Tenant = tenant; Details = new WriteOnceExpandoObject(d => detailsPopulator(this, d)); }