public int Compare(object o1, object o2) { XmlSchemaFacet f1 = (XmlSchemaFacet)o1; XmlSchemaFacet f2 = (XmlSchemaFacet)o2; return(String.Compare(f1.GetType().Name + ":" + f1.Value, f2.GetType().Name + ":" + f2.Value, StringComparison.Ordinal)); }
public int Compare(object?o1, object?o2) { XmlSchemaFacet f1 = (XmlSchemaFacet)o1 !; XmlSchemaFacet f2 = (XmlSchemaFacet)o2 !; return(string.Compare($"{f1.GetType().Name}:{f1.Value}", $"{f2.GetType().Name}:{f2.Value}", StringComparison.Ordinal)); }
public int Compare(object o1, object o2) { XmlSchemaFacet facet = (XmlSchemaFacet)o1; XmlSchemaFacet facet2 = (XmlSchemaFacet)o2; return(string.Compare(facet.GetType().Name + ":" + facet.Value, facet2.GetType().Name + ":" + facet2.Value, StringComparison.Ordinal)); }
private static bool FacetEquals(XmlSchemaFacet facet1, XmlSchemaFacet facet2) { if (facet1 == null) { return(facet2 == null); } if (facet2 == null) { return(false); } if (facet1.GetType() != facet2.GetType()) { return(false); } // TODO: Enum facets are missing comparison of unhandled attributs return(facet1.IsFixed == facet2.IsFixed && string.Equals(facet1.Value, facet2.Value)); }