Exemplo n.º 1
0
        public MessageTypeConfiguration(string fullName, ServiceBroker serviceBroker)
            : base(serviceBroker)
        {
            if (this.ServiceBroker.MessageTypes.Contains(fullName))
            {
                MessageType msgType = this.ServiceBroker.MessageTypes[fullName];
                m_MessageTypeValidation = msgType.MessageTypeValidation;

                base.Urn = new Uri(base.Urn.ToString() + "messagetype/");

                m_Name = msgType.Name.Substring
                    (base.Urn.ToString().Length, msgType.Name.Length - base.Urn.ToString().Length);
                
                m_Owner = msgType.Owner;
                if (msgType.MessageTypeValidation == MessageTypeValidation.XmlSchemaCollection)
                {
                    m_ValidationXmlSchemaCollection = msgType.ValidationXmlSchemaCollection;
                    m_ValidationXmlSchemaCollectionSchema = msgType.ValidationXmlSchemaCollectionSchema;
                    if (this.ServiceBroker.Parent.XmlSchemaCollections.Contains
                        (this.ValidationXmlSchemaCollection))
                    {
                        XmlSchemaCollection schema = this.ServiceBroker.Parent.
                            XmlSchemaCollections[msgType.ValidationXmlSchemaCollection];
                        this.ValidationXmlSchemaCollectionSchema = schema.Text;
                    }
                }
            }

        }