public FacetsCompiler(DatatypeImplementation baseDatatype, RestrictionFacets restriction)
{
this.firstPattern = true;
this.regStr = null;
this.pattern_facet = null;
this.datatype = baseDatatype;
this.derivedRestriction = restriction;
this.baseFlags = (this.datatype.Restriction != null) ? this.datatype.Restriction.Flags : ((RestrictionFlags)0);
this.baseFixedFlags = (this.datatype.Restriction != null) ? this.datatype.Restriction.FixedFlags : ((RestrictionFlags)0);
this.validRestrictionFlags = this.datatype.ValidRestrictionFlags;
this.nonNegativeInt = DatatypeImplementation.GetSimpleTypeFromTypeCode(XmlTypeCode.NonNegativeInteger).Datatype;
this.builtInEnum = (!(this.datatype is Datatype_union) && !(this.datatype is Datatype_List)) ? this.datatype.TypeCode : XmlTypeCode.None;
this.builtInType = (this.builtInEnum > XmlTypeCode.None) ? DatatypeImplementation.GetSimpleTypeFromTypeCode(this.builtInEnum).Datatype : this.datatype;
}