/// <summary> /// Registers a new factory with the specified platform ID. /// </summary> /// <param name="platformID">The ID of the platform.</param> /// <param name="factory">The factory instance.</param> public void Register(string platformID, SpecFactory factory) { factories.Add(platformID, factory); }
/// <summary> /// Sets the currently used <see cref="SpecFactory"/> to the correct implementation /// based on the platform ID. /// </summary> /// <param name="platform">The platform ID.</param> void SetFactoryForPlatform(string platform) { factory = factoryDispenser.Get(platform); }