简体   繁体   English

从ICallbackEventHandler接口重写RaiseCallbackEvent(string eventArgument)方法。 可能吗?

[英]Override the RaiseCallbackEvent(string eventArgument) method from ICallbackEventHandler interface. Is it possible?

I need to implement the ICallbackEventHandler interface in C#, but I need slightly different logic... The thing is, that the RaiseCallbackEvent method accepts string as input argument, but I need it to be say, XmlDocument, or some other not-simple data type passed from the javascipt code. 我需要在C#中实现ICallbackEventHandler接口,但我需要略有不同的逻辑...事实是, RaiseCallbackEvent方法接受字符串作为输入参数,但是我需要说它是XmlDocument或其他一些非简单数据从javascipt代码传递的类型。

Is it possible, and what is the best way to accomplish this? 有可能吗,最好的方法是什么?

Thanks. 谢谢。

No, the signature of your method must match the interface exactly. 不,方法的签名必须与接口完全匹配。
But you can send in XmlDocument.OuterXml as the string. 但是您可以将XmlDocument.OuterXml作为字符串发送。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM