Exemple #1
0
        public static bool RegisterTypeForAot <T>()
        {
            bool ret = false;

            try
            {
                JsonAotConfig.Register <T>();

                int i = 0;
                if (JsvWriter <T> .WriteFn() != null && JsvReader <T> .GetParseFn() != null)
                {
                    i++;
                }
                if (JsonWriter <T> .WriteFn() != null && JsonReader <T> .GetParseFn() != null)
                {
                    i++;
                }
                if (QueryStringWriter <Poco> .WriteFn() != null)
                {
                    i++;
                }

                CsvSerializer <T> .WriteFn();

                CsvSerializer <T> .WriteObject(null, null);

                CsvWriter <T> .WriteObject(null, null);

                CsvWriter <T> .WriteObjectRow(null, null);

                ret = true;
            }catch (Exception) {}

            return(ret);
        }
Exemple #2
0
        static void RegisterCsvSerializer()
        {
            CsvSerializer <Poco> .WriteFn();

            CsvSerializer <Poco> .WriteObject(null, null);

            CsvWriter <Poco> .WriteObject(null, null);

            CsvWriter <Poco> .WriteObjectRow(null, null);
        }
Exemple #3
0
        public static void InitAot <T>()
        {
            CsvSerializer <T> .WriteFn();

            CsvSerializer <T> .WriteObject(null, null);

            CsvWriter <T> .Write(null, default(IEnumerable <T>));

            CsvWriter <T> .WriteRow(null, default(T));

            CsvWriter <T> .WriteObject(null, default(IEnumerable <T>));

            CsvWriter <T> .WriteObjectRow(null, default(IEnumerable <T>));

            CsvReader <T> .ReadRow(null);

            CsvReader <T> .ReadObject(null);

            CsvReader <T> .ReadObjectRow(null);

            CsvReader <T> .ReadStringDictionary(null);
        }