internal static XElement GetSchemaXml(this Field templateField, TokenParser parser, params string[] tokensToSkip) { XElement schemaElement; if (!_fieldXmlDictionary.TryGetValue(templateField, out schemaElement)) { schemaElement = XElement.Parse(parser.ParseXmlString(templateField.SchemaXml, tokensToSkip)); _fieldXmlDictionary[templateField] = schemaElement; } return(schemaElement); }
internal static Guid GetFieldId(this Field templateField, TokenParser parser) { XElement schemaElement; if (!_fieldXmlDictionary.TryGetValue(templateField, out schemaElement)) { schemaElement = XElement.Parse(parser.ParseXmlString(templateField.SchemaXml)); _fieldXmlDictionary[templateField] = schemaElement; } var id = (Guid)schemaElement.Attribute("ID"); return(id); }
internal static Step GetFieldProvisioningStep(this Field templateField, TokenParser parser) { var schemaElement = XElement.Parse(parser.ParseString(templateField.SchemaXml)); var type = (string)schemaElement.Attribute("Type"); if (type != "Lookup" && type != "LookupMulti") { return(Step.ListAndStandardFields); } else { return(Step.LookupFields); } }
internal static Step GetFieldProvisioningStep(this Field templateField, TokenParser parser) { XElement schemaElement; if (!_fieldXmlDictionary.TryGetValue(templateField, out schemaElement)) { schemaElement = XElement.Parse(parser.ParseXmlString(templateField.SchemaXml)); _fieldXmlDictionary[templateField] = schemaElement; } var type = (string)schemaElement.Attribute("Type"); if (type != "Lookup" && type != "LookupMulti") { return(Step.ListAndStandardFields); } return(Step.LookupFields); }