Ancestry.QueryProcessor.Compile.Emitter.TypeFromNative C# (CSharp) Method

TypeFromNative() public method

public TypeFromNative ( System native ) : BaseType
native System
return BaseType
        public BaseType TypeFromNative(System.Type native)
        {
            if (ReflectionUtility.IsTupleType(native))
                return TupleTypeFromNative(native);
            if (ReflectionUtility.IsSet(native))
                return new SetType(TypeFromNative(native.GenericTypeArguments[0]));
            if (ReflectionUtility.IsNary(native))
                return new ListType(TypeFromNative(native.GenericTypeArguments[0]));
            BaseType scalarType;
            if (_options.ScalarTypes == null || !_options.ScalarTypes.TryGetValue(native.ToString(), out scalarType))
                return new ScalarType(native);
            return scalarType;
        }