public bool SaveToFile (ref System.IO.Stream s,CSaveAndLoadTypes.eFormatters format){ BinaryFormatter bFormatter; if (s == null) {CDebug.LogError(CDebug.eMessageTemplate.NullRefrences); return false;} if (format == CSaveAndLoadTypes.eFormatters.Binary){ bFormatter = new BinaryFormatter(); bFormatter.Serialize(s,CBahram_SALContainer.Instance_Save); } return true; }
public bool LoadFromFile (ref Stream s, CSaveAndLoadTypes.eFormatters format){ BinaryFormatter bFormatter; if (format== CSaveAndLoadTypes.eFormatters.Binary){ bFormatter = new BinaryFormatter(); CChair_SALContainer.Instance_Load = (CChair_SALContainer)bFormatter.Deserialize(s); } return true; }
public bool SaveToFile (ref Stream s, CSaveAndLoadTypes.eFormatters format) { BinaryFormatter bFormatter; if (s == null) {Debug.LogError("Null refrence."); return false;} if (format == CSaveAndLoadTypes.eFormatters.Binary){ bFormatter = new BinaryFormatter(); bFormatter.Binder = new CSerialiazatoin.CVersionDeserializationBinder(); bFormatter.Serialize(s,CSaveFileInfo_SALContainer.Instance_Save); } return true; }
public bool SaveToFile (ref System.IO.Stream s,CSaveAndLoadTypes.eFormatters format) { BinaryFormatter bFormatter; //if (s== null) return false; //need debug if (format== CSaveAndLoadTypes.eFormatters.Binary){ bFormatter = new BinaryFormatter(); bFormatter.Serialize(s,CChair_SALContainer.Instance_Save); } return true; }
public bool LoadFromFile (ref Stream s, CSaveAndLoadTypes.eFormatters format){ return false; }
public static void Serializer(ref Stream s,object agent, CSaveAndLoadTypes.eFormatters format) { }
public bool LoadFromFile (ref Stream s, CSaveAndLoadTypes.eFormatters format) { BinaryFormatter bFormatter; try{ if (format == CSaveAndLoadTypes.eFormatters.Binary){ bFormatter = new BinaryFormatter(); bFormatter.Binder = new CSerialiazatoin.CVersionDeserializationBinder(); CSaveFileInfo_SALContainer.Instance_Load = (CSaveFileInfo_SALContainer)bFormatter.Deserialize(s); } } catch(SerializationException e){ CDebug.LogExWarning(e.Message); return false; } catch (SecurityException e){ CDebug.LogExError(e.Message); return false; } catch (ArgumentNullException e){ CDebug.LogExError(e.Message); return false; } return true; }