Beispiel #1
0
        /// <summary>
        /// PresenceServiceSpecific: Removes all fields for a specific class
        /// See GameAccount Set Toon for an example
        /// </summary>
        /// <param name="originatingClass"></param>
        public void RemovePresenceFieldsForSpecificClass(FieldKeyHelper.OriginatingClass originatingClass)
        {
            List<PresenceFieldBase> fieldsToRemove = new List<PresenceFieldBase>();
            foreach(var field in presenceFieldList)
            {
                if (field.OriginatingClass == originatingClass)
                    fieldsToRemove.Add(field);
            }
            foreach (var field in fieldsToRemove)
            {
                presenceFieldList.Remove(field);
            }

        }
Beispiel #2
0
 public static Dictionary<ulong, GameAccount> GetGameAccountsForAccountProgram(Account account, FieldKeyHelper.Program program)
 {
     return GameAccounts.Where(pair => pair.Value.Owner != null).Where(pair => (pair.Value.Owner.PersistentID == account.PersistentID) && (pair.Value.Program == program)).ToDictionary(pair => pair.Key, pair => pair.Value);
 }