Esempio n. 1
0
 public SemanticErrorTagger(ITextView textView, BackgroundParser backgroundParser,
     IOptionsService optionsService)
     : base(PredefinedErrorTypeNames.CompilerError, textView, optionsService)
 {
     backgroundParser.SubscribeToThrottledSemanticModelAvailable(BackgroundParserSubscriptionDelay.Medium,
         async x => await InvalidateTags(x.Snapshot, x.CancellationToken));
 }
 public BraceCompletionContext(ISmartIndentationService smartIndentationService, ITextBufferUndoManagerProvider undoManager, HlslClassificationService classificationService, IOptionsService optionsService)
 {
     _smartIndentationService = smartIndentationService;
     _undoManager = undoManager;
     _classificationService = classificationService;
     _optionsService = optionsService;
 }
		public static AssetType GetAssetType(IOptionsService optionsService, string fileName)
		{
			string extension = Path.GetExtension(fileName);
			if (extension == null)
				return AssetType.None;

			extension = extension.ToLower();

			XBuilderOptionsGeneral options = optionsService.GetGeneralOptions();
			if (options.ModelExtensions != null)
			{
				string[] modelExtensions = options.ModelExtensions.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries);
				if (modelExtensions.Any(e => e.Trim() == extension))
					return AssetType.Model;
			}

			if (options.TextureExtensions != null)
			{
				string[] textureExtensions = options.TextureExtensions.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
				if (textureExtensions.Any(e => e.Trim() == extension))
					return AssetType.Texture;
			}

			if (options.EffectExtensions != null)
			{
				string[] effectExtensions = options.EffectExtensions.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
				if (effectExtensions.Any(e => e.Trim() == extension))
					return AssetType.Effect;
			}

			return AssetType.None;
		}
Esempio n. 4
0
 public AzureDnsOptions(IOptionsService options, IInputService input)
 {
     TenantId          = options.TryGetOption(options.Options.AzureTenantId, input, "Tenant Id");
     ClientId          = options.TryGetOption(options.Options.AzureClientId, input, "Client Id");
     Secret            = options.TryGetOption(options.Options.AzureSecret, input, "Secret", true);
     SubscriptionId    = options.TryGetOption(options.Options.AzureSubscriptionId, input, "DNS Subscription ID");
     ResourceGroupName = options.TryGetOption(options.Options.AzureResourceGroupName, input, "DNS Resoure Group Name");
 }
Esempio n. 5
0
 public CertificateService(IOptionsService options, ILogService log, LetsEncryptClient client, ISettingsService settingsService)
 {
     _log        = log;
     _options    = options.Options;
     _client     = client;
     _configPath = settingsService.ConfigPath;
     InitCertificatePath();
 }
 public TaskSchedulerService(ISettingsService settings, IOptionsService options, IInputService input, ILogService log, string clientName)
 {
     _options    = options.Options;
     _settings   = settings;
     _input      = input;
     _log        = log;
     _clientName = clientName;
 }
Esempio n. 7
0
        /// <summary>
        /// Gets the talk schedule.
        /// </summary>
        /// <param name="optionsService">Options service.</param>
        /// <returns>A collection of TalkScheduleItem.</returns>
        public static IEnumerable <TalkScheduleItem> Read(IOptionsService optionsService)
        {
            var isCircuitVisit = optionsService.Options.IsCircuitVisit;

            return(optionsService.Options.MidWeekOrWeekend == MidWeekOrWeekend.Weekend
                ? GetWeekendMeetingSchedule(isCircuitVisit)
                : GetMidweekMeetingSchedule(isCircuitVisit, new TimesFeed().GetTodaysMeetingData()));
        }
Esempio n. 8
0
        Target ITargetPlugin.Default(IOptionsService optionsService)
        {
            var rawSiteId   = optionsService.TryGetRequiredOption(nameof(optionsService.Options.SiteId), optionsService.Options.SiteId);
            var totalTarget = GetCombinedTarget(GetSites(false, false), rawSiteId);

            totalTarget.ExcludeBindings = optionsService.Options.ExcludeBindings;
            return(totalTarget);
        }
Esempio n. 9
0
 public CertificateService(IOptionsService options, ILogService log, AcmeClientWrapper client, SettingsService settingsService)
 {
     _log        = log;
     _options    = options.Options;
     _client     = client;
     _configPath = settingsService.ConfigPath;
     InitCertificatePath();
 }
Esempio n. 10
0
 /// <summary>
 /// Creates a <see cref="FlexiPictureBlockFactory"/>.
 /// </summary>
 /// <param name="imageService">The service that handles image file operations.</param>
 /// <param name="directoryService">The service that handles searching for image files.</param>
 /// <param name="optionsService">The service for creating <see cref="IFlexiPictureBlockOptions"/> and <see cref="IFlexiPictureBlocksExtensionOptions"/>.</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="imageService"/> is <c>null</c>.</exception>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="directoryService"/> is <c>null</c>.</exception>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="optionsService"/> is <c>null</c>.</exception>
 public FlexiPictureBlockFactory(IImageService imageService,
                                 IDirectoryService directoryService,
                                 IOptionsService <IFlexiPictureBlockOptions, IFlexiPictureBlocksExtensionOptions> optionsService) :
     base(directoryService)
 {
     _optionsService = optionsService ?? throw new ArgumentNullException(nameof(optionsService));
     _imageService   = imageService ?? throw new ArgumentNullException(nameof(imageService));
 }
Esempio n. 11
0
        public TalkScheduleService(IOptionsService optionsService)
        {
            _optionsService = optionsService;
            Reset();

            // subscriptions...
            Messenger.Default.Register <TimerStopMessage>(this, OnTimerStopped);
        }
Esempio n. 12
0
 public AzureDnsOptions(IOptionsService options)
 {
     TenantId          = options.TryGetRequiredOption(nameof(options.Options.AzureTenantId), options.Options.AzureTenantId);
     ClientId          = options.TryGetRequiredOption(nameof(options.Options.AzureTenantId), options.Options.AzureClientId);
     Secret            = options.TryGetRequiredOption(nameof(options.Options.AzureTenantId), options.Options.AzureSecret);
     SubscriptionId    = options.TryGetRequiredOption(nameof(options.Options.AzureTenantId), options.Options.AzureSubscriptionId);
     ResourceGroupName = options.TryGetRequiredOption(nameof(options.Options.AzureTenantId), options.Options.AzureResourceGroupName);
 }
Esempio n. 13
0
 private FlexiPictureBlockFactory CreateFlexiPictureBlockFactory(IImageService imageService         = null,
                                                                 IDirectoryService directoryService = null,
                                                                 IOptionsService <IFlexiPictureBlockOptions, IFlexiPictureBlocksExtensionOptions> optionsService = null)
 {
     return(new FlexiPictureBlockFactory(imageService ?? _mockRepository.Create <IImageService>().Object,
                                         directoryService ?? _mockRepository.Create <IDirectoryService>().Object,
                                         optionsService ?? _mockRepository.Create <IOptionsService <IFlexiPictureBlockOptions, IFlexiPictureBlocksExtensionOptions> >().Object));
 }
Esempio n. 14
0
 public BellApiController(
     IOptionsService optionsService,
     IBellService bellService,
     ApiThrottler apiThrottler)
 {
     _optionsService = optionsService;
     _bellService    = bellService;
     _apiThrottler   = apiThrottler;
 }
Esempio n. 15
0
 public DragAndDropService(
     IMediaProviderService mediaProviderService,
     IOptionsService optionsService,
     ISnackbarService snackbarService)
 {
     _mediaProviderService = mediaProviderService;
     _optionsService       = optionsService;
     _snackbarService      = snackbarService;
 }
Esempio n. 16
0
 public BookService(IStorageService storageService, IOptionsService optionsService)
 {
     _storageService = storageService;
     _optionsService = optionsService;
     InitBook();
     _saveTimer          = new Timer(TimeSpan.FromSeconds(5).TotalMilliseconds);
     _saveTimer.Elapsed += (s, e) => OnTimerElapsed();
     _saveTimer.Enabled  = true;
 }
Esempio n. 17
0
 public ImagesService(
     IOptionsService optionsService,
     IUserInterfaceService userInterfaceService,
     IVerseEditorService verseEditorService)
 {
     _optionsService       = optionsService;
     _userInterfaceService = userInterfaceService;
     _verseEditorService   = verseEditorService;
 }
Esempio n. 18
0
        public MainViewModel(
            ScripturesViewModel scripturesViewModel,
            PreviewViewModel previewViewModel,
            SettingsViewModel settingsViewModel,
            EditTextViewModel editVerseTextViewModel,
            StartupViewModel startupViewModel,
            IImagesService imagesService,
            IOptionsService optionsService,
            ISnackbarService snackbarService,
            IUserInterfaceService userInterfaceService,
            ICommandLineService commandLineService,
            IVerseEditorService verseEditorService)
        {
            _scripturesViewModel    = scripturesViewModel;
            _previewViewModel       = previewViewModel;
            _settingsViewModel      = settingsViewModel;
            _editVerseTextViewModel = editVerseTextViewModel;
            _startupViewModel       = startupViewModel;
            _commandLineService     = commandLineService;
            _verseEditorService     = verseEditorService;

            if (commandLineService.NoGpu || ForceSoftwareRendering())
            {
                // disable hardware (GPU) rendering so that it's all done by the CPU...
                RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
            }

            _settingsViewModel.EpubChangedEvent += HandleEpubChangedEvent;

            _previewViewModel.EditTextCommandEvent += HandleEditTextCommandEvent;

            _imagesService        = imagesService;
            _optionsService       = optionsService;
            _snackbarService      = snackbarService;
            _userInterfaceService = userInterfaceService;

            _optionsService.AlwaysOnTopChangedEvent += HandleAlwaysOnTopChangedEvent;
            _optionsService.EpubPathChangedEvent    += HandleEpubPathChangedEvent;

            InitCommands();

            _currentPage     = scripturesViewModel;
            _preSettingsPage = scripturesViewModel;

            if (IsNewInstallation())
            {
                _currentPage = startupViewModel;
            }
            else if (IsBadEpubPath())
            {
                _currentPage = settingsViewModel;
            }

            _nextPageTooltip = Properties.Resources.NEXT_PAGE_PREVIEW;

            GetVersionData();
        }
Esempio n. 19
0
 public SurroundWithFeature(IServiceProvider serviceProvider, ILog log, IOptionsService optionsService,
                            IShellHelperService shellHelperService, IShellSelectionService shellSelectionService,
                            IFileTypeResolver fileTypeResolver, IKeyboardService keyboardService) : base(serviceProvider, log, optionsService)
 {
     _shellHelperService    = shellHelperService;
     _shellSelectionService = shellSelectionService;
     _fileTypeResolver      = fileTypeResolver;
     _keyboardService       = keyboardService;
 }
        public override SelfHostingOptions Default(Target target, IOptionsService optionsService)
        {
            var args = optionsService.GetArguments <SelfHostingArguments>();

            return(new SelfHostingOptions()
            {
                Port = args.ValidationPort
            });
        }
 public ItSystemUsageOptionsController(
     IOptionsService <ItSystem, BusinessType> businessTypeService,
     IOptionsService <ItSystemRight, ItSystemRole> rolesService,
     IGenericRepository <OrganizationUnit> orgUnitsRepository)
 {
     _businessTypeService = businessTypeService;
     _rolesService        = rolesService;
     _orgUnitsRepository  = orgUnitsRepository;
 }
Esempio n. 22
0
        public override EcOptions Default(IOptionsService optionsService)
        {
            var args = optionsService.GetArguments <CsrArguments>();

            return(new EcOptions()
            {
                OcspMustStaple = args.OcspMustStaple
            });
        }
Esempio n. 23
0
        public override CertificateStorePluginOptions Default(IOptionsService optionsService)
        {
            var args = optionsService.GetArguments <CertificateStoreArguments>();

            return(new CertificateStorePluginOptions {
                StoreName = args.CertificateStore,
                KeepExisting = args.KeepExisting
            });
        }
Esempio n. 24
0
        public VideoDisplayManager(IMediaElement mediaElement, TextBlock subtitleBlock, IOptionsService optionsService)
        {
            _mediaElement  = mediaElement;
            _subtitleBlock = subtitleBlock;

            _optionsService = optionsService;

            SubscribeEvents();
        }
Esempio n. 25
0
        protected override void OnApply(PageApplyEventArgs e)
        {
            base.OnApply(e);

            // Make sure we broadcast changes to these options.
            IOptionsService optionsService = (IOptionsService)GetService(typeof(IOptionsService));

            optionsService.InvokeOptionsChanged(EventArgs.Empty);
        }
Esempio n. 26
0
        public AdaptiveTimerService(
            IOptionsService optionsService,
            ITalkScheduleService scheduleService)
        {
            _optionsService  = optionsService;
            _scheduleService = scheduleService;

            Messenger.Default.Register <CountdownWindowStatusChangedMessage>(this, OnCountdownWindowStatusChanged);
        }
Esempio n. 27
0
        public CountdownWindow(
            IOptionsService optionsService,
            IDateTimeService dateTimeService)
        {
            InitializeComponent();

            _optionsService  = optionsService;
            _dateTimeService = dateTimeService;
        }
 public override void Default(ScheduledRenewal renewal, IOptionsService optionsService)
 {
     renewal.Script = optionsService.TryGetRequiredOption(nameof(optionsService.Options.Script), optionsService.Options.Script);
     if (!renewal.Script.ValidFile(_log))
     {
         throw new ArgumentException(nameof(optionsService.Options.Script));
     }
     renewal.ScriptParameters = optionsService.Options.ScriptParameters;
 }
Esempio n. 29
0
 public void StartRecording(RecordingCandidate candidateFile, IOptionsService optionsService)
 {
     if (_status == RecordingStatus.NotRecording)
     {
         _status = RecordingStatus.Recording;
         OnStartedEvent();
         _timer.Start();
     }
 }
Esempio n. 30
0
        public MediaProviderService(IOptionsService optionsService)
        {
            _optionsService = optionsService;

            foreach (var item in _supportedMediaTypes)
            {
                _supportedFileExtensions.Add(item.FileExtension);
            }
        }
Esempio n. 31
0
        public CountdownTimerViewModel(IOptionsService optionsService)
        {
            _optionsService = optionsService;

            // subscriptions...
            Messenger.Default.Register <ShutDownMessage>(this, OnShutDown);
            Messenger.Default.Register <CountdownFrameChangedMessage>(this, OnFrameChanged);
            Messenger.Default.Register <CountdownZoomOrPositionChangedMessage>(this, OnZoomOrPositionChanged);
        }
Esempio n. 32
0
        public CountdownTimerTriggerService(
            IOptionsService optionsService,
            IDateTimeService dateTimeService)
        {
            _optionsService  = optionsService;
            _dateTimeService = dateTimeService;

            UpdateTriggerPeriods();
        }
Esempio n. 33
0
 public AutomateService(
     IOptionsService optionsService,
     ITalkTimerService timerService,
     ITalkScheduleService scheduleService)
 {
     _optionsService  = optionsService;
     _timerService    = timerService;
     _scheduleService = scheduleService;
 }
Esempio n. 34
0
 public static void Format(this ITextBuffer buffer, TextSpan span, IOptionsService optionsService)
 {
     SyntaxTree syntaxTree;
     if (!TryGetSyntaxTree(buffer, out syntaxTree))
         return;
     var edits = Formatter.GetEdits(syntaxTree,
         span,
         optionsService.FormattingOptions);
     ApplyEdits(buffer, edits);
 }
Esempio n. 35
0
 public SyntaxErrorManager(BackgroundParser backgroundParser, ITextView textView, IOptionsService optionsService, IServiceProvider serviceProvider, ITextDocumentFactoryService textDocumentFactoryService)
     : base(textView, optionsService, serviceProvider, textDocumentFactoryService)
 {
     backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.OnIdle,
         async x => await ExceptionHelper.TryCatchCancellation(() =>
         {
             RefreshErrors(x.Snapshot, x.CancellationToken);
             return Task.FromResult(0);
         }));
 }
Esempio n. 36
0
		public void Initialize(XBuilderPackage package)
		{
			_optionsService = package.GetService<IOptionsService>();
			_modelHandler.Initialize(package);
			_effectHandler.Initialize(_graphicsDeviceControl.Services, package);

			_modelHandler.Renderer.Initialize(_graphicsDeviceControl.Services, _graphicsDeviceControl.GraphicsDevice);
			_effectHandler.Renderer.Initialize(_graphicsDeviceControl.Services, _graphicsDeviceControl.GraphicsDevice);
			_textureHandler.Renderer.Initialize(_graphicsDeviceControl.Services, _graphicsDeviceControl.GraphicsDevice);
		}
Esempio n. 37
0
        public FormatCommandTarget(IVsTextView adapter, IWpfTextView textView, IOptionsService optionsService)
        {
            _textView = textView;
            _optionsService = optionsService;

            Dispatcher.CurrentDispatcher.InvokeAsync(() =>
            {
                // Add the target later to make sure it makes it in before other command handlers
                ErrorHandler.ThrowOnFailure(adapter.AddCommandFilter(this, out _nextCommandTarget));
            }, DispatcherPriority.ApplicationIdle);
        }
Esempio n. 38
0
 private static bool ShouldFormatOnCharacter(char ch, IOptionsService optionsService)
 {
     switch (ch)
     {
         case '}':
             return optionsService.GeneralOptions.AutomaticallyFormatBlockOnCloseBrace;
         case ';':
             return optionsService.GeneralOptions.AutomaticallyFormatStatementOnSemicolon;
     }
     return false;
 }
 public BraceCompletionContext(
     ISmartIndentationService smartIndentationService, ITextBufferUndoManagerProvider undoManager, 
     HlslClassificationService classificationService, IOptionsService optionsService,
     VisualStudioSourceTextFactory sourceTextFactory)
 {
     _smartIndentationService = smartIndentationService;
     _undoManager = undoManager;
     _classificationService = classificationService;
     _optionsService = optionsService;
     _sourceTextFactory = sourceTextFactory;
 }
Esempio n. 40
0
        public SyntaxErrorTagger(ITextView textView, BackgroundParser backgroundParser, IErrorListHelper errorListHelper, IOptionsService optionsService)
            : base(PredefinedErrorTypeNames.SyntaxError, errorListHelper)
        {
            optionsService.OptionsChanged += OnOptionsChanged;
            textView.Closed += (sender, e) => optionsService.OptionsChanged -= OnOptionsChanged;

            _errorListHelper = errorListHelper;
            _optionsService = optionsService;
            backgroundParser.RegisterSyntaxTreeHandler(BackgroundParserHandlerPriority.Low, this);

            OnOptionsChanged(this, EventArgs.Empty);
        }
Esempio n. 41
0
        // https://github.com/Microsoft/nodejstools/blob/master/Nodejs/Product/Nodejs/EditFilter.cs#L866
        public static void FormatAfterTyping(this ITextView textView, char ch, IOptionsService optionsService)
        {
            if (!ShouldFormatOnCharacter(ch, optionsService))
                return;

            SyntaxTree syntaxTree;
            if (!TryGetSyntaxTree(textView.TextBuffer, out syntaxTree))
                return;

            var edits = Formatter.GetEditsAfterKeystroke(syntaxTree,
                textView.Caret.Position.BufferPosition.Position, ch,
                optionsService.FormattingOptions);
            ApplyEdits(textView.TextBuffer, edits);
        }
Esempio n. 42
0
        protected ErrorManager(ITextView textView,
            IOptionsService optionsService, IServiceProvider serviceProvider,
            ITextDocumentFactoryService textDocumentFactoryService)
        {
            _textView = textView;
            _optionsService = optionsService;

            optionsService.OptionsChanged += OnOptionsChanged;

            ITextDocument document;
            if (textDocumentFactoryService.TryGetTextDocument(textView.TextBuffer, out document))
                ErrorListHelper = new ErrorListHelper(serviceProvider, document);

            textView.Closed += OnViewClosed;

            OnOptionsChanged(this, EventArgs.Empty);
        }
Esempio n. 43
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OptionsViewModel"/> class.
        /// </summary>
        /// <param name="optionsService">The options service.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="optionsService"/> is <see langword="null"/>.
        /// </exception>
        public OptionsViewModel(IOptionsService optionsService)
            : this()
        {
            if (optionsService == null)
                throw new ArgumentNullException(nameof(optionsService));

            _rootNode = new MergeableNode<OptionsPageViewModel>(null) { Children = new MergeableNodeCollection<OptionsPageViewModel>() };
            OkCommand = new DelegateCommand(Ok);
            ApplyCommand = new DelegateCommand(Apply);
            CancelCommand = new DelegateCommand(Cancel);

            // Merge all options node collections.
            _rootNode.Children.Clear();
            var merger = new OptionsMergeAlgorithm();
            foreach (var optionsNodes in optionsService.OptionsNodeCollections)
                merger.Merge(_rootNode.Children, optionsNodes);

            SelectedNode = OptionsNodes.FirstOrDefault();
        }
Esempio n. 44
0
 public TemplateModule(IOptionsService service)
     : base("/options")
 {
     Get ["/options"] = _ => {
         string template=TemplatesCache.Current.Items["index"];
         var templates=service.Table.ToList ();
         string current="";
         foreach(var item in templates){
             current+=string.Format ("##[{0}](/template/{1})",item.Slug,item.Slug);
         }
         return template.Replace ("{content}",current);
     };
     Get ["/template/{slug}"] = _ => {
         string slug = _.slug;
         var current = service.Table.FirstOrDefault(item=>item.Slug==slug);
         var template = service.Table.FirstOrDefault (item=>item.Slug=="template_editor");
         string result = template.Content.Replace ("{id}",current.ID);
         result = result.Replace ("{slug}",current.Slug);
         result = result.Replace ("{content}",current.Content);
         return result;
     };
 }
Esempio n. 45
0
		private void RecreateGrid(GraphicsDevice graphicsDevice, IOptionsService optionsService)
		{
			_options = optionsService.GetContentPreviewOptions();
			_spacing = _options.GridSpacing;
			_majorLines = _options.MajorLinesEveryNthGridLine;
			_minorColor = ConvertUtility.ToXnaColor(_options.GridLineMinorColor);
			_majorColor = ConvertUtility.ToXnaColor(_options.GridLineMajorColor);
			_axisColor = ConvertUtility.ToXnaColor(_options.GridLineAxisColor);

			int size = _options.GridSize;

			_lineBuffer = new VertexBuffer(graphicsDevice, typeof(VertexPositionColor), size * 4, BufferUsage.WriteOnly);

			VertexPositionColor[] vertices = new VertexPositionColor[size * 4];

			int end = (size - 1) / 2;
			int start = -end;

			int index = 0;

			// Lines along z.
			for (int x = start; x <= end; ++x)
			{
				Color color = GetColor(x);
				vertices[index++] = new VertexPositionColor(new Vector3(GetCoordinate(x), 0, GetCoordinate(start)), color);
				vertices[index++] = new VertexPositionColor(new Vector3(GetCoordinate(x), 0, GetCoordinate(end)), color);
			}

			// Lines along x.
			for (int z = start; z <= end; ++z)
			{
				Color color = GetColor(z);
				vertices[index++] = new VertexPositionColor(new Vector3(GetCoordinate(start), 0, GetCoordinate(z)), color);
				vertices[index++] = new VertexPositionColor(new Vector3(GetCoordinate(end), 0, GetCoordinate(z)), color);
			}

			_lineBuffer.SetData(vertices);
		}
		public ContentPreviewIntegrationManager(XBuilderPackage package)
		{
			_package = package;
			_optionsService = package.GetService<IOptionsService>();
		}
Esempio n. 47
0
		public override void Initialize(IServiceProvider serviceProvider, GraphicsDevice graphicsDevice)
		{
			_optionsService = (IOptionsService)serviceProvider.GetService(typeof(IOptionsService));
			_optionsService.OptionsChanged += (sender, e) =>
			{
				RecreateNormals();
				_parentControl.Invalidate();
			};

			_lineEffect = new BasicEffect(graphicsDevice);
			_lineEffect.LightingEnabled = false;
			_lineEffect.TextureEnabled = false;
			_lineEffect.VertexColorEnabled = true;
		}
Esempio n. 48
0
		public static bool IsInspectableFile(IOptionsService optionsService, string fileName)
		{
			return GetAssetType(optionsService, fileName) != AssetType.None;
		}
		public ContentPreviewService(XBuilderPackage package)
		{
			_package = package;
			_optionsService = package.GetService<IOptionsService>();
		}
Esempio n. 50
0
		public override void Initialize(IServiceProvider serviceProvider, GraphicsDevice graphicsDevice)
		{
			_serviceProvider = serviceProvider;
			_optionsService = (IOptionsService) serviceProvider.GetService(typeof (IOptionsService));
			_optionsService.OptionsChanged += (sender, e) =>
			{
				SetOptions();
				_parentControl.Invalidate();
			};
			SetOptions();

			foreach (ModelRendererWidget widget in _widgets)
				widget.Initialize(serviceProvider, graphicsDevice);
		}