コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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);
        }