Click here to Skip to main content
15,890,123 members
Home / Discussions / C#
   

C#

 
GeneralRe: Help with Entity framework approach. Pin
SpiveyC#14-Aug-09 23:22
SpiveyC#14-Aug-09 23:22 
QuestionDynamically Loading Custom Control Pin
Matt Cavanagh13-Aug-09 20:46
Matt Cavanagh13-Aug-09 20:46 
AnswerRe: Dynamically Loading Custom Control Pin
SpiveyC#13-Aug-09 21:03
SpiveyC#13-Aug-09 21:03 
GeneralRe: Dynamically Loading Custom Control Pin
Matt Cavanagh13-Aug-09 21:16
Matt Cavanagh13-Aug-09 21:16 
AnswerRe: Dynamically Loading Custom Control Pin
0x3c013-Aug-09 21:45
0x3c013-Aug-09 21:45 
GeneralRe: Dynamically Loading Custom Control Pin
Matt Cavanagh13-Aug-09 22:05
Matt Cavanagh13-Aug-09 22:05 
NewsRe: Dynamically Loading Custom Control Pin
Matt Cavanagh14-Aug-09 1:33
Matt Cavanagh14-Aug-09 1:33 
QuestionAsyncCallback problem? Pin
Benny_Lava13-Aug-09 20:20
Benny_Lava13-Aug-09 20:20 
Hi,

I have a method which is in another project (but in the same solution), I create a delegate to that method and then use delegate.BeginInvoke to Asynchronously call that method and the callback method is in the calling project. Now the problem is when the invoked method completes, I need to somehow signal the callback method if the invoked method has succedded True or False, and because the invoked method is in another project and the calling method is also in another project and this project has a reference to the invoked method project if I try to set some variable in the calling project from invoked method project I can't because i don't have a reference to this project and if I try to reference the project i get a circular dependency error.. which is resonable...

This is the code:


private delegate void edi2xml_delegate(object ar);
private edi2xml_delegate edi2xml_del;

public void convert_file(object async)
{
       DemoApplication.edi_test edi2xml_converter = new DemoApplication.edi_test();
       edi2xml_converter.file_path = pub.def.edi_file_directory + "\\" + file_list.file_name;

       edi2xml_del = new edi2xml_delegate(edi2xml_converter.convert);

       //--This is the invoking
       edi2xml_del.BeginInvoke(null, import_xml2db, (string)(pub.def.edi_file_directory + "\\" + file_list.file_name + ".xml"));

}



private void import_xml2db(IAsyncResult ar)
{
       //--In this callback method i need to get the return state of the invoked method
       string full_path = (string)ar.AsyncState;

       edi2xml_del.EndInvoke(ar);  
}


//--This function is in another project (another assembly) so I can't set some bool variable in the other project because i would get circular dependency error

public void edi2xml()

{
      //--Here I need to somehow signal the import_xml2db method(the callback method) that i have   succeded or not (true-false)

}



Any help or suggestions greatly appreciated.
AnswerRe: AsyncCallback problem? Pin
Luc Pattyn14-Aug-09 0:41
sitebuilderLuc Pattyn14-Aug-09 0:41 
QuestionResizing Forms as per Screen Resolution Pin
Sanket.Patil13-Aug-09 20:19
Sanket.Patil13-Aug-09 20:19 
AnswerRe: Resizing Forms as per Screen Resolution Pin
0x3c013-Aug-09 22:10
0x3c013-Aug-09 22:10 
QuestionHelp to get a window to lock focus Pin
False Chicken13-Aug-09 18:50
False Chicken13-Aug-09 18:50 
AnswerRe: Help to get a window to lock focus Pin
Abhijit Jana13-Aug-09 19:49
professionalAbhijit Jana13-Aug-09 19:49 
GeneralRe: Help to get a window to lock focus Pin
False Chicken13-Aug-09 21:04
False Chicken13-Aug-09 21:04 
QuestionSetup and deployment Pin
vijaylumar13-Aug-09 18:49
vijaylumar13-Aug-09 18:49 
AnswerRe: Setup and deployment Pin
Vimalsoft(Pty) Ltd13-Aug-09 20:08
professionalVimalsoft(Pty) Ltd13-Aug-09 20:08 
AnswerRe: Setup and deployment Pin
musefan13-Aug-09 21:58
musefan13-Aug-09 21:58 
AnswerRe: Setup and deployment Pin
Rajesh R Subramanian13-Aug-09 22:31
professionalRajesh R Subramanian13-Aug-09 22:31 
GeneralRe: Setup and deployment Pin
vijaylumar14-Aug-09 18:45
vijaylumar14-Aug-09 18:45 
QuestionWhen changing a variable inside an object the similar variables in other objects do change to the same value Pin
alnatsheh13-Aug-09 12:55
alnatsheh13-Aug-09 12:55 
AnswerRe: When changing a variable inside an object the similar variables in other objects do change to the same value Pin
Luc Pattyn13-Aug-09 12:58
sitebuilderLuc Pattyn13-Aug-09 12:58 
AnswerRe: When changing a variable inside an object the similar variables in other objects do change to the same value Pin
Scott Dorman13-Aug-09 13:55
professionalScott Dorman13-Aug-09 13:55 
GeneralRe: When changing a variable inside an object the similar variables in other objects do change to the same value Pin
suresh_kumar_s13-Aug-09 19:36
suresh_kumar_s13-Aug-09 19:36 
QuestionQuestions about inheritance Pin
mtbikerj13-Aug-09 12:30
mtbikerj13-Aug-09 12:30 
AnswerRe: Questions about inheritance Pin
Scott Dorman13-Aug-09 13:58
professionalScott Dorman13-Aug-09 13:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.