예제 #1
0
파일: Client.cs 프로젝트: baikangwang/Learn
 public static Client Create(Guid instanceId, ITrayNotifyCallback caller)
 {
     return(new Client()
     {
         Id = instanceId, Callback = caller, IsValid = true
     });
 }
예제 #2
0
        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));
                }
            }
        }