private FieldModel build(params string[] tokens) { var queue = new Queue <string>(tokens); var graph = new FieldCommand().Usages; return((FieldModel)graph.BuildInput(queue)); }
private FieldModel build(params string[] tokens) { var queue = new Queue <string>(tokens); var graph = new FieldCommand().Usages; var creator = new ActivatorCommandCreator(); return((FieldModel)graph.BuildInput(queue, creator)); }
private void RaiseEvent(FieldCommand fieldCommand, FieldEvent @event) { SimpleMapper.Map(fieldCommand, @event); if (Snapshot.SchemaDef.FieldsById.TryGetValue(fieldCommand.FieldId, out var field)) { @event.FieldId = new NamedId <long>(field.Id, field.Name); } RaiseEvent(@event); }
protected void RaiseEvent(FieldCommand fieldCommand, FieldEvent @event) { SimpleMapper.Map(fieldCommand, @event); if (schema.FieldsById.TryGetValue(fieldCommand.FieldId, out var field)) { @event.FieldId = new NamedId <long>(field.Id, field.Name); } RaiseEvent(@event); }
protected void RaiseEvent(FieldCommand fieldCommand, FieldEvent @event) { SimpleMapper.Map(fieldCommand, @event); if (schema.FieldsById.TryGetValue(fieldCommand.FieldId, out var field)) { @event.FieldId = new NamedId <long>(field.Id, field.Name); } else { throw new DomainObjectNotFoundException(fieldCommand.FieldId.ToString(), "Fields", typeof(Field)); } RaiseEvent(@event); }
internal void RegisterAttributeVariableField(FieldInfo info, ConsoleVariableAttribute attr) { m_masterDictionary.TryGetValue(attr.name, out Command comm); if (comm != null) { Debug.LogError("Multiple Attribute Variables with the same name: " + attr.name + " , this is not allowed."); return; } else { FieldCommand cmd = new FieldCommand(attr.name, attr.description, this); cmd.Initialize(info); m_variableDictionary.Add(attr.name, cmd); m_masterDictionary.Add(attr.name, cmd); m_commandsTrie.Add(new TrieEntry <string>(attr.name, attr.name)); } }
private void RaiseEvent(FieldCommand fieldCommand, FieldEvent @event) { SimpleMapper.Map(fieldCommand, @event); if (fieldCommand.ParentFieldId.HasValue) { if (Snapshot.SchemaDef.FieldsById.TryGetValue(fieldCommand.ParentFieldId.Value, out var field)) { @event.ParentFieldId = NamedId.Of(field.Id, field.Name); if (field is IArrayField arrayField && arrayField.FieldsById.TryGetValue(fieldCommand.FieldId, out var nestedField)) { @event.FieldId = NamedId.Of(nestedField.Id, nestedField.Name); } } } else { @event.FieldId = GetFieldId(fieldCommand.FieldId); } RaiseEvent(@event); }