From 00a482710f70793c949e36a435c9435f49addbea Mon Sep 17 00:00:00 2001 From: MRF Date: Sat, 18 Nov 2023 00:21:15 +0330 Subject: [PATCH] Add Array Type --- Tynamix.ObjectFiller/Filler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tynamix.ObjectFiller/Filler.cs b/Tynamix.ObjectFiller/Filler.cs index 8b2f73e..edc160e 100644 --- a/Tynamix.ObjectFiller/Filler.cs +++ b/Tynamix.ObjectFiller/Filler.cs @@ -390,6 +390,7 @@ private static bool TypeIsValidForObjectFiller(Type type, FillerSetupItem curren || (TypeIsDictionary(type) && DictionaryParamTypesAreValid(type, currentSetupItem)) || TypeIsPoco(type) || TypeIsEnum(type) + || TypeIsArray(type) || (type.IsInterface() && currentSetupItem.InterfaceToImplementation.ContainsKey(type) || currentSetupItem.InterfaceMocker != null); @@ -1207,7 +1208,7 @@ private static bool TypeIsNullableEnum(Type type) /// /// Type to check /// True if the type is a array - private bool TypeIsArray(Type type) + private static bool TypeIsArray(Type type) { return type.IsArray && type.GetArrayRank() == 1; }