Пример #1
0
 internal void AddGlyphTextMarkerListener(IGlyphTextMarkerListener listener)
 {
     if (glyphTextMarkerListener != null)
     {
         throw new InvalidOperationException("Only one instance is supported");
     }
     glyphTextMarkerListener = listener ?? throw new ArgumentNullException(nameof(listener));
 }
Пример #2
0
 internal void RemoveGlyphTextMarkerListener(IGlyphTextMarkerListener listener)
 {
     if (listener == null)
     {
         throw new ArgumentNullException(nameof(listener));
     }
     if (glyphTextMarkerListener != listener)
     {
         throw new ArgumentException();
     }
     glyphTextMarkerListener = null;
 }
		internal void RemoveGlyphTextMarkerListener(IGlyphTextMarkerListener listener) {
			if (listener == null)
				throw new ArgumentNullException(nameof(listener));
			if (glyphTextMarkerListener != listener)
				throw new ArgumentException();
			glyphTextMarkerListener = null;
		}
		internal void AddGlyphTextMarkerListener(IGlyphTextMarkerListener listener) {
			if (listener == null)
				throw new ArgumentNullException(nameof(listener));
			if (glyphTextMarkerListener != null)
				throw new InvalidOperationException("Only one instance is supported");
			glyphTextMarkerListener = listener;
		}