private void RaiseEvents(Operation op, int itemIndex, T oldItem, T newItem) { switch (op) { case Operation.OP_ADD: OnInsert?.Invoke(objects.Count - 1, newItem); break; case Operation.OP_CLEAR: OnClear?.Invoke(); break; case Operation.OP_INSERT: OnInsert?.Invoke(itemIndex, newItem); break; case Operation.OP_REMOVEAT: OnRemove?.Invoke(itemIndex, oldItem); break; case Operation.OP_SET: OnSet?.Invoke(itemIndex, oldItem, newItem); break; } }
public new TValue this[TKey key] { get { return(base[key]); } set { Boolean succesfull = TryGetValue(key, out TValue val); if (succesfull && val?.Equals(value) == true) { return; } base[key] = value; if (succesfull) { OnChange?.Invoke(key, value); } else { OnAdd?.Invoke(key, value); } OnSet?.Invoke(key, value); ItemsChanged?.Invoke(); } }
public new void Add(TKey key, TValue value) { base.Add(key, value); OnAdd?.Invoke(key, value); OnSet?.Invoke(key, value); ItemsChanged?.Invoke(); }
/// <summary> /// Function to set updated time to now, and fire OnSet event. /// </summary> private void SetValue() { if (!_lastUpdated.HasValue) { _lastUpdated = DateTime.Now; } OnSet?.Invoke(this); }
public override TValue this[TKey key] { get { return(base[key]); } set { base[key] = value; OnSet?.Invoke(key, value); } }
public new T this[Int32 index] { get { return(base[index]); } set { base[index] = value; OnSet?.Invoke(ref value); } }
private void DeserializeSet(NetworkReader reader, bool apply) { TKey key = reader.Read <TKey>(); TValue item = reader.Read <TValue>(); if (apply) { TValue oldItem = objects[key]; objects[key] = item; OnSet?.Invoke(key, oldItem, item); } }
private void DeserializeSet(NetworkReader reader, bool apply) { int index = (int)reader.ReadPackedUInt32(); T newItem = reader.Read <T>(); if (apply) { T oldItem = objects[index]; objects[index] = newItem; OnSet?.Invoke(index, oldItem, newItem); } }
public async Task SetSharedAccounts() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Shared Accounts" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetHardwareVaults() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Hardware Vaults" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public void SetValue(bool newState) { if (state && !newState) { digit0.text = "1"; digit1.text = "0"; } else if (!state && newState) { digit0.text = "0"; digit1.text = "1"; } state = newState; OnSet?.Invoke(); }
public async Task SetDisable2fa() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Disable 2FA" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetWorkstations() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Workstations" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetEnableAuthenticator() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Enable Authenticator" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetProfile() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Profile" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetGenerateRecoveryCodes() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Generate Recovery Codes" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetDashboard() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Dashboard" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetTwoFactorAuthentication() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Two Factor Authentication" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetDeletePersonalData() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Delete Personal Data" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetAdministrators() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Administrators" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetTemplates() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Templates" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetParameters() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Settings" }, new Breadcrumb() { Active = true, Content = "Parameters" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetOrgStructure() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Settings" }, new Breadcrumb() { Active = true, Content = "OrgStructure" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetAuditSummaries() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Audit" }, new Breadcrumb() { Active = true, Content = "Summaries" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetHardwareVaultProfiles() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Settings" }, new Breadcrumb() { Active = true, Content = "Hardware Vault Access Profiles" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetDataProtection() { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = true, Content = "Settings" }, new Breadcrumb() { Active = true, Content = "Data Protection" } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public async Task SetEmployeeDetails(string name) { Breadcrumbs = new List <Breadcrumb>() { new Breadcrumb() { Active = false, Link = "/Employees", Content = "Employees" }, new Breadcrumb() { Active = true, Content = name } }; if (OnSet != null) { await OnSet.Invoke(Breadcrumbs); } }
public PlayerInventory(int slotCount, int maxWeight) { CurrentSelected = -1; Slots = new Dictionary <int, InventorySlot>(); for (int i = 0; i < slotCount; ++i) { InventorySlot inventorySlot = new InventorySlot(i, maxWeight); inventorySlot.OnSet = (id, item) => { OnSet.Invoke(id, item); }; inventorySlot.OnSetCount = (id, count) => { OnSetCount.Invoke(id, count); }; inventorySlot.OnUse = (item) => { OnItemUse.Invoke(item); }; inventorySlot.OnEmptyHighlight += (id) => { OnEmptyHighlight.Invoke(id); }; inventorySlot.OnAvailableHighlight += (id) => { OnAvailableHighlight.Invoke(id); }; inventorySlot.OnInaccessibleHighlight += (id) => { OnInaccessibleHighlight.Invoke(id); }; inventorySlot.OnOffHighlight += (id) => { OnOffHighlight.Invoke(id); }; HighlightSlot += inventorySlot.Highlight; OffHighlightSlot += inventorySlot.OffHighlight; Slots.Add(i, inventorySlot); } }
private void RaiseEvents(Operation op, TKey key, TValue value, TValue oldValue) { switch (op) { case Operation.OP_ADD: OnInsert?.Invoke(key, value); break; case Operation.OP_CLEAR: OnClear?.Invoke(); break; case Operation.OP_REMOVE: OnRemove?.Invoke(key, value); break; case Operation.OP_SET: OnSet?.Invoke(key, oldValue, value); break; } }
public void Set(string key, Value value) { _metadataDictionary[_prefix + key] = value; OnSet?.Invoke(); }