+ * - 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
* - Enabling commented log messages
* - 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

View File

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

View File

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

View File

@ -37,10 +37,10 @@ namespace Axios.Engine.File
return ret;
}
public override FileStream GetStream(FileMode mode)
public override Stream GetStream(FileMode 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;
}
public override FileStream GetStream(FileMode mode)
public override Stream GetStream(FileMode mode)
{
FileStream fs = (FileStream)TitleContainer.OpenStream(_filename);
return fs;
return (Stream)TitleContainer.OpenStream(_filename);;
}
}
}

View File

@ -74,7 +74,7 @@ namespace Axios.Engine.Gleed2D
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>();
XmlSerializer serializer = new XmlSerializer(typeof(Level));

View File

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