瀏覽代碼

fixed guard for netstd2.0

Vicente Penades 3 年之前
父節點
當前提交
76736bb4a9
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      src/SharpGLTF.Core/Validation/ValidationContext.Guards.cs

+ 6 - 2
src/SharpGLTF.Core/Validation/ValidationContext.Guards.cs

@@ -192,14 +192,18 @@ namespace SharpGLTF.Validation
 
         public OUTTYPE IsAnyOf<T>(PARAMNAME parameterName, T value, params T[] values)
         {
-            if (!values.Contains(value)) _LinkThrow(parameterName, $"value {value} is not one of [{string.Join(' ',values)}].");
+            string separator = " ";
+
+            if (!values.Contains(value)) _LinkThrow(parameterName, $"value {value} is not one of [{string.Join(separator, values)}].");
 
             return this;
         }
 
         public OUTTYPE IsAnyOf(PARAMNAME parameterName, Memory.AttributeFormat value, params Memory.AttributeFormat[] values)
         {
-            if (!values.Contains(value)) _LinkThrow(parameterName, $"value {value._GetDebuggerDisplay()} is not one of [{string.Join(' ', values.Select(item=>item._GetDebuggerDisplay()))}].");
+            string separator = " ";
+
+            if (!values.Contains(value)) _LinkThrow(parameterName, $"value {value._GetDebuggerDisplay()} is not one of [{string.Join(separator, values.Select(item=>item._GetDebuggerDisplay()))}].");
 
             return this;
         }