internal virtual void OnUnknownAttribute(XmlAttributeEventArgs e) { if (onUnknownAttribute != null) { onUnknownAttribute(this, e); } }
void UnknownAttribute(object o, XmlAttribute attr, string qnames) { int line_number, line_position; if (Reader is XmlTextReader) { line_number = ((XmlTextReader)Reader).LineNumber; line_position = ((XmlTextReader)Reader).LinePosition; } else { line_number = 0; line_position = 0; } XmlAttributeEventArgs args = new XmlAttributeEventArgs(attr, line_number, line_position, o); #if NET_2_0 args.ExpectedAttributes = qnames; #endif if (eventSource != null) { eventSource.OnUnknownAttribute(args); } }
private void OnUnknownAttribute(object sender, XmlAttributeEventArgs e) { System.Xml.XmlAttribute attr = e.Attr; // TODO: should be handled as an exception to the user Logger.Fail ("Unknown attribute " + attr.Name + "='" + attr.Value + "'"); }
static void OnUnknownAttribute(object sender, XmlAttributeEventArgs e) { if (e.Attr == null) return; // ignore attributes from known namepsaces if (IsKnownNamespace(e.Attr.NamespaceURI)) return; Tracing.OnUnknownAttribute(sender, e); if (e.ExpectedAttributes == null) throw new InvalidOperationException(Res.GetString(Res.WebUnknownAttribute, e.Attr.Name, e.Attr.Value)); else if (e.ExpectedAttributes.Length == 0) throw new InvalidOperationException(Res.GetString(Res.WebUnknownAttribute2, e.Attr.Name, e.Attr.Value)); else throw new InvalidOperationException(Res.GetString(Res.WebUnknownAttribute3, e.Attr.Name, e.Attr.Value, e.ExpectedAttributes)); }
private static void OnUnknownAttribute(object sender, XmlAttributeEventArgs e) { if ((e.Attr != null) && !IsKnownNamespace(e.Attr.NamespaceURI)) { Tracing.OnUnknownAttribute(sender, e); if (e.ExpectedAttributes == null) { throw new InvalidOperationException(System.Web.Services.Res.GetString("WebUnknownAttribute", new object[] { e.Attr.Name, e.Attr.Value })); } if (e.ExpectedAttributes.Length == 0) { throw new InvalidOperationException(System.Web.Services.Res.GetString("WebUnknownAttribute2", new object[] { e.Attr.Name, e.Attr.Value })); } throw new InvalidOperationException(System.Web.Services.Res.GetString("WebUnknownAttribute3", new object[] { e.Attr.Name, e.Attr.Value, e.ExpectedAttributes })); } }
internal static void OnUnknownAttribute(object sender, XmlAttributeEventArgs e) { if ((ValidateSettings(Asmx, TraceEventType.Warning) && (e.Attr != null)) && !RuntimeUtils.IsKnownNamespace(e.Attr.NamespaceURI)) { string name = (e.ExpectedAttributes == null) ? "WebUnknownAttribute" : ((e.ExpectedAttributes.Length == 0) ? "WebUnknownAttribute2" : "WebUnknownAttribute3"); TraceEvent(TraceEventType.Warning, Res.GetString(name, new object[] { e.Attr.Name, e.Attr.Value, e.ExpectedAttributes })); } }
void UnknownAttribute (object o, XmlAttribute attr, string qnames) { int line_number, line_position; if (Reader is XmlTextReader){ line_number = ((XmlTextReader)Reader).LineNumber; line_position = ((XmlTextReader)Reader).LinePosition; } else { line_number = 0; line_position = 0; } XmlAttributeEventArgs args = new XmlAttributeEventArgs (attr, line_number, line_position, o, qnames); if (eventSource != null) eventSource.OnUnknownAttribute (args); }
private static void Serializer_UnknownAttribute(object sender, XmlAttributeEventArgs e) { if (e.Attr.Name.ToLower() != "xsi:type" && e.Attr.Name.ToLower() != "xsi:schemalocation") { Handle_Unknown_SDMX_Event(null, e, null); } }
internal virtual void OnUnknownAttribute (XmlAttributeEventArgs e) { if (onUnknownAttribute != null) onUnknownAttribute(this, e); }
/// <include file='doc\XmlSerializationReader.uex' path='docs/doc[@for="XmlSerializationReader.UnknownAttribute1"]/*' /> protected void UnknownAttribute(object o, XmlAttribute attr, string qnames) { if (events.OnUnknownAttribute != null) { int lineNumber, linePosition; GetCurrentPosition(out lineNumber, out linePosition); XmlAttributeEventArgs e = new XmlAttributeEventArgs(attr, lineNumber, linePosition, o, qnames); events.OnUnknownAttribute(events.sender, e); } }
private static void XmlParseErrorOnAttribute(object sender, XmlAttributeEventArgs e) { throw new XmlException("Unkown attribute " + e.Attr + " at " + e.LineNumber + "," + e.LinePosition); }
void UnknownAttributeHandler(object sender, XmlAttributeEventArgs e) { _deserializationTextBuffer.AppendFormat("{0},{1} - 예상하지 못한 특성 '{2}'가 나타났습니다.\r\n", e.LineNumber, e.LinePosition, e.Attr.LocalName); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void serializer_UnknownAttribute(object sender, XmlAttributeEventArgs e) { //XmlAttribute attr = e.Attr; //string s = "Unknown Node:" + attr.Name + "\t" + attr.Value; }
internal static void OnUnknownAttribute(object sender, XmlAttributeEventArgs e) { if (!ValidateSettings(Asmx, TraceEventType.Warning)) return; if (e.Attr == null) return; // ignore attributes from known namepsaces if (RuntimeUtils.IsKnownNamespace(e.Attr.NamespaceURI)) return; string format = e.ExpectedAttributes == null ? Res.WebUnknownAttribute : e.ExpectedAttributes.Length == 0 ? Res.WebUnknownAttribute2 : Res.WebUnknownAttribute3; TraceEvent(TraceEventType.Warning, Res.GetString(format, e.Attr.Name, e.Attr.Value, e.ExpectedAttributes)); }
public void unknownAttribute(object sender, XmlAttributeEventArgs e) { String msg = String.Format("unknown Attribute: {2} in Zeile {0} Pos {1}", e.LineNumber, e.LinePosition, e.Attr.Name); show(msg); Console.WriteLine(msg); }
/// <summary> /// Fault handling for reading an unknown attribute from the specified Xml file /// </summary> private static void Serializer_UnknownAttribute(object sender, XmlAttributeEventArgs e) { MessageBox.Show(String.Format("Unknown attribute: {0} ='{1}'", e.Attr.Name, e.Attr.Value), "Error reading file", MessageBoxButton.OK, MessageBoxImage.Error); }
private static void UnknownAttribute(object sender, XmlAttributeEventArgs e) { Debug.Log("unknown attribute " + sender.ToString() + " " + e.ToString()); }
/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// xmlattributeeventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this XmlAttributeEventHandler xmlattributeeventhandler, Object sender, XmlAttributeEventArgs e, AsyncCallback callback) { if(xmlattributeeventhandler == null) throw new ArgumentNullException("xmlattributeeventhandler"); return xmlattributeeventhandler.BeginInvoke(sender, e, callback, null); }
private static void serializer_UnknownAttribute(object sender, XmlAttributeEventArgs e) { #if DEBUG System.Xml.XmlAttribute attr = e.Attr; Program.debugStream.WriteLine("Unknown attribute " + attr.Name + "='" + attr.Value + "'"); #endif }
static protected void DeserializeUnknownAttribute(object sender, XmlAttributeEventArgs e) { // System.Xml.XmlAttribute attr = e.Attr; // MessageBox.Show("Ignoring Unknown Attribute from settings file: " + attr.Name + " = '" + attr.Value + "'"); }
private static void xs_UnknownAttribute(object sender, XmlAttributeEventArgs e) { // we dont' care about unknown attributes }
/// <summary> /// Notify about unknown OpenGL specification attributes. /// </summary> /// <param name="sender"> /// The <see cref="XmlSerializer"/> parsing the OpenGL specification. /// </param> /// <param name="e"> /// A <see cref="XmlAttributeEventArgs"/> that specifies the event arguments. /// </param> private static void SpecSerializer_UnknownAttribute(object sender, XmlAttributeEventArgs e) { Console.WriteLine("Unknown attribute {0} at {1}:{2}.", e.Attr.Name, e.LineNumber, e.LinePosition); }
/// <summary> /// Handles the UnknownAttribute event of the serializer control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Xml.Serialization.XmlAttributeEventArgs"/> instance containing the event data.</param> private void serializer_UnknownAttribute( object sender, XmlAttributeEventArgs e ) { System.Xml.XmlAttribute attr = e.Attr; _errorText += String.Format( "unknown attribute {0}='{1}'", attr.Name, attr.Value ); }
protected void OnUnknownAttribute(object sender, XmlAttributeEventArgs e) { XmlAttribute attr = e.Attr; Trace.WriteLine("Unknown attribute " + attr.Name + "='" + attr.Value + "'"); }
static private void serializer_UnknownAttribute (object sender, System.Xml.Serialization.XmlAttributeEventArgs e) { System.Xml.XmlAttribute attr = e.Attr; MessageLogger.Add("Error in xml settings file - unknown attribute " + attr.Name + "='" + attr.Value + "'", MessageLogger.MsgLevel.error); }
/// <summary> /// Handler for unknown attributes. /// </summary> /// <param name="sender">The sender/</param> /// <param name="e">Event arguments.</param> private static void HandleUnknownAttribute(object sender, XmlAttributeEventArgs e) { throw new InvalidOperationException(e.ToString() + " Unknown attribute " + e.Attr.Name); }
static void OnUnknownAttribute(object sender, XmlAttributeEventArgs e) { FieldInfo field = e.ObjectBeingDeserialized.GetType().GetField(e.Attr.Name); MethodInfo parse = field.FieldType.GetMethod("Parse"); field.SetValue(e.ObjectBeingDeserialized, parse.Invoke(null, new object[] { e.Attr.Value })); }
void mySerializer_UnknownAttribute(object sender, XmlAttributeEventArgs e) { ShowXmlParserError(); }
private void OnUnknownAttribute(object sender, XmlAttributeEventArgs e) { Console.Out.WriteLine("Template Serializer. Unknown node is encountered in the tempalte: " + (e.Attr.ParentNode == null ? "" : e.Attr.ParentNode + ":") + e.Attr.Name); }
private static void serializer_UnknownAttribute(object sender, XmlAttributeEventArgs e) { System.Xml.XmlAttribute attr = e.Attr; Console.WriteLine("Unknown attribute " + attr.Name + "='" + attr.Value + "'"); }
protected void SerializerUnknownAttribute(object sender, XmlAttributeEventArgs e) { XmlAttribute attr = e.Attr; Console.WriteLine("Unknown attribute " + attr.Name + "='" + attr.Value + "'"); }
/*----------------------------------------------------------------------------- XML options methods -----------------------------------------------------------------------------*/ protected void XmlSerializer_UnknownAttribute( object sender, XmlAttributeEventArgs e ) { }
private static void Handle_Unknown_SDMX_Event(XmlElementEventArgs eElementEventArgs,XmlAttributeEventArgs eAttributeEventArgs,UnreferencedObjectEventArgs eObjectEventArgs) { Exception ex; if (eElementEventArgs != null) { ex = new Exception(Constants.InvalidElement+ eElementEventArgs.Element.Name); } else if (eAttributeEventArgs != null) { ex = new Exception(Constants.InvalidAttribute + eAttributeEventArgs.Attr.Name); } else if (eObjectEventArgs != null) { ex = new Exception(Constants.LoadingException); } else { ex = new Exception(Constants.LoadingException); } throw ex; }