private Farm <Dog, string> DeserializeObjectString(string json)
 {
     try
     {
         return(FarmSerialization.Deserialize <Farm <Dog, string> >(json));
     }
     catch
     {
         //Do nothing with this exception
         return(null);
     }
 }
 private Farm <string, Barn> DeserializeStringObject(string json)
 {
     try
     {
         return(FarmSerialization.Deserialize <Farm <string, Barn> >(json));
     }
     catch
     {
         //Do nothing with this exception
         return(null);
     }
 }
 private Farm <Dog, Barn> DeserializeObjectObject(string json)
 {
     //We need to not throw away this exception, the last one.
     //try
     //{
     return(FarmSerialization.Deserialize <Farm <Dog, Barn> >(json));
     //}
     //catch
     //{
     //    //Do nothing with this exception
     //    return null;
     //}
 }
Beispiel #4
0
 private Farm <Dog, Barn> DeserializeObjectObject(string yaml)
 {
     return(FarmSerialization.Deserialize <Farm <Dog, Barn> >(yaml));
 }
Beispiel #5
0
 private Farm <Dog, string> DeserializeObjectString(string yaml)
 {
     return(FarmSerialization.Deserialize <Farm <Dog, string> >(yaml));
 }
Beispiel #6
0
 //DANGER WILL ROBINSON, DANGER!!!
 private Farm <string, string> DeserializeStringString(string yaml)
 {
     return((Farm <string, string>)FarmSerialization.Deserialize <Farm <string, string> >(yaml));
 }