///<summary> /// Called by a <see cref="ServicedComponent"/> exported by <see cref="EnterpriseServicesExporter"/> /// to obtain a reference to the service it proxies. ///</summary> public static object GetObject(ServicedComponent sender, string targetName) { EnsureComponentContextRegistryInitialized(sender.GetType()); try { return(_appContext.GetObject(targetName)); } catch (Exception e) { Trace.WriteLine("Error configuring application context for COM component of type " + sender.GetType() + ": " + e); throw; } }