示例#1
0
        public SketchfabSample(Sketchfab.SketchfabApi sketchFabExport, ILogger <SketchfabSample> logger, IOptions <AppSecrets> secrets)
        {
            this._logger         = logger;
            this._sketchFabApi   = sketchFabExport;
            this._sketchFabToken = secrets.Value.SketchFabToken;

            if (string.IsNullOrEmpty(this._sketchFabToken))
            {
                _logger.LogWarning($"SketchfabToken is not set. Ensure you have a secrets.json file with a SketchfabToken entry with your api token (see https://sketchfab.com/settings/password)");
            }
        }
        public HelladicSample(DefaultOsmProcessor sampleOsmProcessor
                              , ImageryService imageryService
                              , ElevationService elevationService
                              , SharpGltfService gltfService
                              , MeshService meshService
                              , Sketchfab.SketchfabApi sketchFabApi
                              , IOptions <AppSecrets> secrets
                              , ILogger <HelladicSample> logger)
        {
            this._sampleOsmProcessor = sampleOsmProcessor;
            this._imageryService     = imageryService;
            this._elevationService   = elevationService;
            this._gltfService        = gltfService;
            this._meshService        = meshService;
            this._sketchFabApi       = sketchFabApi;
            this._sketchFabToken     = secrets.Value.SketchFabToken;
            this._logger             = logger;

            if (string.IsNullOrEmpty(_sketchFabToken))
            {
                _logger.LogWarning($"SketchfabToken is not set. Ensure you have a secrets.json file with a SketchfabToken entry with your api token (see https://sketchfab.com/settings/password)");
            }
        }