Bug 15552 - System.Xml.Schema.Extensions class missing from mono touch/Xam.iOS
Summary: System.Xml.Schema.Extensions class missing from mono touch/Xam.iOS
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 6.4.4
Hardware: All All
: --- enhancement
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-10-21 13:15 UTC by Jon Goldberger [MSFT]
Modified: 2013-12-15 15:04 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Comment 1 Jon Goldberger [MSFT] 2013-10-21 13:16:36 UTC
I can't seem to find the XDocument.Validate method in System.Xml.Linq.
Where is it?

So that I can solve the problem myself next time, can you please let me
know the best way to go from desired Class/method -> assembly to reference?

I usually just go by the MSFT doc online:
http://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument.validate(v=vs.90).aspx
Comment 2 Sebastien Pouliot 2013-10-21 15:15:26 UTC
The source file [1] has a `#if !NET_2_1` and IIRC the "mobile" class libraries still define this symbol - so the extensions are being excluded.

I'll confirm this and check if other (parts of) files falls into the same exclusion.

[1] mcs/class/System.Xml.Linq//System.Xml.Schema/Extensions.cs
Comment 3 Sebastien Pouliot 2013-10-21 15:37:31 UTC
Fixed in mono/master 4ccf3e3751fdca7ea758fa6c325248e77f74f3da. Xamarin.iOS (just like Xamarin.Android) is periodically updated to use newer mono for releases.

Enabling this file adds the following API (note that some are decorated with [MonoTODO]):

System.Xml.Linq.dll

New Namespace System.Xml.Schema

New Type System.Xml.Schema.Extensions

public static class Extensions {
	// methods
	public static IXmlSchemaInfo GetSchemaInfo (System.Xml.Linq.XAttribute source);
	public static IXmlSchemaInfo GetSchemaInfo (System.Xml.Linq.XElement source);
	public static void Validate (System.Xml.Linq.XElement source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler);
	public static void Validate (System.Xml.Linq.XDocument source, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler, bool addSchemaInfo);
	public static void Validate (System.Xml.Linq.XDocument source, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler);
	public static void Validate (System.Xml.Linq.XAttribute source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler, bool addSchemaInfo);
	public static void Validate (System.Xml.Linq.XAttribute source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler);
	public static void Validate (System.Xml.Linq.XElement source, XmlSchemaObject partialValidationType, XmlSchemaSet schemas, ValidationEventHandler validationEventHandler, bool addSchemaInfo);
}


note: I'll do some grep'ing to see if this happened elsewhere - but don't hesitate to open bug reports when API looks missing.