thank you, the second method works perfectly.
I have one last problem, I start thread and in thread
Protocol.GetInstance(id) return null while in main thread it
works.
My class :
class ProtocolMessageManager
{
private static TypeInfo_Class[uint] m_types;
shared static
On Saturday, 28 January 2017 at 09:05:13 UTC, rumbu wrote:
As long as your class has a default constructor, you can use
directly Object.factory(id):
public static NetworkMessage GetInstance(string id)
{
return cast(NetworkMessage)(Object.factory(id));
}
It isn't possible. My function when
abstract class NetworkMessage
{
uint MessageId;
//
}
override class QueueStatusUpdateMessage : NetworkMessage
{
uint MessageId = 1;
//
}
override class Message2 : NetworkMessage
{
uint MessageId = 2;
//
}
override class Message3 : NetworkMessage
{
uint
On Saturday, 28 January 2017 at 07:39:51 UTC, rumbu wrote:
On Saturday, 28 January 2017 at 07:10:27 UTC, medhi558 wrote:
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
To know if the class is a NetworkMessage, Would be possible to
do this
if(lc is
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
To know if the class is a NetworkMessage, Would be possible to do
this
if(lc is NetworkMessage)
Sorry for my English, i speak french.
I develop a game server. Currently I use a switch :
import protocol.messages.connection.Message1;
import protocol.messages.connection.Message2;
import protocol.messages.queues.Message3;
import ..
import protocol.messages.NetworkMessage;
class ProtocolMessageManager
{
public static
Hello, I would like to know if it is possible to recover all
classes in the project in D.
Example in c# :
Assembly asm = Assembly.GetAssembly(typeof(MyClass));
foreach (Type type in asm.GetTypes())
{
}
Hello, all I recently need to get the integrity level of a
process but i do not know how to do.
Hello,
I can't seem to use Registry, I tried to many attraction ways but
I have every time an error Value cannot be set.
Exemple code :
module main;
import std.stdio;
import std.windows.registry;
void main(string[] args)
{
version(Windows)
{
Key registryKey
It doesn't always work the same error.
Thank you it works.
11 matches
Mail list logo