Developer forum

Forum » Integration » From Source Provider To Source Reader

From Source Provider To Source Reader

Casper Andersen
Reply

Hi

As the titel more lor less says, i want to get some stuff from my source Provider to my source reader, what i want to move, are my 4 text bokses that look like this:

[AddInParameter("username"), AddInParameterEditor(typeof(TextParameterEditor), "maxLength=50;inputClass=NewUIinput;"), AddInParameterGroup("Source")] <--- Example

public string username { get; set; }

What i want to do, is take the value from the username textbox, and put it into a custom function in my SourceReader, i used debugging and saw that it was available through

this,_mapping.Source but when i tried to enter the code all i got was FilesFolderName and WorkingDirectory

 

Any help would be much appriciated!


Replies

 
Jonas Krarup Dam
Reply

Hi Casper,

I would recommend updating the constructor of your sourceReader to include the information you need, and then save it in a private variable in your sourceReader class.

Regards, Jonas

 
Casper Andersen
Reply

This is my contructor in my sourceReader but i dont get my values through my mapping

public ExampleSourceReader(Mapping mapping)
        {
            _mapping = mapping;
        }

 
Jonas Krarup Dam
Reply

Hi Casper,

 

You can simply update the provider as such:

private property string _username;

public ExampleSourceReader(Mapping mapping, String username)
        {

            _username=username
            _mapping = mapping;
        }

and then update the call to the constructor to include the data you need.

(code was written without auto-complete, so it's probably wrong...)

/Jonas

 

You must be logged in to post in the forum