[Mono-bugs] [Bug 469578] New: ResXDataNode instances returned by ResxResourceReader don't have FileRef set

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jan 26 15:52:10 EST 2009


https://bugzilla.novell.com/show_bug.cgi?id=469578


           Summary: ResXDataNode instances returned by ResxResourceReader
                    don't have FileRef set
    Classification: Mono
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jankit at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=267769)
 --> (https://bugzilla.novell.com/attachment.cgi?id=267769)
test.cs

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5)
Gecko/2008121300 SUSE/3.0.5-0.1 Firefox/3.0.5

Test case:

using System;
using System.Collections;
using System.Resources;

class foo {
        public static void Main (string [] args)
        {
                ResXResourceReader rr = new ResXResourceReader (args [0]);
                rr.UseResXDataNodes = true;
                foreach (DictionaryEntry de in rr) {
                        Console.WriteLine ("de.Key: {0}, de.Value: {1}",
de.Key.GetType (), de.Value.GetType ());
                        Console.WriteLine ("\tde.Key: {0}, de.Value: {1}",
de.Key, de.Value);
                        ResXDataNode node = (ResXDataNode) de.Value;
                        Console.WriteLine ("\tfile ref: {0}", node.FileRef !=
null ? node.FileRef.FileName : "no");
                }
        }
}

mono gives:
de.Key: System.String, de.Value: System.Resources.ResXDataNode
    de.Key: backblue.gif, de.Value: System.Resources.ResXDataNode
    file ref: no
(See last line, no file ref)

net gives:

de.Key: System.String, de.Value: System.Resources.ResXDataNode
        de.Key: backblue.gif, de.Value: System.Resources.ResXDataNode
        is file ref: backblue.gif

net correctly gives the ResXFileRef

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list