ComputeHashCodes() private method

private ComputeHashCodes ( ) : void
return void
        public static void Serialize(string filename, Configuration config)
        {
            config.ComputeHashCodes();
            Debug.Log("serializing to " + filename);
            Debug.Log(config.ToString());

            var serializer = new XmlSerializer(typeof(Configuration));
            RegisterEvents(ref serializer);

            using (var writer = new StreamWriter(filename)) {
                config.OnPreSerialize();
                serializer.Serialize(writer, config);
            }
        }
Esempio n. 2
0
        public static void Serialize(string filename, Configuration config)
        {
            config.ComputeHashCodes();
            Debug.Log("serializing to " + filename);
            Debug.Log(config.ToString());

            var serializer = new XmlSerializer(typeof(Configuration));

            RegisterEvents(ref serializer);

            using (var writer = new StreamWriter(filename)) {
                config.OnPreSerialize();
                serializer.Serialize(writer, config);
            }
        }
Esempio n. 3
0
        public static void Serialize(ISerializableData serializableData, string dataID, Configuration config)
        {
            config.ComputeHashCodes();
            Debug.Log("serializing to save data");
            Debug.Log(config.ToString());

            var serializer             = new XmlSerializer(typeof(Configuration));
            XmlSerializerNamespaces ns = new XmlSerializerNamespaces();

            ns.Add("", "");
            RegisterEvents(ref serializer);
            byte[] configData;

            using (var memoryStream = new MemoryStream()) {
                config.OnPreSerialize();
                serializer.Serialize(memoryStream, config, ns);
                configData = memoryStream.ToArray();
            }

            serializableData.SaveData(dataID, configData);
        }
        public static void Serialize(ISerializableData serializableData, string dataID, Configuration config)
        {
            config.ComputeHashCodes();
            Debug.Log("serializing to save data");
            Debug.Log(config.ToString());

            var serializer = new XmlSerializer(typeof(Configuration));
            XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
            ns.Add("", "");
            RegisterEvents(ref serializer);
            byte[] configData;

            using (var memoryStream = new MemoryStream()) {
                config.OnPreSerialize();
                serializer.Serialize(memoryStream, config, ns);
                configData = memoryStream.ToArray();
            }

            serializableData.SaveData(dataID, configData);
        }