Beispiel #1
0
		public MoreInfoStub MoreInfo(string roomGuid, string lastItemGuidString, int sessionID, string lastActionTicks, string pageUrl, StateStub[] roomState)
		{
			WaitIfDevEnv();

			Guid guid = roomGuid.UnPackGuid();
			Chat.RoomSpec spec = Chat.RoomSpec.FromGuid(guid);
			int usrK = Usr.Current == null ? 0 : Usr.Current.K;

			if (spec == null)
				throw new InvalidRoomException();

			if (!spec.CheckPermission(Usr.Current, false))
				throw new ReadPermissionException();

			storeRoomState(roomState, usrK);

			lastActionTicks = resetLastActionAndSessionID(sessionID);

			MoreInfoStub ms = new MoreInfoStub();
			ms.roomGuid = roomGuid;
			ms.moreInfoHtml = spec.GetMoreInfoHtml();

			RefreshStub r = refreshPrivate(false, lastItemGuidString, sessionID, lastActionTicks, pageUrl, usrK, roomState);
			ms.guestRefreshStubs = r.guestRefreshStubs;
			ms.itemsJson = r.itemsJson;
			ms.lastActionTicks = r.lastActionTicks;
			ms.lastItemGuidReturned = r.lastItemGuidReturned;
			return ms;
		}
Beispiel #2
0
		public void GetMoreInfoSuccessCallback(MoreInfoStub s, object userContext, string methodName)
		{
			if (s != null)
			{
				if (GotMoreInfo != null)
					GotMoreInfo(this, new GotMoreInfoEventArgs(s.roomGuid, s.moreInfoHtml));

				processItems(s.itemsJson, s.lastActionTicks, s.lastItemGuidReturned, methodName, s.guestRefreshStubs, "", false);
			}

			continueProcessingCriticalRequestQueue();
		}