c# - Should placeholder text be used for EventArgs properties if the value is not available? -
let's had event messagetransferfailed
. event takes eventargs
argument specifies local ip , remote ip.
now let's assume message transfer failed because corresponding tcpclient
disposed , result, can no longer access client.localendpoint
, client.remoteendpoint
.
now have (?) specify sort of placeholder ips event args event invocation because cannot access them tcpclient. guideline placeholder text use in circumstance?
should both properties (localip
, remoteip
) contain empty strings? sort sort of meaningful message "unknown"
? sentence indicating error occurred clients can understand happened?
what best practice in situation?
set localip
, remoteip
null
, add new property specify whether or not result succeeded
Comments
Post a Comment