コード例 #1
0
ファイル: NETGenerator.cs プロジェクト: CSRedRat/pascalabcnet
 public override void visit(ICommonEventNode value)
 {
     EventBuilder evb = cur_type.DefineEvent(value.Name, EventAttributes.None, helper.GetTypeReference(value.DelegateType).tp);
     if (value.AddMethod != null)
         evb.SetAddOnMethod(helper.GetMethodBuilder(value.AddMethod));
     if (value.RemoveMethod != null)
         evb.SetRemoveOnMethod(helper.GetMethodBuilder(value.RemoveMethod));
     if (value.RaiseMethod != null)
         evb.SetRaiseMethod(helper.GetMethodBuilder(value.RaiseMethod));
     helper.AddEvent(value, evb);
 }
コード例 #2
0
 public virtual void visit(ICommonEventNode value)
 {
 }
コード例 #3
0
ファイル: Visitor.cs プロジェクト: lisiynos/pascalabcnet
        public void visit(ICommonEventNode value)
		{
			
		}
コード例 #4
0
ファイル: Visitor.cs プロジェクト: CSRedRat/pascalabcnet
		public void visit(ICommonEventNode value)
		{
            throw new System.NotSupportedException(value.GetType().ToString());
		}
コード例 #5
0
ファイル: HtmlUtils.cs プロジェクト: lisiynos/pascalabcnet
		public static bool can_write(ICommonEventNode t)
		{
			return !(string.IsNullOrEmpty(t.Documentation) && !builder.options.ShowNoCommentedElements || t.Name.Contains("$")
			        || user_doc_disabled(t.Documentation));
		}
コード例 #6
0
ファイル: HtmlUtils.cs プロジェクト: lisiynos/pascalabcnet
		public static string get_event_header(ICommonEventNode f)
		{
			StringBuilder sb = new StringBuilder();
			string hdr = HelpUtils.extract_user_defined_header(f.Documentation);
			if (!string.IsNullOrEmpty(hdr))
			{
				sb.Append("<div>"+hdr+"</div>");
				return sb.ToString();
			}
			sb.Append("<div>");
			sb.Append(get_span_for_keyword(get_text_for_access_level(f.field_access_level))+" ");
			if (f.polymorphic_state == polymorphic_state.ps_static)
				sb.Append(get_span_for_keyword("class")+" ");
			sb.Append(get_span_for_keyword("event")+" ");
			sb.Append(get_span_for_identifier(f.Name));
			sb.Append(" : "+get_type_html_text(f.DelegateType));
			sb.Append("</div>");
			return sb.ToString();
		}
コード例 #7
0
ファイル: HtmlUtils.cs プロジェクト: lisiynos/pascalabcnet
		public static string get_event_name(ICommonEventNode e)
		{
			return get_type_name(e.comperehensive_type) + "." + e.Name;
		}