18 File = manager.
Open( fileName,
true );
20 settings.ConformanceLevel = ConformanceLevel.Document;
24 writer.WriteStartDocument();
25 writer.WriteStartElement(
"State" );
31 throw new IOException(
"Tried to write to a closed state file." );
42 public void Save<T>(
object obj,
string name )
44 Save( obj, typeof(
T ), name );
47 public void Save(
object obj, Type objType,
string name )
50 writer.WriteStartElement(
"Object" );
51 writer.WriteAttributeString(
"Name", name );
54 writer.WriteAttributeString(
"TypeAssembly", objType.AssemblyQualifiedName );
56 writer.WriteAttributeString(
"TypeAssembly", objType.Assembly.FullName );
59 writer.WriteAttributeString(
"Type", objType.Name );
virtual StorageFile Open(string fileName, bool write)
Avaa tiedoston.
void Save(object obj, Type objType, string name)
XmlWriterSettings settings
SaveState(FileManager manager, string fileName)
void Save< T >(object obj, string name)
void SaveData(XmlWriter writer, Type type, object obj, bool saveAllFields)