HighTechTalks DotNet Forums  

Resource File Manipulation

Dotnet Internationalization microsoft.public.dotnet.internationalization


Discuss Resource File Manipulation in the Dotnet Internationalization forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
JezB
 
Posts: n/a

Default Resource File Manipulation - 02-25-2005 , 12:30 PM






I have used ResourceWriter and ResourceReader for writing a reading resource
files.

What I want to know is, can I open a resource file in "Append" mode so that
I can read entries from it and add new entries that don't yet exist ?

Or will I have to open a ResourceReader, read and save all the entries in
some collection, then use a ResourceWriter to write these plus any
additional entries to the same file name? Seems very inefficient ....



Reply With Quote
  #2  
Old   
Guy Smith-Ferrier
 
Posts: n/a

Default Re: Resource File Manipulation - 02-28-2005 , 03:57 AM






Jez,

You are correct. There is no Append mode. As you say, you have to read all
of the entries in and then add the new ones.

Guy Smith-Ferrier

"JezB" <jezbroadsword (AT) blueyonder (DOT) co.uk> wrote

Quote:
I have used ResourceWriter and ResourceReader for writing a reading
resource
files.

What I want to know is, can I open a resource file in "Append" mode so
that
I can read entries from it and add new entries that don't yet exist ?

Or will I have to open a ResourceReader, read and save all the entries in
some collection, then use a ResourceWriter to write these plus any
additional entries to the same file name? Seems very inefficient ....





Reply With Quote
  #3  
Old   
JezB
 
Posts: n/a

Default Re: Resource File Manipulation - 02-28-2005 , 06:02 AM



OK thanks Guy. I'm worried about performance for large numbers of big
resource files but if this is the only way then so be it !

"Guy Smith-Ferrier" <gsmithferrier (AT) notspecified (DOT) com> wrote

Quote:
Jez,

You are correct. There is no Append mode. As you say, you have to read all
of the entries in and then add the new ones.

Guy Smith-Ferrier

"JezB" <jezbroadsword (AT) blueyonder (DOT) co.uk> wrote in message
news:OFDVs91GFHA.3912 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I have used ResourceWriter and ResourceReader for writing a reading
resource
files.

What I want to know is, can I open a resource file in "Append" mode so
that
I can read entries from it and add new entries that don't yet exist ?

Or will I have to open a ResourceReader, read and save all the entries in
some collection, then use a ResourceWriter to write these plus any
additional entries to the same file name? Seems very inefficient ....







Reply With Quote
  #4  
Old   
Guy Smith-Ferrier
 
Posts: n/a

Default Re: Resource File Manipulation - 02-28-2005 , 08:47 AM



Jez,

You will need to make a judgement here but if performance is the most
important issue then you could reject the ResourceReader/ResourceWriter
classes and code the solution another way. I wouldn't recommend this though
and I haven't found their performance warrants bypassing them.

Guy


"JezB" <jezbroadsword (AT) blueyonder (DOT) co.uk> wrote

Quote:
OK thanks Guy. I'm worried about performance for large numbers of big
resource files but if this is the only way then so be it !

"Guy Smith-Ferrier" <gsmithferrier (AT) notspecified (DOT) com> wrote in message
news:%23X2uHOXHFHA.2984 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
Jez,

You are correct. There is no Append mode. As you say, you have to read
all of the entries in and then add the new ones.

Guy Smith-Ferrier

"JezB" <jezbroadsword (AT) blueyonder (DOT) co.uk> wrote in message
news:OFDVs91GFHA.3912 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
I have used ResourceWriter and ResourceReader for writing a reading
resource
files.

What I want to know is, can I open a resource file in "Append" mode so
that
I can read entries from it and add new entries that don't yet exist ?

Or will I have to open a ResourceReader, read and save all the entries
in
some collection, then use a ResourceWriter to write these plus any
additional entries to the same file name? Seems very inefficient ....









Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.