Пример #1
0
 public static T Deserialize <T>(byte[] data, bool suppressErrors = true)
 {
     try
     {
         var s = new Gro.Serializer(new Gro.DataMembersExtracters.PropertiesExtractor(), options: Gro.GroBufOptions.None);
         return(s.Deserialize <T>(data));
     }
     catch (Exception e)
     {
         if (!suppressErrors)
         {
             ExceptionDispatchInfo.Capture(e).Throw();
         }
         return(default);
Пример #2
0
            public static byte[] Serialize(Type type, object objectToSerialize, bool compress = true)
            {
                var s = new Gro.Serializer(new Gro.DataMembersExtracters.PropertiesExtractor(), options: Gro.GroBufOptions.None);

                return(s.Serialize(objectToSerialize));
            }
Пример #3
0
            public static byte[] Serialize <T>(T objectToSerialize)
            {
                var s = new Gro.Serializer(new Gro.DataMembersExtracters.PropertiesExtractor(), options: Gro.GroBufOptions.None);

                return(s.Serialize(objectToSerialize));
            }