internal static void RegisterOperationScope(ITerminationPolicy policy)
        {
            if (policy == null)
            {
                throw new ArgumentNullException("policy");
            }

            if (LogicContext.FindData(OperationScopeKey) != null)
            {
                throw new Exception("Operation scope does not support nesting.");
            }

            if (LogicContext.FindData(DataContextSupervisorKey) != null)
            {
                throw new Exception("Operation scope can not be used inside of unit of work.");
            }

            LogicContext.SetData(OperationScopeKey, new object());

            var supervisor = new DataContextSupervisor(() => new ReadOnlyDictionary<string, DataSource>(dataSources), policy);

            LogicContext.SetData(DataContextSupervisorKey, supervisor);
        }