public async Task LoadAsync(NamedId <DomainId> appId, NamedId <DomainId> schemaId, ContentCommand command, bool optimized) { this.command = command; var(app, schema) = await appProvider.GetAppWithSchemaAsync(appId.Id, schemaId.Id); if (app == null) { throw new DomainObjectNotFoundException(appId.ToString()); } this.app = app; if (schema == null) { throw new DomainObjectNotFoundException(schemaId.ToString()); } this.schema = schema; validationContext = new ValidationContext(appId, schemaId, schema.SchemaDef, command.ContentId).Optimized(optimized); }
protected override void WriteValue(JsonWriter writer, NamedId <string> value, JsonSerializer serializer) { writer.WriteValue(value.ToString()); }