Exemplo n.º 1
0
        /// <summary>
        /// Sets the run mode.
        /// </summary>
        /// <param name="isLite">if set to <c>true</c> [is lite].</param>
        public void SetRunMode(bool isLite)
        {
            Current = isLite ? TypeOfRunMode.Lite : TypeOfRunMode.Full;

            Configured.SetDefaultRunMode(Current);
            Save(Configured, GetLoadPath(), TypeOfMedia.XML);

            Mediator.Publish(Message.Create(Current));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Performs the health check.
        /// </summary>
        public override void PerformHealthCheck()
        {
            It.IsEmpty(Configured.FolderNames.OPAConfig)
            .AsGuard <ArgumentException>("OPA configuration location cannot be empty");
            It.IsEmpty(Configured.FolderNames.OPARules)
            .AsGuard <ArgumentException>("OPA rules location cannot be empty");
            It.IsEmpty(Configured.Locations.Experimental)
            .AsGuard <ArgumentException>("experimental folder location cannot be empty");
            It.IsEmpty(Configured.Locations.Production)
            .AsGuard <ArgumentException>("production folder location cannot be empty");

            Current = Configured.DefaultRunMode;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Sets the default run mode.
 /// </summary>
 /// <param name="newRunMode">The new run mode.</param>
 public void SetDefaultRunMode(TypeOfRunMode newRunMode)
 {
     DefaultRunMode = newRunMode;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates the specified message.
 /// </summary>
 /// <param name="useExperimentalItems"></param>
 /// <returns>
 /// a use experimental items signal message
 /// </returns>
 public IChangeRunModeMessage Create(TypeOfRunMode runMode)
 {
     return(new ChangeRunModeMessage {
         Payload = runMode
     });
 }