Inheritance: System.EventArgs
コード例 #1
0
 internal virtual void OnUnknownAttribute(XmlAttributeEventArgs e)
 {
     if (onUnknownAttribute != null)
     {
         onUnknownAttribute(this, e);
     }
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 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 + "'");
 }
コード例 #4
0
 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));
 }
コード例 #5
0
 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 }));
     }
 }
コード例 #6
0
 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 }));
     }
 }
コード例 #7
0
		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);
		}
コード例 #8
0
 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);
     }
 }
コード例 #9
0
ファイル: XmlSerializer.cs プロジェクト: ItsVeryWindy/mono
		internal virtual void OnUnknownAttribute (XmlAttributeEventArgs e) 
		{
			if (onUnknownAttribute != null) onUnknownAttribute(this, e);
		}
コード例 #10
0
 /// <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);
     }
 }
コード例 #11
0
 private static void XmlParseErrorOnAttribute(object sender, XmlAttributeEventArgs e)
 {
     throw new XmlException("Unkown attribute " + e.Attr + " at " + e.LineNumber + "," + e.LinePosition);
 }
コード例 #12
0
ファイル: XmlUtil.cs プロジェクト: tomochandv/Test
 void UnknownAttributeHandler(object sender, XmlAttributeEventArgs e)
 {
     _deserializationTextBuffer.AppendFormat("{0},{1} - 예상하지 못한 특성 '{2}'가 나타났습니다.\r\n",
         e.LineNumber,
         e.LinePosition,
         e.Attr.LocalName);
 }
コード例 #13
0
ファイル: SysFunction.cs プロジェクト: camnpr/BaiduPush
 /// <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;
 }
コード例 #14
0
 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));
 }
コード例 #15
0
ファイル: KmlData.cs プロジェクト: RrPt/KmlBrowser
 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);
 }
コード例 #16
0
 /// <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);
        }
コード例 #19
0
ファイル: ServerList.cs プロジェクト: gyod/lineage2tools
 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
 }
コード例 #20
0
ファイル: WixEditSettings.cs プロジェクト: xwiz/WixEdit
 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 + "'");
 }
コード例 #21
0
ファイル: MenuXmlDatabase.cs プロジェクト: pietie/HyperSearch
 private static void xs_UnknownAttribute(object sender, XmlAttributeEventArgs e)
 {
     // we dont' care about unknown attributes
 }
コード例 #22
0
		/// <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);
		}
コード例 #23
0
ファイル: MessageObject.cs プロジェクト: tolumania/i20022
 /// <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 );
 }
コード例 #24
0
ファイル: FictionBookReader.cs プロジェクト: nlstone/Shareaza
 protected void OnUnknownAttribute(object sender, XmlAttributeEventArgs e)
 {
     XmlAttribute attr = e.Attr;
     Trace.WriteLine("Unknown attribute " + attr.Name + "='" + attr.Value + "'");
 }
コード例 #25
0
 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);
 }
コード例 #26
0
 /// <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);
 }
コード例 #27
0
ファイル: Program.cs プロジェクト: CeeJay79/aion_ext
 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 }));
 }
コード例 #28
0
 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);
 }
コード例 #30
0
ファイル: config.cs プロジェクト: kuro68k/Superplay
 private static void serializer_UnknownAttribute(object sender, XmlAttributeEventArgs e)
 {
     System.Xml.XmlAttribute attr = e.Attr;
     Console.WriteLine("Unknown attribute " + attr.Name + "='" + attr.Value + "'");
 }
コード例 #31
0
 protected void SerializerUnknownAttribute(object sender, XmlAttributeEventArgs e)
 {
     XmlAttribute attr = e.Attr;
     Console.WriteLine("Unknown attribute " +
     attr.Name + "='" + attr.Value + "'");
 }
コード例 #32
0
ファイル: MainWindow.cs プロジェクト: xiangyuan/Unreal4
		/*-----------------------------------------------------------------------------
			XML options methods
		-----------------------------------------------------------------------------*/

		protected void XmlSerializer_UnknownAttribute( object sender, XmlAttributeEventArgs e )
		{
		}
コード例 #33
0
        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;
        }