本文整理汇总了C#中Event.GetEventName方法的典型用法代码示例。如果您正苦于以下问题:C# Event.GetEventName方法的具体用法?C# Event.GetEventName怎么用?C# Event.GetEventName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Event
的用法示例。
在下文中一共展示了Event.GetEventName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowFileName
protected override void ShowFileName(Subject caller, Event evt){
FileNameEvent fne = FileNameEvent.Cast(evt);
if( fne != null )
{
string fn = fne.GetFileName();
System.Console.WriteLine( "This is my Scanner. Processing FileName: " + fn );
}
else
{
System.Console.WriteLine( "This is my Anonymization. Unhandled Event type: " + evt.GetEventName() );
}
}
示例2: ShowAnonymization
protected override void ShowAnonymization(Subject caller, Event evt){
/*
* A couple of explanation are necessary here to understand how SWIG work
* http://www.swig.org/Doc1.3/Java.html#adding_downcasts
*
* System.Console.WriteLine( "This is my Anonymization. Type: " + evt.GetEventName() );
* System.Type type = evt.GetType();
* System.Console.WriteLine( "This is my Anonymization. System.Type: " + type.ToString() );
* System.Console.WriteLine( "This is my Anonymization. CheckEvent: " + ae.CheckEvent( evt ) );
* System.Console.WriteLine( "This is my Anonymization. Processing Tag #" + ae.GetTag().toString() );
*/
AnonymizeEvent ae = AnonymizeEvent.Cast(evt);
if( ae != null )
{
Tag t = ae.GetTag();
System.Console.WriteLine( "This is my Anonymization. Processing Tag #" + t.toString() );
}
else
{
System.Console.WriteLine( "This is my Anonymization. Unhandled Event type: " + evt.GetEventName() );
}
}