public static Client Create(Guid instanceId, ITrayNotifyCallback caller) { return(new Client() { Id = instanceId, Callback = caller, IsValid = true }); }
public void Register(Guid instanceId) { ITrayNotifyCallback caller = OperationContext.Current.GetCallbackChannel <ITrayNotifyCallback>(); if (caller != null) { if (!_clients.ContainsKey(instanceId)) { _clients.Add(instanceId, Client.Create(instanceId, caller)); } } }