This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changing parsers to load data on first step.
- Loading branch information
1 parent
2aed7b5
commit c060f36
Showing
18 changed files
with
308 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 61 additions & 57 deletions
118
Runners/PixelVision8/Runner/Services/LoadServicePlus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,61 @@ | ||
// | ||
// Copyright (c) Jesse Freeman, Pixel Vision 8. All rights reserved. | ||
// | ||
// Licensed under the Microsoft Public License (MS-PL) except for a few | ||
// portions of the code. See LICENSE file in the project root for full | ||
// license information. Third-party libraries used by Pixel Vision 8 are | ||
// under their own licenses. Please refer to those libraries for details | ||
// on the license they use. | ||
// | ||
// Contributors | ||
// -------------------------------------------------------- | ||
// This is the official list of Pixel Vision 8 contributors: | ||
// | ||
// Jesse Freeman - @JesseFreeman | ||
// Christina-Antoinette Neofotistou @CastPixel | ||
// Christer Kaitila - @McFunkypants | ||
// Pedro Medeiros - @saint11 | ||
// Shawn Rakowski - @shwany | ||
// | ||
|
||
using System.IO; | ||
using PixelVision8.Runner.Workspace; | ||
|
||
namespace PixelVision8.Runner.Services | ||
{ | ||
public class LoadServicePlus : LoadService | ||
{ | ||
protected WorkspaceService WorkspaceService; | ||
|
||
public LoadServicePlus(WorkspaceService workspaceService) | ||
{ | ||
WorkspaceService = workspaceService; | ||
} | ||
|
||
public override byte[] ReadAllBytes(string file) | ||
{ | ||
|
||
var path = WorkspacePath.Parse(file); | ||
|
||
using (var memoryStream = new MemoryStream()) | ||
{ | ||
using (var fileStream = WorkspaceService.OpenFile(path, FileAccess.Read)) | ||
{ | ||
fileStream.CopyTo(memoryStream); | ||
fileStream.Close(); | ||
} | ||
|
||
// Console.WriteLine("Add File " + file.Path.Substring(1)); | ||
|
||
return memoryStream.ToArray(); | ||
// files.Add(file.Path.Substring(1), file.Path);//memoryStream.ToArray()); | ||
} | ||
|
||
// return base.ReadAllBytes(file); | ||
} | ||
} | ||
} | ||
// // | ||
// // Copyright (c) Jesse Freeman, Pixel Vision 8. All rights reserved. | ||
// // | ||
// // Licensed under the Microsoft Public License (MS-PL) except for a few | ||
// // portions of the code. See LICENSE file in the project root for full | ||
// // license information. Third-party libraries used by Pixel Vision 8 are | ||
// // under their own licenses. Please refer to those libraries for details | ||
// // on the license they use. | ||
// // | ||
// // Contributors | ||
// // -------------------------------------------------------- | ||
// // This is the official list of Pixel Vision 8 contributors: | ||
// // | ||
// // Jesse Freeman - @JesseFreeman | ||
// // Christina-Antoinette Neofotistou @CastPixel | ||
// // Christer Kaitila - @McFunkypants | ||
// // Pedro Medeiros - @saint11 | ||
// // Shawn Rakowski - @shwany | ||
// // | ||
// | ||
// using System.IO; | ||
// using PixelVision8.Runner.Workspace; | ||
// | ||
// namespace PixelVision8.Runner.Services | ||
// { | ||
// public class LoadServicePlus : LoadService | ||
// { | ||
// protected WorkspaceService WorkspaceService; | ||
// | ||
// public LoadServicePlus(WorkspaceService workspaceService) | ||
// { | ||
// WorkspaceService = workspaceService; | ||
// } | ||
// | ||
// public override string GetFileName(string path) | ||
// { | ||
// return WorkspacePath.Parse(path).EntityName; | ||
// } | ||
// public override byte[] ReadAllBytes(string file) | ||
// { | ||
// | ||
// var path = WorkspacePath.Parse(file); | ||
// | ||
// using (var memoryStream = new MemoryStream()) | ||
// { | ||
// using (var fileStream = WorkspaceService.OpenFile(path, FileAccess.Read)) | ||
// { | ||
// fileStream.CopyTo(memoryStream); | ||
// fileStream.Close(); | ||
// } | ||
// | ||
// // Console.WriteLine("Add File " + file.Path.Substring(1)); | ||
// | ||
// return memoryStream.ToArray(); | ||
// // files.Add(file.Path.Substring(1), file.Path);//memoryStream.ToArray()); | ||
// } | ||
// | ||
// // return base.ReadAllBytes(file); | ||
// } | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.