summaryrefslogtreecommitdiffstats
path: root/avahi-sharp/ResolverBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-sharp/ResolverBase.cs')
-rw-r--r--avahi-sharp/ResolverBase.cs19
1 files changed, 4 insertions, 15 deletions
diff --git a/avahi-sharp/ResolverBase.cs b/avahi-sharp/ResolverBase.cs
index 0fdd4a1..5d375b3 100644
--- a/avahi-sharp/ResolverBase.cs
+++ b/avahi-sharp/ResolverBase.cs
@@ -25,23 +25,12 @@ namespace Avahi
{
public abstract class ResolverBase
{
- public event EventHandler NotFound;
- public event EventHandler Failed;
+ public event ErrorCodeHandler Failed;
- internal void EmitResolverEvent (ResolverEvent revent)
+ internal void EmitFailure (ErrorCode code)
{
- switch (revent) {
- case ResolverEvent.NotFound:
- if (NotFound != null)
- NotFound (this, new EventArgs ());
- break;
- case ResolverEvent.Failure:
- if (Failed != null)
- Failed (this, new EventArgs ());
- break;
- default:
- break;
- }
+ if (Failed != null)
+ Failed (this, code);
}
}
}