示例#1
0
 protected BackgroundImageService(IImageSourceService imageSourceService)
 {
     if (imageSourceService == null)
     {
         throw new ArgumentNullException(nameof(imageSourceService));
     }
     this.imageSourceService = imageSourceService;
     imageSourceService.Register(this);
 }
#pragma warning restore 0169

        BackgroundImageService(IWpfTextView wpfTextView, IImageSourceService imageSourceService)
        {
            if (wpfTextView == null)
            {
                throw new ArgumentNullException(nameof(wpfTextView));
            }
            if (imageSourceService == null)
            {
                throw new ArgumentNullException(nameof(imageSourceService));
            }
            this.wpfTextView        = wpfTextView;
            this.imageSourceService = imageSourceService;
            wpfTextView.Closed     += WpfTextView_Closed;
            imageSourceService.Register(this);
        }
示例#3
0
 protected void Initialize() => imageSourceService.Register(this);
		protected BackgroundImageService(IImageSourceService imageSourceService) {
			if (imageSourceService == null)
				throw new ArgumentNullException(nameof(imageSourceService));
			this.imageSourceService = imageSourceService;
			imageSourceService.Register(this);
		}