Skip to content

Commit cece842

Browse files
Fix
1 parent 3371ab1 commit cece842

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/SpiceSharpParser/ModelReaders/Netlist/Spice/Readers/EntityGenerators/Components/Semiconductors

src/SpiceSharpParser/ModelReaders/Netlist/Spice/Readers/EntityGenerators/Components/Semiconductors/MosfetGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ public MosfetGenerator()
4040
public void AddMosfet<TModel, TMosfet>()
4141
where TMosfet : SpiceSharp.Components.Component
4242
{
43-
Mosfets.Add(typeof(TModel), (name) =>
43+
Mosfets[typeof(TModel)] = (name) =>
4444
{
4545
var mosfet = (TMosfet)Activator.CreateInstance(typeof(TMosfet), name);
4646
return new MosfetDetails { Mosfet = mosfet, SetModelAction = (model) => mosfet.Model = model.Name };
47-
});
47+
};
4848
}
4949

5050
public override IEntity Generate(string componentIdentifier, string originalName, string type, ParameterCollection parameters, IReadingContext context)

0 commit comments

Comments
 (0)