예제 #1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="Session" /> class with the specified player and definition.
        /// </summary>
        /// <param name="player">The player, which must not be <c>null</c>.</param>
        /// <param name="definition">The definition, which must not be <c>null</c>.</param>
        public Session(TSPlayer player, SessionDefinition definition)
        {
            Debug.Assert(player != null, "Player must not be null.");
            Debug.Assert(definition != null, "Definition must not be null.");

            _player     = player;
            _definition = definition;
        }
예제 #2
0
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="source">Source SessionDefinition from which to copy from.</param>
 public SessionDefinition(SessionDefinition source)
 {
     ClassNameToExp       = source.ClassNameToExp == null ? null : new Dictionary <string, long>(source.ClassNameToExp);
     ClassNameToLevelName = source.ClassNameToLevelName == null ? null : new Dictionary <string, string>(source.ClassNameToLevelName);
     CurrentClassName     = source.CurrentClassName;
     ItemIdsGiven         = source.ItemIdsGiven == null ? null : new HashSet <int>(source.ItemIdsGiven);
     LevelNamesObtained   = source.LevelNamesObtained == null ? null : new HashSet <string>(source.LevelNamesObtained);
     MasteredClassNames   = source.MasteredClassNames == null ? null : new HashSet <string>(source.MasteredClassNames);
     UnlockedClassNames   = source.UnlockedClassNames == null ? null : new HashSet <string>(source.UnlockedClassNames);
     UsedClassNames       = source.UsedClassNames == null ? null : new HashSet <string>(source.UsedClassNames);
 }