John-- TradeThreadPriority is not where I'm having the problem. QuoteManager and TradeManager, both of which are read-only in the interface and read-only in the implementation are causing this problem.
Whatever is going on here is subtle and obscure enough that the code generated by the VB.net IDE is having the same errors. --Jekke -----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of John Brett Sent: Monday, December 20, 2004 3:25 AM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: Re: [ADVANCED-DOTNET] Implementing a C# interface in VB.net Jekke, If you have a method of your interface declared as > ThreadPriority TradeThreadPriority { get; set; } you can't choose to implement only the get method of it (ReadOnly keyword notwithstanding). Interfaces are an all-or-nothing proposition. Your IL decompilation is probably just symptomatic of the fact that the compiler can't match up your implementation with the interface. I think that 'hidebysig' is used to mark functions that implement internal logic (e.g. get/set, constructors, event handling logic), rather than functions intended to be called by name directly - although this is based on observation rather than hard knowledge. John > Looking a little bit deeper into the question, I noticed some > differences in the MISL code between this method one that works fine: > > The method that's causing grief: > .method public hidebysig newslot specialname abstract virtual > instance class > [GroupOne.Utilities.EventQueues]GroupOne.Utilities.EventQueues > .EventMana > ger > get_QuoteManager() cil managed > { > } // end of method IMarketDataStreamer::get_QuoteManager > > An old method that isn't: > .method public newslot specialname abstract strict virtual > instance class > [GroupOne.CentralClassLibrary.TheKitchenSink]GroupOne.CentralC > lassLibrar > y.TheKitchenSink.orPortfolio > get_Portfolio() cil managed > { > } // end of method IHyperfeedPump::get_Portfolio > > > Now, I think I know what the "strict" is, but WTH is > "hidebysig?" Could > it have anything to do with my problem or am I just looking > in entirely > the wrong place? > > TIA > > --Jekke > > -----Original Message----- > From: Unmoderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of Jekke Bladt > Sent: Friday, December 17, 2004 1:32 PM > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: [ADVANCED-DOTNET] Implementing a C# interface in VB.net > > > All-- > > I've got a weird error coming up based on the following interface: > > public interface IMarketDataStreamer > { > void StartStreaming(); > void StopStreaming(); > void TerminateSession(); > EventManager TradeManager { get; } > EventManager QuoteManager { get; } > ThreadPriority QuoteThreadPriority { get; set; } > ThreadPriority TradeThreadPriority { get; set; } > } > > When I auto-generate the implementation skeleton in VB.net, I get > something like this (stuff snipped for clarity): > > Public Class BogusStreamer > Implements IMarketDataStreamer > > Public ReadOnly Property QuoteManager() As EventManager Implements > GroupOne.TradingTools.Interfaces.IMarketDataStreamer.QuoteManager > Get > > End Get > End Property > > Public ReadOnly Property TradeManager() As EventManager Implements > GroupOne.TradingTools.Interfaces.IMarketDataStreamer.TradeManager > Get > > End Get > End Property > > End Class > > Both of the methods above give me a compiler error along the lines of > "C:\ISEPerforce\GroupOne.CentralClassLibrary\GroupOne.CentralC > lassLibrar > y.TheKitchenSink\BogusStreamer.vb(34): 'TradeManager' cannot implement > 'TradeManager' because there is no matching property on interface > 'IMarketDataStreamer'." > > I've checked to make sure there are no ambiguous references > and get this > message even if I explicitly spell out the type of > EventManager in both > signatures and even after I've provided a return value. > > What am I doing wrong? > > TIA > > --Jekke > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > Some .NET courses you may be interested in: > > Essential .NET: building applications and components with C# > November 29 - December 3, in Los Angeles > http://www.develop.com/courses/edotnet > > View archives and manage your subscription(s) at > http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > Some .NET courses you may be interested in: > > Essential .NET: building applications and components with C# > November 29 - December 3, in Los Angeles > http://www.develop.com/courses/edotnet > > View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor(r) http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with C# November 29 - December 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: Essential .NET: building applications and components with C# November 29 - December 3, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com