Ejemplo n.º 1
0
        /// <summary>
        /// Deserialization constructor.
        /// </summary>
        /// <param name="parent">The parent.</param>
        /// <param name="src">The source.</param>
        /// <exception cref="System.ArgumentNullException">src</exception>
        public BlueprintMarketGroup(MarketGroup parent, SerializableBlueprintMarketGroup src)
            : base(parent, src)
        {
            src.ThrowIfNull(nameof(src));

            SubGroups  = new BlueprintMarketGroupCollection(this, src.SubGroups);
            Blueprints = new BlueprintCollection(this, src.Blueprints);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initialize static blueprints.
        /// </summary>
        internal static void Load()
        {
            if (s_blueprintMarketGroups != null)
            {
                return;
            }

            BlueprintsDatafile datafile = Util.DeserializeDatafile <BlueprintsDatafile>(DatafileConstants.BlueprintsDatafile);

            s_blueprintMarketGroups = new BlueprintMarketGroupCollection(null, datafile.Groups);

            foreach (var srcGroup in s_blueprintMarketGroups)
            {
                InitializeDictionaries(srcGroup);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initialize static blueprints.
        /// </summary>
        internal static void Load()
        {
            if (BlueprintMarketGroups != null)
            {
                return;
            }

            BlueprintsDatafile datafile = Util.DeserializeDatafile <BlueprintsDatafile>(DatafileConstants.BlueprintsDatafile,
                                                                                        Util.LoadXslt(Properties.Resources.DatafilesXSLT));

            BlueprintMarketGroups = new BlueprintMarketGroupCollection(null, datafile.MarketGroups);

            foreach (BlueprintMarketGroup srcGroup in BlueprintMarketGroups)
            {
                InitializeDictionaries(srcGroup);
            }

            GlobalDatafileCollection.OnDatafileLoaded();
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Deserialization constructor.
 /// </summary>
 /// <param name="src"></param>
 public BlueprintMarketGroup(BlueprintMarketGroup parent, SerializableBlueprintGroup src)
     : base(parent, src)
 {
     m_subCategories = new BlueprintMarketGroupCollection(this, src.SubGroups);
     m_blueprints    = new BlueprintCollection(this, src.Blueprints);
 }