public LoadDslModelCommand( IDslModel dslModel, IDataTypeProvider dataTypeProvider) { this.DslModel = dslModel; this.DataTypeProvider = dataTypeProvider; }
public QueryDataSourceCommand( IDataTypeProvider dataTypeProvider, IIndex<string, IQueryDataSourceCommandImplementation> repositories) { _dataTypeProvider = dataTypeProvider; _repositories = repositories; }
public GrammarProvider(IHapiLog log) : base(log) { _messageProvider = new MessageProvider(log); _segmentProvider = new SegmentProvider(log); _dataTypeProvider = new DataTypeProvider(log); _eventMappingProvider = new EventMappingProvider(log); }
public LoadDslModelCommand( IDslSource dslSource, IDataTypeProvider dataTypeProvider) { this.DslSource = dslSource; this.DataTypeProvider = dataTypeProvider; }
public static ProjectObjectIdentifiers Create(Project project, IDataTypeProvider typeInfo, Action <Exception> onError) { var idToNode = ImmutableDictionary.CreateBuilder <ObjectIdentifier, Node>(); var nodeToId = ImmutableDictionary.CreateBuilder <Node, ObjectIdentifier>(); foreach (var kp in project.Documents) { var path = kp.Key; var document = kp.Value; try { var index = 0; foreach (var node in document.NodesInDocumentOrder) { var id = new ObjectIdentifier(path, index); idToNode[id] = node; nodeToId[node] = id; index++; } } catch (Exception e) { onError(e); } } return(new ProjectObjectIdentifiers { _idToNode = idToNode.ToImmutable(), _nodeToId = nodeToId.ToImmutable(), }); }
public GrammarProvider(IMessageProvider messageProvider, ISegmentProvider segmentProvider, IDataTypeProvider dataTypeProvider, IEventMappingProvider eventMappingProvider) { _messageProvider = messageProvider; _segmentProvider = segmentProvider; _dataTypeProvider = dataTypeProvider; _eventMappingProvider = eventMappingProvider; }
public ProjectBuild( string project, string assembly, IDataTypeProvider typeInfo) { Project = project; Assembly = assembly; TypeInfo = typeInfo; }
readonly Dictionary <string, IDataType> _nameToTypeCache = new Dictionary <string, IDataType>(); // optimization public GhostCompiler(IDataTypeProvider baseCompiler, IImmutableList <IDataType> ghostTypes) { _baseCompiler = baseCompiler; _ghostTypes = ghostTypes; foreach (var t in ghostTypes) { _ghostTypeDict.Add(t.FullName, t); } }
/// <summary> /// Constructs an instance of <see cref="ClientModelMetadataProvider"/>. /// </summary> public ClientModelMetadataProvider( IEntityMetadataProvider entityMetadataProvider, ISyntheticPropertyNameConvention syntheticPropertyNameConvention, IDataTypeProvider dataTypeProvider) { _entityMetadataProvider = entityMetadataProvider; _syntheticPropertyNameConvention = syntheticPropertyNameConvention; _dataTypeProvider = dataTypeProvider; }
public CodeGenerator( ContentTypeConfiguration contentTypeConfiguration, IDataTypeProvider dataTypeProvider, CodeGeneratorFactory factory) { this.contentTypeConfiguration = contentTypeConfiguration; this.dataTypeProvider = dataTypeProvider; this.factory = factory; }
public QueryDataSourceCommand( IDataTypeProvider dataTypeProvider, GenericRepositories repositories, ServerCommandsUtility serverCommandsUtility) { _dataTypeProvider = dataTypeProvider; _repositories = repositories; _serverCommandsUtility = serverCommandsUtility; }
public ReadCommand( IDataTypeProvider dataTypeProvider, GenericRepositories repositories, ILogProvider logProvider, ServerCommandsUtility serverCommandsUtility) { _dataTypeProvider = dataTypeProvider; _repositories = repositories; _logger = logProvider.GetLogger(GetType().Name); _serverCommandsUtility = serverCommandsUtility; }
public ValueParser(IDataTypeProvider compiler, string project) { _compiler = compiler; var valueParserCtor = GetUxilCompilerCtor(); _valueParser = (global::Uno.UX.Markup.UXIL.Compiler)valueParserCtor.Invoke( new object[] { compiler, Path.GetDirectoryName(project), null, new MarkupErrorLog(new Log(Console.Error, Console.Error), SourcePackage.Unknown) }); }
/// <exception cref="UserCodeContainsErrors"></exception> Project Parse(IEnumerable <UxFileContents> documents, IDataTypeProvider ghostCompiler, IMarkupErrorLog log) { try { var markupErrorLog = new HasErrorsErrorLogWrapper(log); var result = Uno.UX.Markup.UXIL.Compiler.Compile( ghostCompiler, documents.Select(x => new Uno.UX.Markup.UXIL.Compiler.UXSource(x.Path, x.Contents)), Path.GetDirectoryName(_project), "Project", null, markupErrorLog); if (result == null) { throw new UserCodeContainsErrors(); } if (markupErrorLog.HasErrors) { throw new UserCodeContainsErrors(); } return(result); } catch (UserCodeContainsErrors) { throw; } catch (XmlException e) { throw new InvalidMarkup( e.SourceUri, new TextPosition(new LineNumber(e.LineNumber + 1), new CharacterNumber(e.LinePosition + 1)), e.Message); } catch (MarkupException e) { throw new InvalidMarkup( e.Source, Optional.None(), e.Message); } catch (Exception e) // this dumb { throw new UnknownError(e.Message); } }
/// <summary> /// Constructs an instance of <see cref="BreezeMetadataBuilder"/>. /// </summary> public BreezeMetadataBuilder( INHibernateClassMetadataProvider classMetadataProvider, IEntityMetadataProvider entityMetadataProvider, IBreezeConfigurator breezeConfigurator, IClientModelMetadataProvider clientModelMetadataProvider, IPropertyValidatorsProvider propertyValidatorsProvider, IDataTypeProvider dataTypeProvider) { _classMetadataProvider = classMetadataProvider; _entityMetadataProvider = entityMetadataProvider; _breezeConfigurator = breezeConfigurator; _clientModelMetadataProvider = clientModelMetadataProvider; _propertyValidatorsProvider = propertyValidatorsProvider; _dataTypeProvider = dataTypeProvider; }
public GlobalResourceCache(IDataTypeProvider dataTypeProvider) { _dataTypeProvider = dataTypeProvider; foreach (var r in _dataTypeProvider.DataTypes.SelectMany(x => x.GlobalResources)) { if (!_handles.ContainsKey(r.GlobalSymbol)) { _handles.Add(r.GlobalSymbol, new List <Node>()); } var refNode = new ResourceRefNode(FileSourceInfo.Unknown, r.FullPath, null, r.DataType, InstanceType.Global); _handles[r.GlobalSymbol].Add(refNode); if (r.GlobalSymbol != r.FullPath) { if (_fullPaths.ContainsKey(r.FullPath)) { throw new System.Exception("Multiple global resources with the key '" + r.FullPath + "' found in the project"); } _fullPaths.Add(r.FullPath, refNode); } } }
public static IDataArray CreateDataArray <T>(this IDataTypeProvider typeProvider, T[] data) where T : class { return(typeProvider.CreateDataArray(typeof(T), data)); }
public static DataType GetDataType(this IDataTypeProvider provider, IType type) { return(provider.TryGetDataType(type, out var dataType) ? dataType : provider.GetDefaultType()); }
public PingCommand(IDataTypeProvider dataTypeProvider) { _dataTypeProvider = dataTypeProvider; }
public GhostCompilerFactory(IDataTypeProvider realCompiler) { _realCompiler = realCompiler; }
public CachingCompiler(IDataTypeProvider baseCompiler) { _baseCompiler = baseCompiler; _dataTypes = baseCompiler.DataTypes.Select(Cache).ToArray(); }