System.Xml.Schema.FacetsChecker.FacetsCompiler.FinishFacetCompile C# (CSharp) Méthode

FinishFacetCompile() private méthode

private FinishFacetCompile ( ) : void
Résultat void
        internal void FinishFacetCompile() {
            //Additional check for pattern facet
            //If facet is XMLSchemaPattern, then the String built inside the loop
            //needs to be converted to a RegEx
            if(firstPattern == false) {
                if (derivedRestriction.Patterns == null) {
                    derivedRestriction.Patterns = new ArrayList();
                }
                try {
                    regStr.Append(")");
                    string tempStr = regStr.ToString();
                    if(tempStr.IndexOf('|') != -1) { // ordinal compare
                        regStr.Insert(0,"(");
                        regStr.Append(")");
                    }
                   derivedRestriction.Patterns.Add(new Regex(Preprocess(regStr.ToString()), RegexOptions.None));

                } catch (Exception e) {
                    throw new XmlSchemaException(Res.Sch_PatternFacetInvalid, e.Message, pattern_facet);
                }
            }
        }