예제 #1
0
        public void Start(Action <SurveyDroneConfigurator> config)
        {
            Monitor.Enter(lockObj);
            try
            {
                if (core == null)
                {
                    SurveyDroneConfigurator configurator = new CoreSurveyDroneConfigurator(core = new SurveyDroneCore());

                    config(configurator);
                }
                else
                {
                    throw new SurveyDroneConfigurationException(100, "Survey drone has already been initialized and configured.");
                }
            }
            finally
            {
                Monitor.Exit(lockObj);
            }
        }
 public CoreSurveyDroneConfigurator(SurveyDroneCore core)
 {
     _core = core;
 }