Skip to content

Filler methods should be virtual #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Tynamix.ObjectFiller/Filler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public Filler()
/// <returns>
/// A created and filled instance of dictionaryType <typeparamref name="T"/>
/// </returns>
public T Create()
public virtual T Create()
{
T objectToFill;
var hashStack = new HashStack<Type>();
Expand Down Expand Up @@ -89,7 +89,7 @@ public T Create()
/// <returns>
/// <see cref="IEnumerable{T}"/> with created and filled instances of dictionaryType <typeparamref name="T"/>
/// </returns>
public IEnumerable<T> Create(int count)
public virtual IEnumerable<T> Create(int count)
{
IList<T> items = new List<T>();
for (int n = 0; n < count; n++)
Expand All @@ -109,7 +109,7 @@ public IEnumerable<T> Create(int count)
/// <returns>
/// The filled instance of dictionaryType <typeparamref name="T"/>.
/// </returns>
public T Fill(T instanceToFill)
public virtual T Fill(T instanceToFill)
{
this.FillInternal(instanceToFill);

Expand All @@ -120,7 +120,7 @@ public T Fill(T instanceToFill)
/// Call this to start the setup for the <see cref="Filler{T}"/>
/// </summary>
/// <returns>Fluent API setup</returns>
public FluentFillerApi<T> Setup()
public virtual FluentFillerApi<T> Setup()
{
return this.Setup(false);
}
Expand All @@ -130,7 +130,7 @@ public FluentFillerApi<T> Setup()
/// </summary>
/// <param name="explicitSetup">True if just properties shall get filled which configured in filler setup.</param>
/// <returns>Fluent API setup</returns>
public FluentFillerApi<T> Setup(bool explicitSetup)
public virtual FluentFillerApi<T> Setup(bool explicitSetup)
{
return this.Setup(null, explicitSetup);
}
Expand All @@ -145,7 +145,7 @@ public FluentFillerApi<T> Setup(bool explicitSetup)
/// <returns>
/// Fluent API Setup
/// </returns>
public FluentFillerApi<T> Setup(FillerSetup fillerSetupToUse)
public virtual FluentFillerApi<T> Setup(FillerSetup fillerSetupToUse)
{
return this.Setup(fillerSetupToUse, false);
}
Expand All @@ -161,7 +161,7 @@ public FluentFillerApi<T> Setup(FillerSetup fillerSetupToUse)
/// <returns>
/// Fluent API Setup
/// </returns>
public FluentFillerApi<T> Setup(FillerSetup fillerSetupToUse, bool explicitSetup)
public virtual FluentFillerApi<T> Setup(FillerSetup fillerSetupToUse, bool explicitSetup)
{
if (fillerSetupToUse != null)
{
Expand Down