Пример #1
0
        private static bool TryCreatePatchRequest2Compliant(
            IReadOnlyDictionary <string, object> json,
            out Schematized schematized)
        {
            schematized = null;
            try
            {
                ISchematizedJsonDeserializingFactory <PatchRequest2> deserializer =
                    new PatchRequest2JsonDeserializingFactory();
                schematized = deserializer.Create(json);
            }
            catch (OutOfMemoryException)
            {
                throw;
            }
            catch (ThreadAbortException)
            {
                throw;
            }
            catch (ThreadInterruptedException)
            {
                throw;
            }
            catch (StackOverflowException)
            {
                throw;
            }
            catch
            {
                return(false);
            }

            return(true);
        }
Пример #2
0
        private static ISchematizedJsonDeserializingFactory <PatchRequest2> InitializePatchSerializer()
        {
            ISchematizedJsonDeserializingFactory <PatchRequest2> result = new PatchRequest2JsonDeserializingFactory();

            return(result);
        }