コード例 #1
0
 public StartTagAttributeNameSuggestion(DataTypes dataTypes, IElementContext elementContext, IDictionary <string, string> namespaceDeclarations)
 {
     _dataTypes             = dataTypes;
     _elementContext        = elementContext;
     _namespaceDeclarations = namespaceDeclarations;
 }
コード例 #2
0
        public static IEnumerable <KeyValuePair <string, DataType> > ResolveNamesAndTypes(DataTypes dataTypes,
                                                                                          IEnumerable <KeyValuePair <string, string> > nameAttributes, IDictionary <string, string> namespaces)
        {
            var nameToDataType = new Dictionary <string, DataType>();

            foreach (var nameAttribute in nameAttributes)
            {
                var dataType = DataTypeHelper.ResolveDataTypeFromName(nameAttribute.Key, dataTypes.AccessibleUxTypes, namespaces);
                if (dataType == null)
                {
                    continue;
                }

                nameToDataType.Add(nameAttribute.Value, dataType);
            }

            return(nameToDataType);
        }