Beispiel #1
0
        //--------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="GameContentBuilder" /> class.
        /// </summary>
        /// <param name="services">The service locator.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="services"/> is <see langword="null"/>.
        /// </exception>
        public GameContentBuilder(IServiceLocator services)
        {
            if (services == null)
                throw new ArgumentNullException(nameof(services));

            var outputService = services.GetInstance<IOutputService>().ThrowIfMissing();
            _logger = new GameContentBuildLogger(outputService);
            ExecutableFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            IntermediateFolder = "GameContentBuilder/obj";
            OutputFolder = "GameContentBuilder/bin";
        }
        //--------------------------------------------------------------
        #region Creation & Cleanup
        //--------------------------------------------------------------

        /// <summary>
        /// Initializes a new instance of the <see cref="GameContentBuilder" /> class.
        /// </summary>
        /// <param name="services">The service locator.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="services"/> is <see langword="null"/>.
        /// </exception>
        public GameContentBuilder(IServiceLocator services)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            var outputService = services.GetInstance <IOutputService>().ThrowIfMissing();

            _logger            = new GameContentBuildLogger(outputService);
            ExecutableFolder   = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            IntermediateFolder = "GameContentBuilder/obj";
            OutputFolder       = "GameContentBuilder/bin";
        }