private void OnEntryGroupCallback(IntPtr group, EntryGroupState state, IntPtr userdata) { if (StateChanged != null) { StateChanged(this, new EntryGroupStateArgs(state)); } }
private void OnEntryGroupStateChanged(EntryGroupState state, string error) { switch (state) { case EntryGroupState.Collision: if (!OnResponse(ErrorCode.Collision)) { if (originalName == null) { originalName = Name; } Name = originalName + " (" + retryNameModifier + ")"; retryNameModifier++; Console.WriteLine("ZeroConf had a name collision, trying: " + Name); Register(); // throw new ApplicationException (); } break; case EntryGroupState.Failure: if (!OnResponse(ErrorCode.Failure)) { Console.WriteLine("Mono.ZeroConf failed to register name with AvahiDBus"); // throw new ApplicationException (); } break; case EntryGroupState.Established: OnResponse(ErrorCode.Ok); break; } }
private void OnEntryGroupStateChanged(EntryGroupState state, string error) { switch (state) { case EntryGroupState.Collision: if (!OnResponse(ErrorCode.Collision)) { throw new ApplicationException(); } break; case EntryGroupState.Failure: if (!OnResponse(ErrorCode.Failure)) { throw new ApplicationException(); } break; case EntryGroupState.Established: OnResponse(ErrorCode.Ok); break; } }
public EntryGroupStateArgs(EntryGroupState state) { this.state = state; }
private void OnEntryGroupCallback(IntPtr group, EntryGroupState state, IntPtr userdata) { if (StateChanged != null) StateChanged (this, new EntryGroupStateArgs (state)); }
private void OnEntryGroupStateChanged (EntryGroupState state, string error) { switch (state) { case EntryGroupState.Collision: if (!OnResponse (ErrorCode.Collision)) { if (originalName == null) originalName = Name; Name = originalName + " (" + retryNameModifier + ")"; retryNameModifier++; Console.WriteLine("ZeroConf had a name collision, trying: " + Name); Register(); //throw new ApplicationException (); } break; case EntryGroupState.Failure: if (!OnResponse (ErrorCode.Failure)) { Console.WriteLine("Mono.ZeroConf failed to register name with AvahiDBus"); //throw new ApplicationException (); } break; case EntryGroupState.Established: OnResponse (ErrorCode.Ok); break; } }
private void OnEntryGroupStateChanged (EntryGroupState state, string error) { switch (state) { case EntryGroupState.Collision: if (!OnResponse (ErrorCode.Collision)) { throw new ApplicationException (); } break; case EntryGroupState.Failure: if (!OnResponse (ErrorCode.Failure)) { throw new ApplicationException (); } break; case EntryGroupState.Established: OnResponse (ErrorCode.Ok); break; } }