示例#1
0
 public MessageFlowBuilder(string profile,MessageType messageType)
 {
     this.profile = profile;
     this.Id = GemNetwork.GetMesssageId(profile);
     this.messageType = messageType;
     this.messageFlowArgs = new MessageFlowArguments();
 }
示例#2
0
        static ProtocolResolver()
        {
            protocolProvider = new ProtocolManager();

            //find NetworkPackages and cache their types
            AttributeResolver.DoWithAllTypesWithAttribute <NetworkPackageAttribute>(
                (type, attribute) =>
            {
                byte id      = CreateMessageFlowArguments(GemNetwork.GetMesssageId(attribute.Profile), type, attribute.Profile);
                attribute.Id = id;
                protocolProvider[attribute.Profile].Add(id, new TypeAndAttribute {
                    Type = type, Attribute = attribute
                });
            });
        }