public UInt32 Connect(string userID, string password, string computerName) { UInt32 retVal = (UInt32)ReturnValues.bladeAccessBit; try { ITesterObjectCallback proxy = OperationContext.Current.GetCallbackChannel <ITesterObjectCallback>(); ProxyStruct aProxyStruct = new ProxyStruct(computerName, userID, proxy); // TODO : 这里或许可以将这个list去掉,需要验证 _CallbackProxyList.Add(aProxyStruct); } catch (Exception e) { throw e; } return(retVal); }
public UInt32 Connect(string userID, string password, string computerName) { UInt32 retVal = (UInt32)ReturnValues.bladeAccessBit; try { WriteLine(string.Format("TesterObject::Connect Request from [userID:{0}] [ComputerName:{1}]", userID, computerName)); ITesterObjectCallback proxy = OperationContext.Current.GetCallbackChannel <ITesterObjectCallback>(); ProxyStruct aProxyStruct = new ProxyStruct(computerName, userID, proxy); _CallbackProxyList.Add(aProxyStruct); } catch (Exception e) { WriteLine("TesterObject::Connect Exception: " + makeUpExceptionString(e).ToString()); throw e; } WriteLine(string.Format("TesterObject::Connect Granted to [userID:{0}] [ComputerName:{1}] [retVal:{2}]", userID, computerName, retVal)); return(retVal); }