68a0ed3334
* add MixPanel manager like v2 * add mixpanel to send and receive * fix tests * Delete old events * Don't track receive and send operation They are already tracked by UI - we shouldn't track them on low level, they always need to be tracked with UI clicks etc * Pass account from outside * Add email if available * Add mixpanel to GH * Add ui dui3 prop as default * Remove mixpanel object from tests * renames categories * TODO notes for NodeRun later * Add note for account id nullability * Grasshopper specific send and receive info for workspace ids * Auto property * isMultiplayer prop for mixpanel * fix mismatch in account id and user id * Helper function for convertion source app name to slug --------- Co-authored-by: Adam Hathcock <adam@hathcock.uk> Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
28 lines
1020 B
C#
28 lines
1020 B
C#
using System.Reflection;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
using Speckle.Connectors.Common.Analytics;
|
|
using Speckle.Connectors.Common.Cancellation;
|
|
using Speckle.Connectors.Common.Operations;
|
|
using Speckle.Connectors.Common.Operations.Receive;
|
|
using Speckle.Sdk;
|
|
|
|
namespace Speckle.Connectors.Common;
|
|
|
|
public static class ContainerRegistration
|
|
{
|
|
public static void AddConnectors(this IServiceCollection serviceCollection)
|
|
{
|
|
serviceCollection.AddMatchingInterfacesAsTransient(Assembly.GetExecutingAssembly());
|
|
|
|
// send operation and dependencies
|
|
serviceCollection.AddSingleton<ICancellationManager, CancellationManager>();
|
|
serviceCollection.AddScoped<RootObjectUnpacker>();
|
|
serviceCollection.AddScoped<ReceiveOperation>();
|
|
serviceCollection.AddSingleton<IAccountService, AccountService>();
|
|
serviceCollection.AddSingleton<IMixPanelManager, MixPanelManager>();
|
|
|
|
serviceCollection.AddTransient(typeof(ILogger<>), typeof(Logger<>));
|
|
}
|
|
}
|