상속: System.EventArgs
예제 #1
0
 internal virtual void OnUnknownNode(XmlNodeEventArgs e)
 {
     if (onUnknownNode != null)
     {
         onUnknownNode(this, e);
     }
 }
예제 #2
0
파일: xsd.cs 프로젝트: ArildF/masters
 string NodeNameOf(XmlNodeEventArgs e) {
     switch (e.NodeType) {
         case XmlNodeType.Element: return "<" + e.LocalName + " xmlns=\"" + e.NamespaceURI + "\">";
         case XmlNodeType.Attribute: return "attribute: " + e.LocalName;
         case XmlNodeType.Text: return "text: " + e.Text;
         case XmlNodeType.CDATA: return "CDATA";
         case XmlNodeType.ProcessingInstruction: return "<?";
         case XmlNodeType.Comment: return "<!-- " + e.Text + " -->";
         default: throw new InvalidOperationException(Res.GetString(Res.ErrUnknownNodeType));
     }
 }
예제 #3
0
파일: config.cs 프로젝트: kuro68k/Superplay
 // handlers for problems loading XML files
 private static void serializer_UnknownNode(object sender, XmlNodeEventArgs e)
 {
     Console.WriteLine("Unknown node:\t" + e.Name + "\t" + e.Text);
 }
예제 #4
0
 void mySerializer_UnknownNode(object sender, XmlNodeEventArgs e)
 {
     ShowXmlParserError();
 }
예제 #5
0
		internal virtual void OnUnknownNode (XmlNodeEventArgs e) 
		{
			if (onUnknownNode != null) onUnknownNode(this, e);
		}
예제 #6
0
 private static void XmlParseErrorOnNode(object sender, XmlNodeEventArgs e)
 {
     throw new XmlException("Error on node " + e.NodeType + "(" + e.Text + ") at " + e.LineNumber + "," +
                            e.LinePosition);
 }
 protected void SerializerUnknownNode(object sender, XmlNodeEventArgs e)
 {
     Console.WriteLine("Unknown Node:" + e.Name + "\t" + e.Text);
 }
예제 #8
0
파일: xsd.cs 프로젝트: ArildF/masters
 void OnUnknownNode(object sender, XmlNodeEventArgs e) {
     if (e.NodeType != XmlNodeType.Comment)
         Console.WriteLine(Res.GetString(Res.Warning, Res.GetString(Res.UnhandledNode, e.LineNumber, e.LinePosition, NodeNameOf(e))));
 }
예제 #9
0
 /// <summary>
 /// Fault handling for reading an unknown node from the specified Xml file
 /// </summary>
 private static void Serializer_UnknownNode(object sender, XmlNodeEventArgs e)
 {
     MessageBox.Show(String.Format("Unknown Node: {0} \t {1}", e.Name, e.Text), 
         "Error reading file",
         MessageBoxButton.OK, MessageBoxImage.Error);
 }
예제 #10
0
 private static void serializer_UnknownNode(object sender, XmlNodeEventArgs e)
 {
     Console.WriteLine("Unknown node {0} at line {1}, col {2}", e.Name, e.LineNumber, e.LinePosition);
 }
예제 #11
0
		private static void serializer_UnknownNode(object sender, XmlNodeEventArgs e)
		{
			Tracer.ErrorFormat("Unknown Node: {0}\t{1}", e.Name, e.Text);
		}
예제 #12
0
 void schemaSerializer_UnknownNode(object sender, XmlNodeEventArgs e)
 {
     this.loadError.Add("Unkonwn node (" + e.LineNumber + ", " + e.LinePosition + "): " + e.Name);
 }
 private void UnknownNode(XmlNode unknownNode, object o, string qnames)
 {
     if (unknownNode != null)
     {
         if (((unknownNode.NodeType != XmlNodeType.None) && (unknownNode.NodeType != XmlNodeType.Whitespace)) && (this.events.OnUnknownNode != null))
         {
             int num;
             int num2;
             this.GetCurrentPosition(out num, out num2);
             XmlNodeEventArgs e = new XmlNodeEventArgs(unknownNode, num, num2, o);
             this.events.OnUnknownNode(this.events.sender, e);
         }
         if (unknownNode.NodeType == XmlNodeType.Attribute)
         {
             this.UnknownAttribute(o, (XmlAttribute) unknownNode, qnames);
         }
         else if (unknownNode.NodeType == XmlNodeType.Element)
         {
             this.UnknownElement(o, (XmlElement) unknownNode, qnames);
         }
     }
 }
 void OnUnknownNode(object obj, XmlNodeEventArgs args)
 {
     // Breakpoint here and look at the args class
     Console.WriteLine(args.Name);
 }
예제 #15
0
 private void serializer_UnknownNode(object sender, XmlNodeEventArgs e)
 {
     if (!string.IsNullOrEmpty(e.Text))
     {
         Logger.Error("Unknown Node {0}", e.Name);
     }
 }
예제 #16
0
파일: Tracker.cs 프로젝트: DeSciL/Ogama
    /// <summary>
    /// <see cref="XmlSerializer.UnknownNode"/> event handler for
    ///   the <see cref="XmlSerializer"/>, that raises
    ///   a error message box when getting an unknown node in the
    ///   xml settings file.
    /// </summary>
    /// <param name="sender">
    /// Source of the event.
    /// </param>
    /// <param name="e">
    /// A <see cref="XmlNodeEventArgs"/> that contains the event data.
    /// </param>
    protected void SerializerUnknownNode(object sender, XmlNodeEventArgs e)
    {
      string message = "Unknown Node:" + e.Name + "\t" + e.Text + Environment.NewLine + " in tracker settings file."
                       + Environment.NewLine + "I try to ignore it.";

      InformationDialog.Show("XML error", message, false, MessageBoxIcon.Information);
    }
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// xmlnodeeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this XmlNodeEventHandler xmlnodeeventhandler, Object sender, XmlNodeEventArgs e, AsyncCallback callback)
        {
            if(xmlnodeeventhandler == null) throw new ArgumentNullException("xmlnodeeventhandler");

            return xmlnodeeventhandler.BeginInvoke(sender, e, callback, null);
        }
예제 #18
0
 private static void serializer_UnknownNode(object sender, XmlNodeEventArgs e)
 {
     #if DEBUG
     Program.debugStream.WriteLine("Unknown Node:" + e.Name + "\t" + e.Text);
     #endif
 }
예제 #19
0
		protected void XmlSerializer_UnknownNode( object sender, XmlNodeEventArgs e )
		{
		}
 private static void UnknownNode(object sender, XmlNodeEventArgs e)
 {
     Debug.Log("unknown node " + sender.ToString() + " " + e.ToString());
 }
 private void OnUnknownNode(object sender, XmlNodeEventArgs e)
 {
     Console.Out.WriteLine("Template Serializer. Unknown node is encountered in the tempalte: " + e.Text);
 }
예제 #22
0
        private void Serializer_UnknownNode(object sender, XmlNodeEventArgs e)
        {
            P p = e.ObjectBeingDeserialized as P;
            if (p != null)
            {
                if (p.Text == null)
                    p.Text = string.Empty;
                if (e.Name == "#text")
                     p.Text += e.Text;

            }
        }
예제 #23
0
 static protected void DeserializeUnknownNode(object sender, XmlNodeEventArgs e) {
     // MessageBox.Show("Ignoring Unknown Node from settings file: " +   e.Name);
 }
예제 #24
0
파일: KmlData.cs 프로젝트: RrPt/KmlBrowser
 public void unknownNode(object sender, XmlNodeEventArgs e)
 {
     String msg = String.Format("unknown Node: {2} vom Typ {3} in Zeile {0} Pos {1}", e.LineNumber, e.LinePosition, e.Name, e.NodeType);
     show(msg);
     Console.WriteLine(msg);
 }
예제 #25
0
 protected void OnUnknownNode(object sender, XmlNodeEventArgs e)
 {
     Trace.WriteLine("Unknown Node:" + e.Name + "\t" + e.Text);
 }
예제 #26
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void serializer_UnknownNode(object sender, XmlNodeEventArgs e)
 {
     //string s = "Unknown Node:" + e.Name + "\t" + e.Text;
 }
예제 #27
0
		void CDataTextNodes_BadNode (object s, XmlNodeEventArgs e)
		{
			Assert.Fail ();
		}
예제 #28
0
 private static void xs_UnknownNode(object sender, XmlNodeEventArgs e)
 {
     // we don't care about unknown nodes
 }
 void UnknownNode(XmlNode unknownNode, object o, string qnames) {
     if (unknownNode == null)
         return;
     if (unknownNode.NodeType != XmlNodeType.None && unknownNode.NodeType != XmlNodeType.Whitespace && events.OnUnknownNode != null) {
         int lineNumber, linePosition;
         GetCurrentPosition(out lineNumber, out linePosition);
         XmlNodeEventArgs e = new XmlNodeEventArgs(unknownNode, lineNumber, linePosition, o);
         events.OnUnknownNode(events.sender, e);
     }
     if (unknownNode.NodeType == XmlNodeType.Attribute) {
         UnknownAttribute(o, (XmlAttribute)unknownNode, qnames);
     }
     else if (unknownNode.NodeType == XmlNodeType.Element) {
         UnknownElement(o, (XmlElement)unknownNode, qnames);
     }
 }
예제 #30
0
 /// <summary>
 /// Handles the UnknownNode event of the serializer control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Xml.Serialization.XmlNodeEventArgs"/> instance containing the event data.</param>
 private void serializer_UnknownNode( object sender, XmlNodeEventArgs e )
 {
     _errorText += String.Format( "unknown node {0}='{1}'", e.Name, e.Text );
 }
예제 #31
0
 private void OnUnknownNode(object sender, XmlNodeEventArgs e)
 {
     // TODO: should be handled as an exception to the user
     Logger.Fail ("Unknown Node:" +   e.Name + "\t" + e.Text);
 }
예제 #32
0
 static private void serializer_UnknownNode
     (object sender, System.Xml.Serialization.XmlNodeEventArgs e)
 {
     MessageLogger.Add(string.Format("Error in xml settings file - unknown Node: {0} \t {1}", e.Name, e.Text), MessageLogger.MsgLevel.error);
 }