Ejemplo n.º 1
0
		/// <summary>
		/// Sets the owner and must only be called once
		/// </summary>
		/// <param name="textView">Text view</param>
		/// <param name="owner">Owner</param>
		public static void SetOwner(ITextView textView, ICustomLineNumberMarginOwner owner) {
			if (textView == null)
				throw new ArgumentNullException(nameof(textView));
			if (owner == null)
				throw new ArgumentNullException(nameof(owner));
			GetMargin(textView).SetOwner(owner);
		}
Ejemplo n.º 2
0
		void ICustomLineNumberMargin.SetOwner(ICustomLineNumberMarginOwner owner) {
			if (owner == null)
				throw new ArgumentNullException(nameof(owner));
			if (this.owner != null)
				throw new InvalidOperationException();
			this.owner = owner;
			if (Visibility == Visibility.Visible)
				owner.OnVisible();
			RefreshMargin();
		}
Ejemplo n.º 3
0
 /// <summary>
 /// Sets the owner and must only be called once
 /// </summary>
 /// <param name="textView">Text view</param>
 /// <param name="owner">Owner</param>
 public static void SetOwner(ITextView textView, ICustomLineNumberMarginOwner owner)
 {
     if (textView is null)
     {
         throw new ArgumentNullException(nameof(textView));
     }
     if (owner is null)
     {
         throw new ArgumentNullException(nameof(owner));
     }
     GetMargin(textView).SetOwner(owner);
 }
Ejemplo n.º 4
0
 void ICustomLineNumberMargin.SetOwner(ICustomLineNumberMarginOwner owner)
 {
     if (owner == null)
     {
         throw new ArgumentNullException(nameof(owner));
     }
     if (this.owner != null)
     {
         throw new InvalidOperationException();
     }
     this.owner = owner;
     if (Visibility == Visibility.Visible)
     {
         owner.OnVisible();
     }
     RefreshMargin();
 }