+ * - Changing AxiosTitleFile.GetStream() to return Stream instead of FileStream

+ * - Changing IAxiosFile.GetStream() to return Stream instead of FileStream
This commit is contained in:
Nathan Adams 2012-05-21 21:53:14 -05:00
parent e75e8fdca1
commit 5de23be1fe
7 changed files with 11 additions and 10 deletions

View File

@ -89,6 +89,8 @@
* - Changing location of GetTexture to extensions * - Changing location of GetTexture to extensions
* - Enabling commented log messages * - Enabling commented log messages
* - Fixing bug where loadrecentangleitem wouldn't be called by Gleed2D library * - Fixing bug where loadrecentangleitem wouldn't be called by Gleed2D library
* - Changing AxiosTitleFile.GetStream() to return Stream instead of FileStream
* - Changing IAxiosFile.GetStream() to return Stream instead of FileStream
* *
*/ */
#endregion #endregion

View File

@ -29,7 +29,7 @@ namespace Axios.Engine.File
throw new NotImplementedException(); throw new NotImplementedException();
} }
public virtual FileStream GetStream(FileMode mode) public virtual Stream GetStream(FileMode mode)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -51,7 +51,7 @@ namespace Axios.Engine.File
return ret; return ret;
} }
public override FileStream GetStream(FileMode mode) public override Stream GetStream(FileMode mode)
{ {
#if WINDOWS #if WINDOWS
IsolatedStorageFile savegameStorage = IsolatedStorageFile.GetUserStoreForDomain(); IsolatedStorageFile savegameStorage = IsolatedStorageFile.GetUserStoreForDomain();
@ -60,7 +60,7 @@ namespace Axios.Engine.File
#endif #endif
IsolatedStorageFileStream fs = null; IsolatedStorageFileStream fs = null;
fs = savegameStorage.OpenFile(_filename, mode); fs = savegameStorage.OpenFile(_filename, mode);
return fs; return (Stream)fs;
} }
} }

View File

@ -37,10 +37,10 @@ namespace Axios.Engine.File
return ret; return ret;
} }
public override FileStream GetStream(FileMode mode) public override Stream GetStream(FileMode mode)
{ {
FileStream fs = new FileStream(_filename, mode); FileStream fs = new FileStream(_filename, mode);
return fs; return (Stream)fs;
} }
} }
} }

View File

@ -28,10 +28,9 @@ namespace Axios.Engine.File
return this.Content; return this.Content;
} }
public override FileStream GetStream(FileMode mode) public override Stream GetStream(FileMode mode)
{ {
FileStream fs = (FileStream)TitleContainer.OpenStream(_filename); return (Stream)TitleContainer.OpenStream(_filename);;
return fs;
} }
} }
} }

View File

@ -74,7 +74,7 @@ namespace Axios.Engine.Gleed2D
return level; return level;
} }
public static Level FromStream(FileStream stream, AxiosGameScreen gameScreen) public static Level FromStream(Stream stream, AxiosGameScreen gameScreen)
{ {
Dictionary<string, Texture2D> cache = new Dictionary<string, Texture2D>(); Dictionary<string, Texture2D> cache = new Dictionary<string, Texture2D>();
XmlSerializer serializer = new XmlSerializer(typeof(Level)); XmlSerializer serializer = new XmlSerializer(typeof(Level));

View File

@ -6,6 +6,6 @@ namespace Axios.Engine.Interfaces
{ {
void WriteData(string data, FileMode mode); void WriteData(string data, FileMode mode);
string ReadData(); string ReadData();
FileStream GetStream(FileMode mode); Stream GetStream(FileMode mode);
} }
} }