public INotifyObject PrepareNotifyObject(object data) { if (data is string || data is XmlReader) { } else { throw new ArgumentNullException("data parameter must be string or XmlReader type."); } INotifyObject notifyObject = NotifyObject.Create(data); return(notifyObject); }