/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// xmlserializationwritecallback.BeginInvoke(o, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this XmlSerializationWriteCallback xmlserializationwritecallback, Object o, AsyncCallback callback) { if (xmlserializationwritecallback == null) { throw new ArgumentNullException("xmlserializationwritecallback"); } return(xmlserializationwritecallback.BeginInvoke(o, callback, null)); }
protected void AddWriteCallback(Type type, string typeName, string typeNs, XmlSerializationWriteCallback callback) { WriteCallbackInfo info = new WriteCallbackInfo(); info.Type = type; info.TypeName = typeName; info.TypeNs = typeNs; info.Callback = callback; if (callbacks == null) { callbacks = new Hashtable(); } callbacks.Add(type, info); }
/// <include file='doc\XmlSerializationWriter.uex' path='docs/doc[@for="XmlSerializationWriter.AddWriteCallback"]/*' /> protected void AddWriteCallback(Type type, string typeName, string typeNs, XmlSerializationWriteCallback callback) { TypeEntry entry = new TypeEntry(); entry.typeName = typeName; entry.typeNs = typeNs; entry.type = type; entry.callback = callback; typeEntries[type] = entry; }
protected void AddWriteCallback (Type type, string typeName, string typeNs, XmlSerializationWriteCallback callback) { WriteCallbackInfo info = new WriteCallbackInfo (); info.Type = type; info.TypeName = typeName; info.TypeNs = typeNs; info.Callback = callback; if (callbacks == null) callbacks = new Hashtable (); callbacks.Add (type, info); }