Mono.CSharp.CSharpCodeGenerator.GenerateEvent C# (CSharp) Method

GenerateEvent() protected method

protected GenerateEvent ( CodeMemberEvent eventRef, CodeTypeDeclaration declaration ) : void
eventRef CodeMemberEvent
declaration CodeTypeDeclaration
return void
		protected override void GenerateEvent (CodeMemberEvent eventRef, CodeTypeDeclaration declaration)
		{
			if (IsCurrentDelegate || IsCurrentEnum) {
				return;
			}

			OutputAttributes (eventRef.CustomAttributes, null, false);

			if (eventRef.PrivateImplementationType == null) {
				OutputMemberAccessModifier (eventRef.Attributes);
			}

			Output.Write ("event ");

			if (eventRef.PrivateImplementationType != null) {
				OutputTypeNamePair (eventRef.Type,
					eventRef.PrivateImplementationType.BaseType + "." + 
					eventRef.Name);
			} else {
				OutputTypeNamePair (eventRef.Type, GetSafeName (eventRef.Name));
			}
			Output.WriteLine (';');
		}
CSharpCodeGenerator