From 5283251c7d62e846d1a9abed9d53319573b41b74 Mon Sep 17 00:00:00 2001 From: Tynamix Date: Mon, 7 Aug 2017 19:00:51 +0200 Subject: [PATCH] Fix comments --- Tynamix.ObjectFiller/Filler.cs | 96 +++++++++---------- Tynamix.ObjectFiller/HashStack.cs | 4 +- Tynamix.ObjectFiller/IInterfaceMocker.cs | 2 +- .../Plugins/DateTime/DateTimeRange.cs | 8 +- .../Plugins/Double/DoubleRange.cs | 20 ++-- .../Plugins/Double/FloatRange.cs | 11 +++ .../Plugins/EnumeratorPlugin.cs | 4 +- .../Plugins/IRandomizerPlugin.cs | 6 +- .../Plugins/Integer/IntRange.cs | 11 ++- .../Plugins/List/Collectionizer.cs | 12 +-- .../Plugins/RandomListItem.cs | 4 +- .../Plugins/SequenceGenerator.cs | 2 + .../Plugins/String/CityName.cs | 4 +- .../Plugins/String/CountryName.cs | 4 +- .../Plugins/String/EmailAddresses.cs | 4 +- Tynamix.ObjectFiller/Plugins/String/Lipsum.cs | 4 +- .../Plugins/String/MnemonicString.cs | 4 +- .../Plugins/String/PatternGenerator.cs | 4 + .../Plugins/String/RealNames.cs | 4 +- .../Plugins/String/StreetName.cs | 4 +- Tynamix.ObjectFiller/Random.cs | 9 +- Tynamix.ObjectFiller/Randomizer.cs | 6 +- Tynamix.ObjectFiller/Setup/FluentFillerApi.cs | 8 +- .../Setup/FluentPropertyApi.cs | 18 ++-- Tynamix.ObjectFiller/Setup/FluentTypeApi.cs | 20 ++-- Tynamix.ObjectFiller/Setup/IFluentApi.cs | 12 +-- Tynamix.ObjectFiller/Setup/SetupManager.cs | 14 +-- 27 files changed, 157 insertions(+), 142 deletions(-) diff --git a/Tynamix.ObjectFiller/Filler.cs b/Tynamix.ObjectFiller/Filler.cs index 179c24e..eefe2ee 100644 --- a/Tynamix.ObjectFiller/Filler.cs +++ b/Tynamix.ObjectFiller/Filler.cs @@ -59,7 +59,7 @@ public Filler() /// to create a new object. If you want to use a existing instance use the method. /// /// - /// A created and filled instance of dictionaryType + /// A created and filled instance of dictionaryType /// public T Create() { @@ -87,7 +87,7 @@ public T Create() /// Count of instances to create /// /// - /// with created and filled instances of dictionaryType + /// with created and filled instances of dictionaryType /// public IEnumerable Create(int count) { @@ -107,7 +107,7 @@ public IEnumerable Create(int count) /// The instance To fill. /// /// - /// The filled instance of dictionaryType . + /// The filled instance of dictionaryType . /// public T Fill(T instanceToFill) { @@ -203,13 +203,13 @@ private static bool DictionaryParamTypesAreValid(Type dictionaryType, FillerSetu } /// - /// Creates a default value for the given + /// Creates a default value for the given /// /// /// The property dictionaryType. /// /// - /// Default value for the given + /// Default value for the given /// private static object GetDefaultValueOfType(Type propertyType) { @@ -222,7 +222,7 @@ private static object GetDefaultValueOfType(Type propertyType) } /// - /// Checks if there is a random function for the given + /// Checks if there is a random function for the given /// /// /// The dictionaryType. @@ -231,7 +231,7 @@ private static object GetDefaultValueOfType(Type propertyType) /// The current setup item. /// /// - /// True if there is a random function in the for the given + /// True if there is a random function in the for the given /// private static bool HasTypeARandomFunc(Type type, FillerSetupItem currentSetupItem) { @@ -263,13 +263,13 @@ private static bool ListParamTypeIsValid(Type listType, FillerSetupItem currentS } /// - /// Checks if the given is a dictionary + /// Checks if the given is a dictionary /// /// /// The type to check /// /// - /// True if the target is a dictionary + /// True if the target is a dictionary /// private static bool TypeIsDictionary(Type type) { @@ -277,13 +277,13 @@ private static bool TypeIsDictionary(Type type) } /// - /// Checks if the given is a list + /// Checks if the given is a list /// /// /// The type to check /// /// - /// True if the target is a list + /// True if the target is a list /// private static bool TypeIsList(Type type) { @@ -297,13 +297,13 @@ private static bool TypeIsList(Type type) } /// - /// Checks if the given is a list + /// Checks if the given is a list /// /// /// The type to check /// /// - /// True if the target is a list + /// True if the target is a list /// private static bool TypeIsCollection(Type type) { @@ -322,13 +322,13 @@ private static bool TypeIsCollection(Type type) } /// - /// Checks if the given is a plain old class object + /// Checks if the given is a plain old class object /// /// /// The type to check /// /// - /// True if the target is a plain old class object + /// True if the target is a plain old class object /// private static bool TypeIsPoco(Type type) { @@ -349,7 +349,7 @@ private static bool TypeIsClrType(Type type) } /// - /// Checks if the given can be used by the object filler + /// Checks if the given can be used by the object filler /// /// /// The dictionaryType which will be checked @@ -358,7 +358,7 @@ private static bool TypeIsClrType(Type type) /// The current setup item. /// /// - /// True when the can be used with object filler + /// True when the can be used with object filler /// private static bool TypeIsValidForObjectFiller(Type type, FillerSetupItem currentSetupItem) { @@ -416,16 +416,16 @@ private bool CheckForCircularReference( } /// - /// Checks if a exists in the given list of + /// Checks if a exists in the given list of /// /// - /// Source properties where to check if the is contained + /// Source properties where to check if the is contained /// /// /// The property which will be checked /// /// - /// True if the is in the list of + /// True if the is in the list of /// private bool ContainsProperty(IEnumerable properties, PropertyInfo property) { @@ -433,7 +433,7 @@ private bool ContainsProperty(IEnumerable properties, PropertyInfo } /// - /// Creates a object of the target and fills it up with data according to the given + /// Creates a object of the target and fills it up with data according to the given /// /// /// The target dictionaryType to create and fill @@ -445,7 +445,7 @@ private bool ContainsProperty(IEnumerable properties, PropertyInfo /// The dictionaryType tracker to find circular dependencies /// /// - /// The created and filled object of the given + /// The created and filled object of the given /// private object CreateAndFillObject( Type type, @@ -539,10 +539,10 @@ private Array GetFilledArray(Type type, FillerSetupItem currentSetupItem, HashSt /// The type tracker to find circular dependencies /// /// - /// The created and filled instance of the + /// The created and filled instance of the /// /// - /// Throws Exception if no dictionaryType was registered for the given + /// Throws Exception if no dictionaryType was registered for the given /// private object CreateInstanceOfInterfaceOrAbstractClass( Type interfaceType, @@ -581,7 +581,7 @@ private object CreateInstanceOfInterfaceOrAbstractClass( } /// - /// Creates a instance of the given + /// Creates a instance of the given /// /// /// The dictionaryType to create @@ -636,7 +636,7 @@ private object CreateInstanceOfType(Type type, FillerSetupItem currentSetupItem, } /// - /// Fills the given with random data + /// Fills the given with random data /// /// /// The object to fill. @@ -665,10 +665,10 @@ private void FillInternal(object objectToFill, HashStack typeTracker = nul } /// - /// This method will fill the given of the given + /// This method will fill the given of the given /// /// The object to fill - /// The properties of the which shall get filled + /// The properties of the which shall get filled /// /// The setup for the current object /// @@ -718,7 +718,7 @@ private void FillProperties(object objectToFill, PropertyInfo[] properties, Fill } /// - /// Creates and fills a dictionary of the target + /// Creates and fills a dictionary of the target /// /// /// The dictionaryType of the dictionary @@ -804,7 +804,7 @@ private IDictionary GetFilledDictionary( } /// - /// Creates and fills a list of the given + /// Creates and fills a list of the given /// /// /// Type of the list @@ -816,7 +816,7 @@ private IDictionary GetFilledDictionary( /// The dictionaryType tracker to find circular dependencies /// /// - /// Created and filled list of the given + /// Created and filled list of the given /// private IList GetFilledList(Type propertyType, FillerSetupItem currentSetupItem, HashStack typeTracker) { @@ -868,7 +868,7 @@ private IList GetFilledList(Type propertyType, FillerSetupItem currentSetupItem, } /// - /// Creates and fills a list of the given + /// Creates and fills a list of the given /// /// /// Type of the list @@ -880,7 +880,7 @@ private IList GetFilledList(Type propertyType, FillerSetupItem currentSetupItem, /// The dictionaryType tracker to find circular dependencies /// /// - /// Created and filled list of the given + /// Created and filled list of the given /// private IEnumerable GetFilledCollection(Type propertyType, FillerSetupItem currentSetupItem, HashStack typeTracker) { @@ -965,16 +965,16 @@ private object GetFilledPoco(Type type, FillerSetupItem currentSetupItem, HashSt } /// - /// Selects the given from the given list of + /// Selects the given from the given list of /// /// - /// All properties where the target will be searched in + /// All properties where the target will be searched in /// /// /// The target property. /// /// - /// All properties from which are the same as the target + /// All properties from which are the same as the target /// private IEnumerable GetPropertyFromProperties( IEnumerable properties, @@ -1011,7 +1011,7 @@ private object GetRandomEnumValue(Type type) } /// - /// Gets a random value of the given + /// Gets a random value of the given /// /// /// The property dictionaryType. @@ -1020,7 +1020,7 @@ private object GetRandomEnumValue(Type type) /// The setup item. /// /// - /// A random value of the given + /// A random value of the given /// /// /// Throws exception if object filler was not able to create random data @@ -1042,7 +1042,7 @@ private object GetRandomValue(Type propertyType, FillerSetupItem setupItem) } /// - /// Gets the setter of a + /// Gets the setter of a /// /// /// The for which the setter method will be found @@ -1063,7 +1063,7 @@ private MethodInfo GetSetMethodOnDeclaringType(PropertyInfo propInfo) } /// - /// Checks if a property is ignored by the + /// Checks if a property is ignored by the /// /// /// The property to check for ignorance @@ -1072,7 +1072,7 @@ private MethodInfo GetSetMethodOnDeclaringType(PropertyInfo propInfo) /// The current setup item. /// /// - /// True if the should be ignored + /// True if the should be ignored /// private bool IgnoreProperty(PropertyInfo property, FillerSetupItem currentSetupItem) { @@ -1080,7 +1080,7 @@ private bool IgnoreProperty(PropertyInfo property, FillerSetupItem currentSetupI } /// - /// Sorts the properties like the wants to have it + /// Sorts the properties like the wants to have it /// /// /// The current setup item. @@ -1113,7 +1113,7 @@ private Queue OrderPropertiers(FillerSetupItem currentSetupItem, P } /// - /// Sets the given on the given for the given + /// Sets the given on the given for the given /// /// /// The property to set @@ -1122,7 +1122,7 @@ private Queue OrderPropertiers(FillerSetupItem currentSetupItem, P /// The object to fill. /// /// - /// The value for the + /// The value for the /// private void SetPropertyValue(PropertyInfo property, object objectToFill, object value) { @@ -1138,13 +1138,13 @@ private void SetPropertyValue(PropertyInfo property, object objectToFill, object } /// - /// Checks if the given is a enumeration + /// Checks if the given is a enumeration /// /// /// The type to check /// /// - /// True if the target is a enumeration + /// True if the target is a enumeration /// private static bool TypeIsEnum(Type type) { @@ -1152,7 +1152,7 @@ private static bool TypeIsEnum(Type type) } /// - /// Checks if the given is a nullable enum + /// Checks if the given is a nullable enum /// /// Type to check /// True if the type is a nullable enum @@ -1163,7 +1163,7 @@ private static bool TypeIsNullableEnum(Type type) } /// - /// Checks if the given is a supported array + /// Checks if the given is a supported array /// /// Type to check /// True if the type is a array diff --git a/Tynamix.ObjectFiller/HashStack.cs b/Tynamix.ObjectFiller/HashStack.cs index 3b10786..b1f6d30 100644 --- a/Tynamix.ObjectFiller/HashStack.cs +++ b/Tynamix.ObjectFiller/HashStack.cs @@ -72,7 +72,7 @@ internal bool Push(T item) /// Removes and returns the last added element. /// /// - /// The item of type + /// The item of type /// internal T Pop() { @@ -91,7 +91,7 @@ internal void Clear() } /// - /// Checks if the contains the + /// Checks if the contains the /// /// /// The item. diff --git a/Tynamix.ObjectFiller/IInterfaceMocker.cs b/Tynamix.ObjectFiller/IInterfaceMocker.cs index 9182ea9..44539eb 100644 --- a/Tynamix.ObjectFiller/IInterfaceMocker.cs +++ b/Tynamix.ObjectFiller/IInterfaceMocker.cs @@ -17,7 +17,7 @@ namespace Tynamix.ObjectFiller public interface IInterfaceMocker { /// - /// Creates a mock of the interface with type + /// Creates a mock of the interface with type /// /// Type of the interface /// Mock of the interface diff --git a/Tynamix.ObjectFiller/Plugins/DateTime/DateTimeRange.cs b/Tynamix.ObjectFiller/Plugins/DateTime/DateTimeRange.cs index 2ecda0e..8a86e24 100644 --- a/Tynamix.ObjectFiller/Plugins/DateTime/DateTimeRange.cs +++ b/Tynamix.ObjectFiller/Plugins/DateTime/DateTimeRange.cs @@ -64,9 +64,9 @@ public DateTimeRange(DateTime earliestDate, DateTime latestDate) } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public DateTime GetValue() { var timeSpan = this.latestDate.Subtract(this.earliestDate); @@ -77,9 +77,9 @@ public DateTime GetValue() } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type DateTime? IRandomizerPlugin.GetValue() { return this.GetValue(); diff --git a/Tynamix.ObjectFiller/Plugins/Double/DoubleRange.cs b/Tynamix.ObjectFiller/Plugins/Double/DoubleRange.cs index 3348dd0..0134c35 100644 --- a/Tynamix.ObjectFiller/Plugins/Double/DoubleRange.cs +++ b/Tynamix.ObjectFiller/Plugins/Double/DoubleRange.cs @@ -58,39 +58,39 @@ public DoubleRange() } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public double GetValue() { return Random.NextDouble() * Math.Abs(this.maxValue - this.minValue) + this.minValue; } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type double? IRandomizerPlugin.GetValue() { return this.GetValue(); } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type decimal IRandomizerPlugin.GetValue() { - return (decimal)GetValue(); + return (decimal)this.GetValue(); } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type decimal? IRandomizerPlugin.GetValue() { - return (decimal)GetValue(); + return (decimal)this.GetValue(); } } } diff --git a/Tynamix.ObjectFiller/Plugins/Double/FloatRange.cs b/Tynamix.ObjectFiller/Plugins/Double/FloatRange.cs index 813b490..255df70 100644 --- a/Tynamix.ObjectFiller/Plugins/Double/FloatRange.cs +++ b/Tynamix.ObjectFiller/Plugins/Double/FloatRange.cs @@ -2,6 +2,9 @@ namespace Tynamix.ObjectFiller { using System; + /// + /// Randomizer for type + /// public class FloatRange : IRandomizerPlugin, IRandomizerPlugin { private readonly float _minValue; @@ -37,6 +40,10 @@ public FloatRange() } + /// + /// Gets random data for type + /// + /// Random data for type public float GetValue() { var value = Random.NextDouble(); @@ -44,6 +51,10 @@ public float GetValue() return Convert.ToSingle(value) * (this._maxValue - this._minValue) + this._minValue; } + /// + /// Gets random data for type + /// + /// Random data for type float? IRandomizerPlugin.GetValue() { return this.GetValue(); diff --git a/Tynamix.ObjectFiller/Plugins/EnumeratorPlugin.cs b/Tynamix.ObjectFiller/Plugins/EnumeratorPlugin.cs index 6bd38dc..32be56e 100644 --- a/Tynamix.ObjectFiller/Plugins/EnumeratorPlugin.cs +++ b/Tynamix.ObjectFiller/Plugins/EnumeratorPlugin.cs @@ -40,9 +40,9 @@ public EnumeratorPlugin(IEnumerable enumerable) } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public T GetValue() { // First time? diff --git a/Tynamix.ObjectFiller/Plugins/IRandomizerPlugin.cs b/Tynamix.ObjectFiller/Plugins/IRandomizerPlugin.cs index 2b18c4d..ce180a8 100644 --- a/Tynamix.ObjectFiller/Plugins/IRandomizerPlugin.cs +++ b/Tynamix.ObjectFiller/Plugins/IRandomizerPlugin.cs @@ -10,15 +10,15 @@ namespace Tynamix.ObjectFiller { /// - /// Implement this interface to create a custom randomizer of type + /// Implement this interface to create a custom randomizer of type /// /// Type for which the randomizer will generate data public interface IRandomizerPlugin { /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type T GetValue(); } } \ No newline at end of file diff --git a/Tynamix.ObjectFiller/Plugins/Integer/IntRange.cs b/Tynamix.ObjectFiller/Plugins/Integer/IntRange.cs index 3f322be..dd9fa0d 100644 --- a/Tynamix.ObjectFiller/Plugins/Integer/IntRange.cs +++ b/Tynamix.ObjectFiller/Plugins/Integer/IntRange.cs @@ -52,21 +52,22 @@ public IntRange() } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public int GetValue() { return Random.Next(this.min, this.max); } + /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type int? IRandomizerPlugin.GetValue() { - return GetValue(); + return this.GetValue(); } } } diff --git a/Tynamix.ObjectFiller/Plugins/List/Collectionizer.cs b/Tynamix.ObjectFiller/Plugins/List/Collectionizer.cs index dec64df..b96315e 100644 --- a/Tynamix.ObjectFiller/Plugins/List/Collectionizer.cs +++ b/Tynamix.ObjectFiller/Plugins/List/Collectionizer.cs @@ -95,9 +95,9 @@ public Collectionizer(TRandomizer randomizerToUse, uint minCount, uint maxCount) /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public List GetValue() { var count = Randomizer.Create(new IntRange(this.minCount, this.maxCount)); @@ -112,9 +112,9 @@ public List GetValue() } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type T[] IRandomizerPlugin.GetValue() { return this.GetValue().ToArray(); @@ -122,9 +122,9 @@ T[] IRandomizerPlugin.GetValue() #if !NETSTANDARD1_0 /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type ArrayList IRandomizerPlugin.GetValue() { ArrayList arrayList = new ArrayList(); diff --git a/Tynamix.ObjectFiller/Plugins/RandomListItem.cs b/Tynamix.ObjectFiller/Plugins/RandomListItem.cs index 643c568..d8e1092 100644 --- a/Tynamix.ObjectFiller/Plugins/RandomListItem.cs +++ b/Tynamix.ObjectFiller/Plugins/RandomListItem.cs @@ -56,9 +56,9 @@ public RandomListItem(IEnumerable allAvailableValues) } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public T GetValue() { int rndmListIndex = Random.Next(0, this.allAvailableValues.Length); diff --git a/Tynamix.ObjectFiller/Plugins/SequenceGenerator.cs b/Tynamix.ObjectFiller/Plugins/SequenceGenerator.cs index 1f48a40..9b8bee9 100644 --- a/Tynamix.ObjectFiller/Plugins/SequenceGenerator.cs +++ b/Tynamix.ObjectFiller/Plugins/SequenceGenerator.cs @@ -14,6 +14,7 @@ namespace Tynamix.ObjectFiller { #region SequenceGeneratorSByte +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member public class SequenceGeneratorSByte : IRandomizerPlugin { @@ -696,4 +697,5 @@ public DateTime GetValue() } #endregion +#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member } \ No newline at end of file diff --git a/Tynamix.ObjectFiller/Plugins/String/CityName.cs b/Tynamix.ObjectFiller/Plugins/String/CityName.cs index 53c7c48..c13df16 100644 --- a/Tynamix.ObjectFiller/Plugins/String/CityName.cs +++ b/Tynamix.ObjectFiller/Plugins/String/CityName.cs @@ -32,9 +32,9 @@ static CityName() } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public string GetValue() { var index = Random.Next(AllCityNames.Count - 1); diff --git a/Tynamix.ObjectFiller/Plugins/String/CountryName.cs b/Tynamix.ObjectFiller/Plugins/String/CountryName.cs index 80eb2e0..fc3fccb 100644 --- a/Tynamix.ObjectFiller/Plugins/String/CountryName.cs +++ b/Tynamix.ObjectFiller/Plugins/String/CountryName.cs @@ -32,9 +32,9 @@ static CountryName() } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public string GetValue() { var index = Random.Next(AllCountryNames.Count - 1); diff --git a/Tynamix.ObjectFiller/Plugins/String/EmailAddresses.cs b/Tynamix.ObjectFiller/Plugins/String/EmailAddresses.cs index 04e4757..08b1bf8 100644 --- a/Tynamix.ObjectFiller/Plugins/String/EmailAddresses.cs +++ b/Tynamix.ObjectFiller/Plugins/String/EmailAddresses.cs @@ -96,9 +96,9 @@ public EmailAddresses(IRandomizerPlugin localPartSource, IRandomizerPlug } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public string GetValue() { var localPart = this.GetLocalPart(); diff --git a/Tynamix.ObjectFiller/Plugins/String/Lipsum.cs b/Tynamix.ObjectFiller/Plugins/String/Lipsum.cs index eb2cecb..0f3d96b 100644 --- a/Tynamix.ObjectFiller/Plugins/String/Lipsum.cs +++ b/Tynamix.ObjectFiller/Plugins/String/Lipsum.cs @@ -305,9 +305,9 @@ public Lipsum(LipsumFlavor lipsumFlavor, int minWords = 10, int maxWords = 50, i } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public string GetValue() { if (this.seed.HasValue) diff --git a/Tynamix.ObjectFiller/Plugins/String/MnemonicString.cs b/Tynamix.ObjectFiller/Plugins/String/MnemonicString.cs index e825e9f..f5d88c4 100644 --- a/Tynamix.ObjectFiller/Plugins/String/MnemonicString.cs +++ b/Tynamix.ObjectFiller/Plugins/String/MnemonicString.cs @@ -70,9 +70,9 @@ public MnemonicString(int wordCount, int wordMinLength, int wordMaxLength) } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public string GetValue() { char[] vowels = { 'a', 'e', 'i', 'o', 'u' }; diff --git a/Tynamix.ObjectFiller/Plugins/String/PatternGenerator.cs b/Tynamix.ObjectFiller/Plugins/String/PatternGenerator.cs index e10951e..55dece5 100644 --- a/Tynamix.ObjectFiller/Plugins/String/PatternGenerator.cs +++ b/Tynamix.ObjectFiller/Plugins/String/PatternGenerator.cs @@ -165,6 +165,10 @@ public string GetValue() /// public interface IExpressionGenerator { + /// + /// Appends the given + /// + /// StringBuilder to append void AppendNextValue(StringBuilder sb); } diff --git a/Tynamix.ObjectFiller/Plugins/String/RealNames.cs b/Tynamix.ObjectFiller/Plugins/String/RealNames.cs index 0b28858..5426570 100644 --- a/Tynamix.ObjectFiller/Plugins/String/RealNames.cs +++ b/Tynamix.ObjectFiller/Plugins/String/RealNames.cs @@ -87,9 +87,9 @@ public RealNames(NameStyle nameStyle) } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public string GetValue() { if (this.nameStyle == NameStyle.FirstNameLastName || this.nameStyle == NameStyle.LastNameFirstName) diff --git a/Tynamix.ObjectFiller/Plugins/String/StreetName.cs b/Tynamix.ObjectFiller/Plugins/String/StreetName.cs index 7fb7d28..d2cf920 100644 --- a/Tynamix.ObjectFiller/Plugins/String/StreetName.cs +++ b/Tynamix.ObjectFiller/Plugins/String/StreetName.cs @@ -100,9 +100,9 @@ public StreetName(City targetCity) } /// - /// Gets random data for type + /// Gets random data for type /// - /// Random data for type + /// Random data for type public string GetValue() { var index = Random.Next(this.AllStreetNames.Count - 1); diff --git a/Tynamix.ObjectFiller/Random.cs b/Tynamix.ObjectFiller/Random.cs index 4ec0b8b..fff3076 100644 --- a/Tynamix.ObjectFiller/Random.cs +++ b/Tynamix.ObjectFiller/Random.cs @@ -73,13 +73,13 @@ internal static int Next() } /// - /// Returns a nonnegative number less than specified + /// Returns a nonnegative number less than specified /// /// /// The maximum value. /// /// - /// A nonnegative number less than specified + /// A nonnegative number less than specified /// internal static int Next(int maxValue) { @@ -130,7 +130,7 @@ internal static void NextByte(byte[] buffer) /// /// Min long value /// Max long value - /// A Long between and + /// A Long between and internal static long NextLong(long min, long max) { long longRand = NextLong(); @@ -140,9 +140,6 @@ internal static long NextLong(long min, long max) /// /// Gets a random value between to source long values /// - /// Min long value - /// Max long value - /// A Long between and internal static long NextLong() { byte[] buf = new byte[8]; diff --git a/Tynamix.ObjectFiller/Randomizer.cs b/Tynamix.ObjectFiller/Randomizer.cs index 3611ac4..44e084e 100644 --- a/Tynamix.ObjectFiller/Randomizer.cs +++ b/Tynamix.ObjectFiller/Randomizer.cs @@ -33,9 +33,9 @@ static Randomizer() } /// - /// Creates a random value of type . + /// Creates a random value of type . /// - /// A value of type + /// A value of type public static T Create() { return Create(null as FillerSetup); @@ -94,7 +94,7 @@ public static IEnumerable Create(FillerSetup setup, int amount) /// Creates a random value of the target type. It will use a for that /// /// to use - /// A random value of type + /// A random value of type public static T Create(IRandomizerPlugin randomizerPlugin) { Setup.TypeToRandomFunc[typeof(T)] = () => randomizerPlugin.GetValue(); diff --git a/Tynamix.ObjectFiller/Setup/FluentFillerApi.cs b/Tynamix.ObjectFiller/Setup/FluentFillerApi.cs index c9d6975..eee82bf 100644 --- a/Tynamix.ObjectFiller/Setup/FluentFillerApi.cs +++ b/Tynamix.ObjectFiller/Setup/FluentFillerApi.cs @@ -73,7 +73,7 @@ public FluentCircularApi OnCircularReference() } /// - /// Starts to configure a property of the for object filler. + /// Starts to configure a property of the for object filler. /// So you can setup a custom randomizer to a specific property within a class. /// /// @@ -159,7 +159,7 @@ public FluentFillerApi IgnoreInheritance() /// /// Setup the minimum and maximum item count for lists. The ObjectFiller will not generate more or less list items then this limits. - /// The default value for is 1. The default value for is 25. + /// The default value for is 1. The default value for is 25. /// /// /// Minimum item in a list. Default: 1 @@ -195,7 +195,7 @@ public FluentFillerApi DictionaryItemCount(int maxCount) /// /// Setup the minimum and maximum count of keys in dictionaries. The ObjectFiller will not generate more or less list items then this limits. - /// The default value for is 1. The default value for is 25. + /// The default value for is 1. The default value for is 25. /// /// /// Minimum items count of keys in a dictionary. Default: 1 @@ -214,7 +214,7 @@ public FluentFillerApi DictionaryItemCount(int minCount, int maxC } /// - /// Register a IInterfaceMocker which will Mock your interfaces which are not registered with the method. + /// Register a IInterfaceMocker which will Mock your interfaces which are not registered with the IFluentFillerApi{TTargetObject}.RegisterInterface{TInterface,TImplementation} method. /// To use a Mocker like MOQ or RhinoMocks, it is necessary to implement the for this mocking framework. /// /// Mocker which will be used to mock interfaces diff --git a/Tynamix.ObjectFiller/Setup/FluentPropertyApi.cs b/Tynamix.ObjectFiller/Setup/FluentPropertyApi.cs index 26c5e86..8760f2c 100644 --- a/Tynamix.ObjectFiller/Setup/FluentPropertyApi.cs +++ b/Tynamix.ObjectFiller/Setup/FluentPropertyApi.cs @@ -83,7 +83,7 @@ public FluentFillerApi UseDefault() } /// - /// Defines which static value will be used for the given + /// Defines which static value will be used for the given /// /// Value which will be used /// Main FluentFiller API @@ -93,9 +93,9 @@ public FluentFillerApi Use(TTargetType valueToUse) } /// - /// Defines which will be used to generate a value for the given + /// Defines which will be used to generate a value for the given /// - /// which will be used to generate a value of the + /// which will be used to generate a value of the /// Main FluentFiller API public FluentFillerApi Use(Func randomizerFunc) { @@ -108,7 +108,7 @@ public FluentFillerApi Use(Func randomizerFunc) } /// - /// Defines which is used to generate a value for the given + /// Defines which is used to generate a value for the given /// /// The setup which is used for configuration. public FluentFillerApi Use(FillerSetup setup) @@ -123,9 +123,9 @@ public FluentFillerApi Use(FillerSetup setup) } /// - /// Defines which implementation of the interface will be used to generate a value for the given + /// Defines which implementation of the interface will be used to generate a value for the given /// - /// A which will be used to generate a value of the + /// A which will be used to generate a value of the /// Main FluentFiller API public FluentFillerApi Use(IRandomizerPlugin randomizerPlugin) { @@ -134,9 +134,9 @@ public FluentFillerApi Use(IRandomizerPlugin randomi /// - /// Defines which implementation of the interface will be used to generate a value for the given + /// Defines which implementation of the interface will be used to generate a value for the given /// - /// A which will be used to generate a value of the + /// A which will be used to generate a value of the /// Main FluentFiller API public FluentFillerApi Use() where TRandomizerPlugin : IRandomizerPlugin, new() @@ -150,7 +150,7 @@ public FluentFillerApi Use() /// With that you can generate random data in a specific order, with include, exclude and all the other stuff /// what is possible with and LINQ /// - /// An with items of type which will be used to fill the data. + /// An with items of type which will be used to fill the data. /// Main FluentFiller API public FluentFillerApi Use(IEnumerable enumerable) { diff --git a/Tynamix.ObjectFiller/Setup/FluentTypeApi.cs b/Tynamix.ObjectFiller/Setup/FluentTypeApi.cs index aecdb35..c85c1e5 100644 --- a/Tynamix.ObjectFiller/Setup/FluentTypeApi.cs +++ b/Tynamix.ObjectFiller/Setup/FluentTypeApi.cs @@ -46,7 +46,7 @@ internal FluentTypeApi(FluentFillerApi callback, SetupManager set } /// - /// Defines which static value will be used for the given + /// Defines which static value will be used for the given /// /// Value which will be used /// Main FluentFiller API @@ -56,9 +56,9 @@ public FluentFillerApi Use(TTargetType valueToUse) } /// - /// Defines which will be used to generate a value for the given + /// Defines which will be used to generate a value for the given /// - /// which will be used to generate a value of the + /// which will be used to generate a value of the /// Main FluentFiller API public FluentFillerApi Use(Func randomizerFunc) { @@ -67,9 +67,9 @@ public FluentFillerApi Use(Func randomizerFunc) } /// - /// Defines which implementation of the interface will be used to generate a value for the given + /// Defines which implementation of the interface will be used to generate a value for the given /// - /// A which will be used to generate a value of the + /// A which will be used to generate a value of the /// Main FluentFiller API public FluentFillerApi Use(IRandomizerPlugin randomizerPlugin) { @@ -78,9 +78,9 @@ public FluentFillerApi Use(IRandomizerPlugin randomi } /// - /// Defines which implementation of the interface will be used to generate a value for the given + /// Defines which implementation of the interface will be used to generate a value for the given /// - /// A which will be used to generate a value of the + /// A which will be used to generate a value of the /// Main FluentFiller API public FluentFillerApi Use() where TRandomizerPlugin : IRandomizerPlugin, new() @@ -94,7 +94,7 @@ public FluentFillerApi Use() /// With that you can generate random data in a specific order, with include, exclude and all the other stuff /// what is possible with and LINQ /// - /// An with items of type which will be used to fill the data. + /// An with items of type which will be used to fill the data. /// Main FluentFiller API public FluentFillerApi Use(IEnumerable enumerable) { @@ -125,10 +125,10 @@ public FluentFillerApi IgnoreIt() } /// - /// Registers a implementation of an interface + /// Registers a implementation of an interface /// The implementation must derive from the interface. /// - /// Type of the implementation which will be used to create a instance of the interface of type + /// Type of the implementation which will be used to create a instance of the interface of type /// Main FluentFiller API public FluentFillerApi CreateInstanceOf() where TImplementation : class, TTargetType diff --git a/Tynamix.ObjectFiller/Setup/IFluentApi.cs b/Tynamix.ObjectFiller/Setup/IFluentApi.cs index cb3d2f9..713d510 100644 --- a/Tynamix.ObjectFiller/Setup/IFluentApi.cs +++ b/Tynamix.ObjectFiller/Setup/IFluentApi.cs @@ -22,23 +22,23 @@ namespace Tynamix.ObjectFiller internal interface IFluentApi where TTargetObject : class { /// - /// Defines which static value will be used for the given + /// Defines which static value will be used for the given /// /// Value which will be used /// Main FluentFiller API FluentFillerApi Use(TTargetType valueToUse); /// - /// Defines which will be used to generate a value for the given + /// Defines which will be used to generate a value for the given /// - /// which will be used to generate a value of the + /// which will be used to generate a value of the /// Main FluentFiller API FluentFillerApi Use(Func randomizerFunc); /// - /// Defines which implementation of the interface will be used to generate a value for the given + /// Defines which implementation of the interface will be used to generate a value for the given /// - /// A which will be used to generate a value of the + /// A which will be used to generate a value of the /// Main FluentFiller API FluentFillerApi Use(IRandomizerPlugin randomizerPlugin); @@ -47,7 +47,7 @@ internal interface IFluentApi where TTargetObject : /// With that you can generate random data in a specific order, with include, exclude and all the other stuff /// what is possible with and LINQ /// - /// An with items of type which will be used to fill the data. + /// An with items of type which will be used to fill the data. /// Main FluentFiller API FluentFillerApi Use(IEnumerable enumerable); diff --git a/Tynamix.ObjectFiller/Setup/SetupManager.cs b/Tynamix.ObjectFiller/Setup/SetupManager.cs index 9c31144..2f343f9 100644 --- a/Tynamix.ObjectFiller/Setup/SetupManager.cs +++ b/Tynamix.ObjectFiller/Setup/SetupManager.cs @@ -33,7 +33,7 @@ internal SetupManager() /// Gets the for a given type /// /// Type for which a will be get - /// for type + /// for type internal FillerSetupItem GetFor() where TTargetObject : class { @@ -44,26 +44,26 @@ internal FillerSetupItem GetFor() /// Gets the for a given type /// /// Type for which a will be get - /// for type + /// for type internal FillerSetupItem GetFor(Type targetType) { - if (FillerSetup.TypeToFillerSetup.ContainsKey(targetType)) + if (this.FillerSetup.TypeToFillerSetup.ContainsKey(targetType)) { - return FillerSetup.TypeToFillerSetup[targetType]; + return this.FillerSetup.TypeToFillerSetup[targetType]; } - return FillerSetup.MainSetupItem; + return this.FillerSetup.MainSetupItem; } /// - /// Sets a new for the given + /// Sets a new for the given /// /// Type of target object for which a new will be set. /// FALSE if the target object will take the settings of the parent object internal void SetNewFor(bool useDefaultSettings) where TTargetObject : class { - FillerSetup.TypeToFillerSetup[typeof(TTargetObject)] = useDefaultSettings ? new FillerSetupItem() : FillerSetup.MainSetupItem; + this.FillerSetup.TypeToFillerSetup[typeof(TTargetObject)] = useDefaultSettings ? new FillerSetupItem() : FillerSetup.MainSetupItem; } } }