public void RemovePage(FSWPage page) { lock (lock_) { LastAliveDate = DateTime.Now; --NbActivePage; } }
public void RegisterNewPage(FSWPage page) { lock (lock_) { LastAliveDate = DateTime.Now; ++NbActivePage; } }
internal Queue <Property>?PendingChangedProperties; // only used when properties are changed before the control is added to a page public ControlBase(FSWPage?page = null) { Page = page; IsInitializing = true; IsRemoved = false; Children_.CollectionChanged += Children_CollectionChanged; Extensions = new ControlExtensionsCollection(this); InternalInitialize(Page).Wait(); }
public static void RegisterFSWPage(int id, FSWPage page) { lock (PageAwaitingConnections) { if (PageAwaitingConnections.ContainsKey(id)) { throw new Exception("Id already exist"); } PageAwaitingConnections.Add(id, page); } }
public static (int id, string auth) RegisterFSWPage(FSWPage page, string FSWSessionId, string FSWSessionAuth, FSWComponentBase mainComponent, out string newFSWSessionId, out string newFSWSessionAuth) { Session session = null; // try to get an existing session if (!string.IsNullOrEmpty(FSWSessionId)) { session = Session.GetSession(FSWSessionId, FSWSessionAuth); } // if new session OR the existing one doesn't exist anymore if (session == null) { session = Session.GenerateNewSession(); newFSWSessionId = session.Id; newFSWSessionAuth = session.Auth; } else { newFSWSessionId = null; newFSWSessionAuth = null; } int pageId; lock (TempIdLock) pageId = ++LatestTempID; page.Session = session; page.PageAuth = Guid.NewGuid().ToString(); page.IsRegistered = true; page.MainComponent = mainComponent; CommunicationHub.RegisterFSWPage(pageId, page); return(id : pageId, auth : page.PageAuth); }
public FSWManager(FSWPage page) { Page = page; }
internal override void RemoveConnection(FSWPage page) { base.RemoveConnection(page); OnConnectionClosed?.Invoke((T)page); }
internal override void AddNewConnection(FSWPage page) { base.AddNewConnection(page); OnNewConnection?.Invoke((T)page); }
internal virtual void RemoveConnection(FSWPage page) { lock (_lock) Pages.Remove(page); }
internal virtual void AddNewConnection(FSWPage page) { lock (_lock) Pages.AddLast(page); }
public static Task SendError(FSWPage page, Exception exception) { return(SendAsync_ID(page.ID, "error", exception.ToString())); }