""Gary Chang[MSFT]"" <v-garych...online.microsoft.comwrote in message
news:i4x8EYRDHHA.1976...TK2MSFTNGXA01.phx.gbl...
Quote: Originally Posted by Hi Ben, > I also got the confiormation from the corresponding product team-- this is a compiler bug, even in current builds. There isn't much workaround that we can find without changing the hierarchy of the interface and class. > Do you need the interface ITask and ScheduledTask being nested in PrioritizedWorkScheduler? > If you wants ITask to be only visible to ScheduledTask, we suggest you could make ITask a private in an assembly and ScheduledTask be a public explicit implementation in that same assembly. |
The idea was that ITask members would be only visible to
PrioritizedWorkScheduler, and an opaque handle to the clients... so I did
the C opaque handle thing (I've also taken the class native -- mixing
managed and native code is just awesome, and I can use pragma unmanaged to
guarantee certain functions can't be interrupted by garbage collection):
class PrioritizedWorkScheduler
{
public:
struct ScheduledTaskImpl;
typedef ScheduledTaskImpl* ScheduledTask;
typedef std::list<ScheduledTaskTaskList;
typedef TaskList::iterator TaskNode;
};
Downside is that now there can be no publicly available members in
ScheduledTaskImpl. But if I need that, I can make a public interface, and
change ScheduledTask from a raw pointer typedef to a pointer wrapper class
with operator->() cast to the interface.
Quote: Originally Posted by > By the way, thanks for submit that bug report in our feedback center, our product team engineer would take care of it. |
I think C# forbids what I was trying to do, it would generate an error
message "base class is less visible than derived class"... not sure if I've
seen that error generated for an interface or only base classes though.
Quote: Originally Posted by > Thanks! > Best regards, > Gary Chang Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscript...ault.aspx#notifications. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. > |
benvoigt
| Thu, 03 Jan 2008 18:07:00 GMT |