Click here to Skip to main content
15,905,913 members

Comments by Duraivelan Chockalingam (Top 3 by date)

Duraivelan Chockalingam 9-Sep-15 8:44am View    
There could be multiple ways of attaining it. Like using arrays, Hash and other.
But I need it the way that I expect. Because the

Class ColumnNameClass {
Public String COLUMNVALUE1;
Public String COLUMNVALUE2;
}

Would be a Nhibernate DBMapping Class.
Actually, I am looking to dump the Information back to DB after processing it.
Duraivelan Chockalingam 8-Sep-15 4:25am View    
Hello All,

Apologize for not being clear.

Yes infact, if you look at the question it could feel to be simple.

And at present I resolving this via the following method.

Having a Hash in C# and building the code to read the XML File, and using regex on Mapping Attribute to sort the value corresponding to the column from the CSV file.

HASH["COLUMNVALUE1"] = 467898
HASH["COLUMNVALUE2"] = 4786

Yes, I know this is simple.

But What I am expecting was to completely make this piece of module controlled externally.

Means, every time there is a new "COLUMNVALUE" I have to edit the C# code to include this variable in the C# and recompile it

So the expectation is

Read the XML Element Values Such as "COLUMNVALUE1" / "COLUMNVALUE2"
As C-Sharp Variable

Example:
String COLUMNVALUE1;
String COLUMNVALUE2;

And Get those String value from Parsing the CSV files,
via the Mapping Attribute that it had got from XML file

Or more preferably

Class ColumnNameClass {
Public String COLUMNVALUE1;
Public String COLUMNVALUE2;
}

ColumnNameClass Object = new ColumnNameClass();

Object.COLUMNVALUE1 = "Value Parse from CSV, based on its Mapping attribute"
Object.COLUMNVALUE2 = "Value Parse from CSV, based on its Mapping attribute"

And do what ever you want with that "Object"

Basically, I want this C# Module to be dynamic, and once complied I would not need to recompile it again

Until, if I want to change the Logic on how to treat the "Object" and it "Values"

Hope I have explained it properly.
And apologize still I am not clear enough
Further, I am just wondering how to treat String value from XML files, as Variable within C# code.

Further, I would like to do my Homework and not expecting someone to do it,
but just need some-hints or best-way on how to proceed with my expectation.

Thanks and Regards
Durai Velan C
Duraivelan Chockalingam 2-Dec-14 8:12am View    
Hello Mehdi,
Thanks for Reply. But I have not known of NON Com Logparser Instead.
If you have kindly refer, me where I can find one
Thanks you.