Esempio n. 1
0
 protected string Serialise <T>(T entity)
 {
     if (OverriseSerialiser != null)
     {
         return(OverriseSerialiser.Serialise(entity));
     }
     return(_entitySerialiser.Serialise(entity));
 }
Esempio n. 2
0
        protected T Deserialise <T>(string entity)
            where T : class
        {
            try
            {
                if (OverriseSerialiser != null)
                {
                    return(OverriseSerialiser.Deserialise <T>(entity));
                }
                var e = _entitySerialiser.Deserialise <T>(entity);
                return(e);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Des problem: " + ex.Message);
            }

            return(null);
        }
Esempio n. 3
0
        protected T Deserialise <T>(string entity)
            where T : class
        {
            try
            {
                if (OverriseSerialiser != null)
                {
                    return(OverriseSerialiser.Deserialise <T>(entity));
                }
                var e = _entitySerialiser.Deserialise <T>(entity);
                return(e);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Des problem: " + ex.Message);
                ContainerHost.Container.Resolve <ILogService>().TrackException(ex, new Dictionary <string, string>
                {
                    { "Entity", entity }
                });
            }

            return(null);
        }