Hi Jonathan,

Are you receiving any error messages with this code that you can share?

Thanks,
Ryan

On Sat, Apr 10, 2010 at 9:33 AM, jnewton <jonathan.new...@ni.com> wrote:
>
> I'm trying to write my own "write" task that uses a filterchain. I want to be
> able to write to a file (i.e. I am creating an xml file) and replace some
> strings in the process using the replacestring filter. I am basing my code
> off of the CopyTask but I can't seem to figure out how to use the
> PhysicalTextReader class. I am trying the following:
>
> PhysicalTextReader ChainedReader = null;
> try
> {
>    Writer = this.GetWriter();
>    Reader = new StringReader(this.Text.Value);
>    ChainedReader = new PhysicalTextReader(Reader);
>    Filter FilterReader =  this.Filter.GetBaseFilter(ChainedReader);
>    while (!false)
>    {
>        int Focus = FilterReader.Read();
>        if (!(Focus > -1))
>        {
>            break;
>        }
>        Writer.Write((Char)Focus);
>    }
> }
>
> However, I can use the PhysicalTextReader due to its protection level.
>
> Any thoughts?
> --
> View this message in context: 
> http://old.nabble.com/Writing-Your-Own-Task-that-Uses-a-FilterChain-tp28203172p28203172.html
> Sent from the NAnt - Users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to