public EngageTracker(string organisationId, string productId, string eventServiceUrl, EngageStorage storage = null, EngageApplication application = null) { _organisationId = organisationId; _productId = productId; _eventUrl = eventServiceUrl; _dispatcher = new Dispatcher(_eventUrl); _storage = storage ?? new EngageStorage(new EssentialsStorageService()); _application = application ?? new EngageApplication(new EssentialsApplicationService()); _eventBuilder = new EngageEventBuilder(_storage, _application); Initialize(); }
public static EngageTracker Build(string organisationId, string productId, string eventUrl, EngageStorage storage = null, EngageApplication application = null) { try { var url = new Uri(eventUrl); } catch (UriFormatException e) { throw new ApplicationException("FATAL: Invalid event url specified", e); } _tracker = new EngageTracker(organisationId, productId, eventUrl, storage, application); return(_tracker); }