Exemple #1
0
		public void WriteXml(XmlWriter writer)
		{
			var adaptor = new XmlWriteAdaptor(writer, Constants.Xml.Namespace);
			adaptor.WriteNamespace(Constants.Xml.Prefix, Constants.Xml.Namespace);
			adaptor.WriteNamespace(Constants.Xsi.Prefix, Constants.Xsi.Namespace);
			WriteXml(adaptor);
		}
Exemple #2
0
		public void WriteOuterXml(XmlWriter writer)
		{
			var adaptor = new XmlWriteAdaptor(writer, Constants.Xml.Namespace);
			adaptor.WriteStartElement(Constants.Xml.EventDetails.RootElement);
			adaptor.WriteNamespace(Constants.Xml.Prefix, Constants.Xml.Namespace);
			adaptor.WriteNamespace(Constants.Xsi.Prefix, Constants.Xsi.Namespace);
			WriteXml(adaptor);
			adaptor.WriteEndElement();
		}
Exemple #3
0
        public void WriteXml(XmlWriter xmlWriter)
        {
            XmlWriteAdaptor adaptor = new XmlWriteAdaptor(xmlWriter, Constants.Xml.Namespace);

            // Add the XSI namespace.

            adaptor.WriteNamespace(Constants.Xsi.Prefix, Constants.Xsi.Namespace);
            adaptor.WriteNamespace(Constants.Xml.TypePrefix, Constants.Xml.TypeNamespace);

            // Write the messages.

            WriteXml(adaptor);
        }
Exemple #4
0
        public void WriteXsiTypeAttribute(XmlWriteAdaptor adaptor)
        {
            const string method = "WriteXsiTypeAttribute";

            if (adaptor == null)
            {
                throw new NullParameterException(GetType(), method, "adaptor");
            }

            if (m_xmlTypeQualifiedName.Namespace == Constants.Xml.Namespace)
            {
                // Get the LinkMe Type prefix or write it if not found.

                string prefix = adaptor.WriteNamespace(Constants.Xml.Prefix, Constants.Xml.Namespace);

                adaptor.WriteAttribute(Constants.Xsi.TypeAttribute, Constants.Xsi.Prefix,
                                       Constants.Xsi.Namespace, prefix + ":" + m_xmlTypeQualifiedName.Name);
            }
            else
            {
                // XSD type - no prefix.

                adaptor.WriteAttribute(Constants.Xsi.TypeAttribute, Constants.Xsi.Prefix,
                                       Constants.Xsi.Namespace, m_xmlTypeQualifiedName.Name);
            }
        }
Exemple #5
0
        public void WriteOuterXml(XmlWriter writer)
        {
            var adaptor = new XmlWriteAdaptor(writer, Constants.Xml.Namespace);

            adaptor.WriteStartElement(Constants.Xml.DiagnosticDetail.Name);
            adaptor.WriteNamespace(Constants.Xml.Namespace);
            WriteXml(adaptor);
            adaptor.WriteEndElement();
        }
Exemple #6
0
        public void WriteOuterXml(XmlWriter xmlWriter)
        {
            XmlWriteAdaptor adaptor = new XmlWriteAdaptor(xmlWriter, Constants.Xml.Namespace);

            adaptor.WriteStartElement(Constants.Xml.EventMessagesElement);

            // Add the XSI namespace.

            adaptor.WriteNamespace(Constants.Xsi.Prefix, Constants.Xsi.Namespace);
            adaptor.WriteNamespace(Constants.Xml.UtilityPrefix, Constants.Xml.UtilityNamespace);
            adaptor.WriteNamespace(Constants.Xml.TypePrefix, Constants.Xml.TypeNamespace);

            // Write the messages.

            WriteXml(adaptor);

            adaptor.WriteEndElement();
        }
Exemple #7
0
        public void WriteXml(XmlWriter xmlWriter)
        {
            XmlWriteAdaptor adaptor = new XmlWriteAdaptor(xmlWriter, GetXmlNamespace());

            adaptor.WriteNamespace("lm", GetXmlNamespace());
            WriteNamespaces(adaptor);
            adaptor.WriteAttribute(Constants.Xsi.TypeAttribute, Constants.Xsi.Prefix, Constants.Xsi.Namespace, GetType().Name);
            WriteXml(adaptor);
        }
Exemple #8
0
        private void WriteXml(XmlWriteAdaptor adaptor)
        {
            adaptor.WriteNamespace(Constants.Xml.Prefix, Constants.Xml.Namespace);

            adaptor.WriteElement(Constants.Xml.SecurityDetail.ProcessUserNameElement, m_processUserName);
            adaptor.WriteElement(Constants.Xml.SecurityDetail.AuthenticationTypeElement, m_authenticationType);
            adaptor.WriteElement(Constants.Xml.SecurityDetail.IsAuthenticatedElement, XmlConvert.ToString(m_isAuthenticated));
            adaptor.WriteElement(Constants.Xml.SecurityDetail.UserNameElement, m_userName);
        }
Exemple #9
0
        private void WriteXml(XmlWriteAdaptor adaptor)
        {
            adaptor.WriteNamespace(Constants.Xml.Prefix, Constants.Xml.Namespace);

            adaptor.WriteElement(Constants.Xml.ProcessDetail.ProcessIdElement, XmlConvert.ToString(_processId));
            adaptor.WriteElement(Constants.Xml.ProcessDetail.ProcessNameElement, _processName);
            adaptor.WriteElement(Constants.Xml.ProcessDetail.MachineNameElement, _machineName);
            adaptor.WriteElement(Constants.Xml.ProcessDetail.CommandLineArgsElement, _commandLineArgs);
        }
Exemple #10
0
 private void WriteXml(XmlWriteAdaptor adaptor)
 {
     adaptor.WriteNamespace(Constants.Xml.Prefix, Constants.Xml.Namespace);
     adaptor.WriteName(_name);
     foreach (var value in _values)
     {
         adaptor.WriteElement(value.Name, (value.Value ?? string.Empty).ToString());
     }
 }
Exemple #11
0
        public void WriteOuterXml(XmlWriter xmlWriter)
        {
            // Create an adaptor.

            var adaptor = new XmlWriteAdaptor(xmlWriter, Constants.Xml.Namespace);

            adaptor.WriteStartElement(Constants.Xml.EventMessageElement);

            // Add the XSI namespace if not already there.

            adaptor.WriteNamespace(Constants.Xsi.Prefix, Constants.Xsi.Namespace);
            adaptor.WriteNamespace(Constants.Xml.UtilityPrefix, Constants.Xml.UtilityNamespace);
            adaptor.WriteNamespace(Constants.Xml.TypePrefix, Constants.Xml.TypeNamespace);

            // Add contents.

            WriteXml(adaptor);

            adaptor.WriteEndElement();
        }
Exemple #12
0
        public void WriteOuterXml(XmlWriter xmlWriter)
        {
            XmlWriteAdaptor adaptor = new XmlWriteAdaptor(xmlWriter, GetXmlNamespace());

            adaptor.WriteStartElement(Constants.Xml.Exception.ExceptionElement);
            adaptor.WriteNamespace(GetXmlNamespace());
            WriteNamespaces(adaptor);
            adaptor.WriteAttribute(Constants.Xsi.TypeAttribute, Constants.Xsi.Prefix, Constants.Xsi.Namespace, GetType().Name);
            WriteXml(adaptor);
            adaptor.WriteEndElement();
        }
Exemple #13
0
        private void WriteXml(XmlWriteAdaptor adaptor)
        {
            adaptor.WriteNamespace(Constants.Xml.Prefix, Constants.Xml.Namespace);

            adaptor.WriteElement(Constants.Xml.ThreadDetail.ThreadId, XmlConvert.ToString(m_threadId));
            adaptor.WriteElement(Constants.Xml.ThreadDetail.ApartmentState, m_apartmentState.ToString());
            adaptor.WriteElement(Constants.Xml.ThreadDetail.Culture, m_culture);
            adaptor.WriteElement(Constants.Xml.ThreadDetail.ThreadName, m_threadName);
            adaptor.WriteElement(Constants.Xml.ThreadDetail.State, m_state.ToString());
            adaptor.WriteElement(Constants.Xml.ThreadDetail.Priority, m_priority.ToString());
            adaptor.WriteElement(Constants.Xml.ThreadDetail.IsThreadPoolThread, XmlConvert.ToString(m_isThreadPoolThread));
            adaptor.WriteElement(Constants.Xml.ThreadDetail.Sequence, XmlConvert.ToString(m_sequence));
        }
Exemple #14
0
        public void WriteXsiTypeAttribute(XmlWriteAdaptor adaptor)
        {
            const string method = "WriteXsiTypeAttribute";

            if (adaptor == null)
            {
                throw new NullParameterException(GetType(), method, "adaptor");
            }

            string typeName;

            if (_namespace.Length > 0)
            {
                // Find the existing prefix for this namespace or write a new namespace declaration.

                string prefix = adaptor.LookupPrefix(_namespace);

                if (prefix == null)
                {
                    prefix = GetNameFromFullNameUnchecked(_namespace).ToLower();
                    adaptor.WriteNamespace(prefix, _namespace);
                }

                typeName = prefix + ":" + _name;
            }
            else
            {
                typeName = _name;
            }

            // Append the version with a "-", which is valid in a QName.

            if (_version != null)
            {
                typeName += "-" + _version;
            }

            // Write xsi:type.

            adaptor.WriteAttribute(Constants.Xsi.TypeAttribute, Constants.Xsi.Prefix,
                                   Constants.Xsi.Namespace, typeName);
        }
Exemple #15
0
        private void WriteXml(XmlWriteAdaptor adaptor)
        {
            adaptor.WriteNamespace(Constants.Xml.Prefix, Constants.Xml.Namespace);

            adaptor.WriteElement(Constants.Xml.NetDetail.AppDomainNameElement, m_appDomainName);
        }
Exemple #16
0
 protected virtual void WriteNamespaces(XmlWriteAdaptor adaptor)
 {
     adaptor.WriteNamespace(Constants.Xsi.Prefix, Constants.Xsi.Namespace);
 }