fork download
  1. <#+
  2. public class DisposableBlock:IDisposable{
  3. string _onDispose=null;
  4. TextTransformation _tt;
  5. public DisposableBlock(bool doWrite,Microsoft.VisualStudio.TextTemplating.TextTransformation tt, string onDispose,string start){
  6.  
  7. _tt=tt;
  8. if(doWrite) {
  9. _tt.PushIndent("\t");
  10. _tt.WriteLine(start);
  11. _onDispose=onDispose;
  12.  
  13. }
  14. _tt.PushIndent("\t");
  15. }
  16.  
  17. public void Dispose(){
  18.  
  19. if(_onDispose!=null){
  20. _tt.PopIndent();
  21. _tt.WriteLine( _onDispose);
  22.  
  23. }
  24. _tt.PopIndent();
  25. }
  26. }
  27. #>
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty