Thank you for your feedback.
LatestCodeDownload from here
This change:
1) Use sockethelper for reference by other clients other than. net.
2) sockethelper is also changed to the synchronization method, correcting the problem that the original dataset cannot be used in the main thread.
3) added a method for viewing component dependencies in the container. The instance code is as follows:
[Stathread]
Static Void Main ( String [] ARGs)
{
System. Collections. idictionary HT = New Hashtable ();
Ht. Add ( " Bank1 " , Typeof (Accountdao ));
Ht. Add ( " Bank2 " , Typeof (Accountdao ));
Ht. Add ( " Bank. Service " , Typeof (Bankservice ));
Ht. Add ( " Bank. Facade " , Typeof (Bankfacade ));
Dbcontainer container = New Dbcontainer (HT );
Accountdao bank1 = Container [ " Bank1 " ] As Accountdao;
Container. createtables ( " Db1 " );
Container. createtables ( " DB2 " );
Bank1.cratenewaccount ( " Alex " , 10000 );
HT = Container. graphnodes;
Foreach (Qpg. Utility. componentnodeinfo info In Ht. values)
Console. writeline (Info );
Console. writeline ();
Console. writeline ( " Components to be used by bank. Service: " );
HT = Container. getdependents ( " Bank. Service " );
Foreach (Qpg. Utility. componentnodeinfo info In Ht. values)
Console. writeline (Info );
Console. writeline ( " Bank. service is used by the following components: " );
HT = Container. getdependers ( " Bank. Service " );
Foreach (Qpg. Utility. componentnodeinfo info In Ht. values)
Console. writeline (Info );
While (Console. Readline () ! = " Q " ) {
}
Container. Dispose ();
}
4) test sockethelper in Monorail to call the service.
Note:
When the data volume is large, it is best to use the container for processing. The speed is about 3-4 times that of sockthelper. The main reason is that the deserialization In the SDK is slow.
To use a virtual directory in Mr demonstration, modify about. aspx.
Alex