.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

IMessage ["__Return"]

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :WPF
 

Hi all,

given this code:

 

  [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  public override IMessage Invoke(IMessage pMessage)
  {
   IMessage objReturnMessage = null;

   if (pMessage is IConstructionCallMessage)
   {
    IConstructionCallMessage objConstructionCallMessage = pMessage as IConstructionCallMessage;

    objReturnMessage = InitializeServerObject(objConstructionCallMessage);

    objRealObject = GetUnwrappedServer();

    SetStubData(this, objRealObject);
   }
   else if (pMessage is IMethodCallMessage)
   {
    RealProxy objRealProxy = RemotingServices.GetRealProxy(this.objRealObject);

    objReturnMessage = objRealProxy.Invoke(pMessage);
   }
   else
   {
    throw new NotSupportedException();
   }

   if (objReturnMessage.Properties[
                                     
                                            
                                        

View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend