Пример #1
0
        // Called by tests. The messageProvider must be initialized.
        internal static void StartTheSystem(ISecurityDataProvider securityDataProvider, IMessageProvider messageProvider, TextWriter traceChannel = null)
        {
            // Timestamp of the starting.
            var startingThesystem = DateTime.UtcNow;

            // Call SecurityContext starter method.
            TestSecurityContext.StartTheSystem(new SecurityConfiguration
            {
                SecurityDataProvider = securityDataProvider,
                MessageProvider      = messageProvider,
                CommunicationMonitorRunningPeriodInSeconds = 31,
            });
            // Staring message system. Messages before 'startingThesystem' will be ignored.
            messageProvider.Start(startingThesystem);
        }
Пример #2
0
 public Context(ISecurityUser currentUser)
 {
     // Create a new instance.
     Security = new TestSecurityContext(currentUser);
 }
Пример #3
0
 public static new void StartTheSystem(SecurityConfiguration configuration)
 {
     SecurityContext.StartTheSystem(configuration);
     _generalContext = new TestSecurityContext(SystemUser);
 }