-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
91 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
CodeJam 1.0.0-beta1 Release Notes | ||
--------------------------------------- | ||
|
||
What's new in 1.0.0-beta6 | ||
------------------------- | ||
* Move general services code to CodeJam project | ||
CodeJam 1.0.0-beta7 Release Notes | ||
--------------------------------------- | ||
|
||
What's new in 1.0.0-beta7 | ||
------------------------- | ||
* Update CodeJam, use CodeJam.Blocks | ||
* Replace Rx to new packages System.Reactive.* | ||
|
||
What's new in 1.0.0-beta6 | ||
------------------------- | ||
* Move general services code to CodeJam project |
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,64 +1,63 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.IO; | ||
using System.Reactive.Disposables; | ||
|
||
namespace CodeJam.Extensibility.Razor | ||
{ | ||
/// <summary> | ||
/// Base class for generators generated by RazorGenerator (http://razorgenerator.codeplex.com/). | ||
/// </summary> | ||
public abstract class RazorGenAppResource : TextAppResource | ||
{ | ||
private TextWriter _writer; | ||
|
||
/// <summary> | ||
/// Initialize instance. | ||
/// </summary> | ||
protected RazorGenAppResource(IServiceProvider svcProvider) : base(svcProvider) | ||
{} | ||
|
||
/// <summary> | ||
/// Required by RazorGenerator. | ||
/// </summary> | ||
public abstract void Execute(); | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
protected IDisposable WriterGuard(TextWriter writer) | ||
{ | ||
var oldWriter = _writer; | ||
_writer = writer; | ||
return Disposable.Create(() => _writer = oldWriter); | ||
} | ||
|
||
/// <summary> | ||
/// Write text to output. | ||
/// </summary> | ||
protected override void WriteText(AppResourceRequest request, TextWriter writer) | ||
{ | ||
using (WriterGuard(writer)) | ||
Execute(); | ||
} | ||
|
||
/// <summary> | ||
/// Write string literal to output. | ||
/// </summary> | ||
protected void WriteLiteral(string literal) | ||
{ | ||
_writer.Write(literal); | ||
} | ||
|
||
/// <summary> | ||
/// Write object to output. | ||
/// </summary> | ||
protected void Write(object value) | ||
{ | ||
if ((value == null)) | ||
return; | ||
|
||
WriteLiteral(Convert.ToString(value, CultureInfo.InvariantCulture)); | ||
} | ||
} | ||
using System; | ||
using System.Globalization; | ||
using System.IO; | ||
|
||
namespace CodeJam.Extensibility.Razor | ||
{ | ||
/// <summary> | ||
/// Base class for generators generated by RazorGenerator (http://razorgenerator.codeplex.com/). | ||
/// </summary> | ||
public abstract class RazorGenAppResource : TextAppResource | ||
{ | ||
private TextWriter _writer; | ||
|
||
/// <summary> | ||
/// Initialize instance. | ||
/// </summary> | ||
protected RazorGenAppResource(IServiceProvider svcProvider) : base(svcProvider) | ||
{} | ||
|
||
/// <summary> | ||
/// Required by RazorGenerator. | ||
/// </summary> | ||
public abstract void Execute(); | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
protected IDisposable WriterGuard(TextWriter writer) | ||
{ | ||
var oldWriter = _writer; | ||
_writer = writer; | ||
return Disposable.Create(() => _writer = oldWriter); | ||
} | ||
|
||
/// <summary> | ||
/// Write text to output. | ||
/// </summary> | ||
protected override void WriteText(AppResourceRequest request, TextWriter writer) | ||
{ | ||
using (WriterGuard(writer)) | ||
Execute(); | ||
} | ||
|
||
/// <summary> | ||
/// Write string literal to output. | ||
/// </summary> | ||
protected void WriteLiteral(string literal) | ||
{ | ||
_writer.Write(literal); | ||
} | ||
|
||
/// <summary> | ||
/// Write object to output. | ||
/// </summary> | ||
protected void Write(object value) | ||
{ | ||
if ((value == null)) | ||
return; | ||
|
||
WriteLiteral(Convert.ToString(value, CultureInfo.InvariantCulture)); | ||
} | ||
} | ||
} |
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
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