How do I get access to the WCF service instance in the current context?

后端 未结 2 1093
庸人自扰
庸人自扰 2020-12-16 00:56

If I am executing within the context of a particular service instance and operation, how do I get access to the currently-executing service instance? Service instances don\'

相关标签:
2条回答
  • 2020-12-16 01:14

    OperationContext.Current should have a property for this IIRC

    0 讨论(0)
  • 2020-12-16 01:22
    var myService = OperationContext.Current.InstanceContext.GetServiceInstance();
    
    0 讨论(0)
提交回复
热议问题