Beispiel #1
0
		/// <summary>
		/// Write a method signature to the text buffer
		/// </summary>
		/// <param name="mref">Method reference</param>
		protected override void WriteMethodSignature(MethodReference mref)
		{
			mref.Accept(this);

			if (mref.GenericParameters.Count <= 0)
				return;

			foreach (var genparam in mref.GenericParameters.Where(genparam => genparam.Constraints.Count > 0))
			{
				Write(CSharpKeyword.@where, SpaceSurrounder.Both);
				genparam.Accept(this);
				VisitVisitableCollection(GenericConstraintListStart, String.Empty, BasicSeparator, false, genparam.Constraints);
			}
		}
		/// <summary>
		/// Write a method signature to the text buffer
		/// </summary>
		/// <param name="mref">Method reference</param>
		protected override void WriteMethodSignature(MethodReference mref)
		{
			if (IsUnsafe(mref))
			{
				WriteComment("This method is 'unsafe' and cannot be used in VB.NET");
				Write(Comment);
			}
			mref.Accept(this);

			if (mref.ReturnType.FullName == typeof (void).FullName)
				return;

			Write(VisualBasicKeyword.As, SpaceSurrounder.Both);
			VisitTypeReference(mref.ReturnType);
		}