Thanks for putting this together! Really appreciate it. Will see if it does this for default notifications such as new user registrations etc... Will get back to you ASAP
EDIT: Even new users registering dont show.. but strangly they dont even show in the Notifications page? Should they? "On a new user registered to the application." It is written to AbpNotifications
Got it working :) Like I stated in previous comment, answer lies within the migrator project. If anyone wants me to post some sample code let me know and I will do that.
Hey, thanks for the reply
It seems like its still ongoing :/ https://github.com/abpframework/abp/issues/527 With Dependency Injection its now most likely possible for Azure Functions https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection
Do you have any ideas how I could convert my azure function into an ABP Module? Here is my onConfigure so far
`using Microsoft.Azure.Documents.Client; using Microsoft.Azure.Functions.Extensions.DependencyInjection; using Microsoft.Azure.WebJobs.Host.Bindings; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using SynapWare.Configuration; using SynapWare.CosmosDB; using SynapWare.Notifications; using System; using System.Collections.Generic;
[assembly: FunctionsStartup(typeof(SynapWare.AzureFunction.IoT.Startup))] namespace SynapWare.AzureFunction.IoT { public class Startup : FunctionsStartup { private IConfigurationRoot _appConfiguration; private DocumentClient _documentClient;
public override void Configure(IFunctionsHostBuilder builder)
{
var executioncontextoptions = builder.Services.BuildServiceProvider().GetService<IOptions<ExecutionContextOptions>>().Value;
var currentDirectory = executioncontextoptions.AppDirectory;
//_appConfiguration = AppConfigurations.Get(Environment.CurrentDirectory);
_appConfiguration = AppConfigurations.Get(currentDirectory);
var serviceEndpoint = new Uri(_appConfiguration.GetValue<string>("LatestDeviceDataCosmosDb:ServiceEndpoint"), UriKind.Absolute);
var authKey = _appConfiguration.GetValue<string>("LatestDeviceDataCosmosDb:authKey");
var databaseName = _appConfiguration.GetValue<string>("LatestDeviceDataCosmosDb:DatabaseName");
var collectionName = _appConfiguration.GetValue<string>("LatestDeviceDataCosmosDb:CollectionName");
var collectionNames = new List<string>();
collectionNames.Add(collectionName);
var jsonSer = new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
DefaultValueHandling = DefaultValueHandling.Ignore,
ContractResolver = new DefaultContractResolver { NamingStrategy = new CamelCaseNamingStrategy() }
};
_documentClient = new DocumentClient(serviceEndpoint, authKey, jsonSer);
_documentClient.OpenAsync().Wait();
var cosmosDbClientFactory = new CosmosDbClientFactory(databaseName, collectionNames, _documentClient);
cosmosDbClientFactory.EnsureDbSetupAsync().Wait();
builder.Services.AddSingleton<ICosmosDbClientFactory>(cosmosDbClientFactory);
var connectionString = _appConfiguration.GetValue<string>("NotificationHubSettings:FullAccessConnectionString");
var notificationHubPath = _appConfiguration.GetValue<string>("NotificationHubSettings:NotificationHubName");
var notificationHub = new NotificationHubManager(connectionString, notificationHubPath);
builder.Services.AddSingleton<INotificationHubManager>(notificationHub);
//IocManager.RegisterAssemblyByConvention(typeof(Startup).GetAssembly());
//builder.Services.AddSignalR();
//builder.Services.AddHttpClient();
////endpoints.MapHub<AbpCommonHub>("/signalr");
//builder.Services.AddSingleton<INotificationPublisher, NotificationPublisher>();
//builder.Services.AddSingleton<IAppNotifier, AppNotifier>();
}
}
} ` Assuming whatever magic will happen here. I need to register IoCManager manually?
EDIT : Following Migrator project at the moment. Hopefully can sneak it into a using
using (var bootstrapper = AbpBootstrapper.Create<ABCModule>())
Hi,
I managed to get this working - thanks for the assistance.
So sorry for the delayed repsonse.
ABP - 5.13 Automapper - 10
I think I already tried automapper version 10 to fix this - think this is why im on this instead of 9 for ANZ 9.2.0 RC1 (which is what currently on)
Great thanks! This makes sense. Will get going with this ASAP
Hey @ismcagdas
Sadly my Macbook Pro 2015 has decided to no longer turn on :( Busy organising a replacement machine. Will get back to you ASAP.
+1 Also would love an update on this
Sorry, my bad, will get this to you tomorrow. Thanks! Still find it very strange that it works using the emulator but not on a physical device.... hmmm
Perfect thanks :) Just wanted confirmation :)