MCPcopy Create free account
hub / github.com/Tencent/xLua / GetChecker

Method GetChecker

Assets/XLua/Src/ObjectCasters.cs:199–215  ·  view source on GitHub ↗
(Type type)

Source from the content-addressed store, hash-verified

197 }
198
199 public ObjectCheck GetChecker(Type type)
200 {
201 if (type.IsByRef) type = type.GetElementType();
202
203 Type underlyingType = Nullable.GetUnderlyingType(type);
204 if (underlyingType != null)
205 {
206 return genNullableChecker(GetChecker(underlyingType));
207 }
208 ObjectCheck oc;
209 if (!checkersMap.TryGetValue(type, out oc))
210 {
211 oc = genChecker(type);
212 checkersMap.Add(type, oc);
213 }
214 return oc;
215 }
216 }
217
218 public class ObjectCasters

Callers 2

InitMethod · 0.80
AssignableMethod · 0.80

Calls 2

TryGetValueMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected