c#WebApplication app = null;...builder.Services.AddDataProtection() .SetApplicationName("MyApplication") .AddKeyManagementOptions(options => { var db = ActivatorUtilities.CreateInstance<MyDatabaseService>(app.Services); options.XmlRepository = new MyXMLRepo(db); });...app = builder.Build();...