private void addIfChanged(List <UserVariable> userVariables, SocketUserVars key, object newValue) { Type typeFromSFSVariableType = SmartFoxUtil.GetTypeFromSFSVariableType(key.GetVariableType()); object obj = ((newValue == null) ? null : Convert.ChangeType(newValue, typeFromSFSVariableType)); if (mt.isLoggedIn) { UserVariable var = null; bool flag = mt.TryGetUserVariable(key.GetKey(), out var); if ((!flag && obj != null) || (flag && obj != SmartFoxUtil.GetValueFromSFSUserValue(var, typeFromSFSVariableType))) { userVariables.Add(new SFSUserVariable(key.GetKey(), obj)); } } }