void LiveVideoClick(ChannelLinkEventArgs evarg) { ReleaseViewModels(RegionNames.reg_property); ContentColumn column = new ContentColumn(); ShowView(column, "LiveVideoClick", RegionNames.reg_property); column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.liveVideo); var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column); StreamInfoHelper strinfo = new StreamInfoHelper(); strinfo.streamInfo = () => { return(Apm.Iterate(LoadStreamInfoNVT(evarg, strinfo))); }; ctx.RegisterInstance <IStreamInfoHelper>(strinfo); Ctxdisp = ctx; ctx.RegisterInstance <IVideoInfo>(evarg.videoInfo); string videoSourceToken = evarg.token; string profToken = evarg.profile.token; UIdisp = LiveVideoActivity .Run(ctx, profToken, videoSourceToken) .Subscribe(x => { eventAggregator.GetEvent <VideoChangedEvent>().Publish(evarg); }, err => { dbg.Error(err); }); }
public static FSharpAsync <AnalyticsArgs> Load(INvtSession nvtSession, OdmSession odmSession, Capabilities capabilities) { AnalyticsArgs args = new AnalyticsArgs(); args.odmSession = odmSession; args.capabilities = capabilities; args.nvtSession = nvtSession; return(Apm.Iterate(LoadImpl(args)).Select(f => { return args; })); }
public static FSharpAsync <DeviceViewArgs> Load(DeviceDescriptionHolder devHolder, NvtSessionFactory sessionFactory) { DeviceViewArgs args = new DeviceViewArgs(); args.deviceIconUri = devHolder.DeviceIconUri; args.deviceModel = devHolder.DeviceModel; args.manufacturer = devHolder.Manufacturer; return(Apm.Iterate(LoadImpl(devHolder, sessionFactory, args)).Select(f => { return args; })); }
public CloudController(IOptionsSnapshot <AppConfig> appConfig, ILogger <CloudController> logger, IDbConnection db, IIdentityProvider identityProvider, IEnumerable <IJob> jobs, Apm apm, ICloudHandler cloudHandler) : base(appConfig, logger, db) { _identityProvider = identityProvider; _apm = apm; _backgroundCloudEngagementsJob = jobs.FirstOrDefault(x => x.GetType() == typeof(FetchCloudEngagementsJob)) as FetchCloudEngagementsJob; _cloudHandler = cloudHandler; }
public void IsSerializable() { // Instantiate new APM var localApm = new Apm(); // Get the details we need var details = localApm.GetAllDetails(); // Here's what matters, can we serialize it? // Printed out too, so we can visually inspect output. Console.WriteLine(JsonConvert.SerializeObject(details, Formatting.Indented)); }
public CloudHandler(ILogger <CloudHandler> logger, IDbConnection dbConnection, IIdentityProvider identityProvider, IOutgoingIPResolver ipResolver, Apm apm, IRestClient restClient, IMemoryCache cache, ICryptoService cryptoService) { _logger = logger; _db = dbConnection; _identityProvider = identityProvider; _ipResolver = ipResolver; _apm = apm; _restClient = restClient; _cache = cache; _cryptoService = cryptoService; }
public void Should_Retrieve_Apm_Result() { RetrieveApmRequest request = new RetrieveApmRequest(); request.Locale = Locale.TR.ToString(); request.ConversationId = "123456789"; request.PaymentId = "1"; Apm retrieve = Apm.Retrieve(request, options); PrintResponse <Apm>(retrieve); Assert.AreEqual(Status.SUCCESS.ToString(), retrieve.Status); Assert.AreEqual(Locale.TR.ToString(), retrieve.Locale); Assert.AreEqual("123456789", retrieve.ConversationId); }
public FSharpAsync <Unit> Run() { return(Apm.Create <Unit>((success, error) => { var disp = new SingleAssignmentDisposable(); Action <Action> CompleteWith = cont => { cont(); disp.Dispose(); }; var model = new InfoViewModel(message); model.close = () => { success(null); }; var view = new InfoView(model); disp.Disposable = presenter.ShowView(view); return disp; })); }
public static FSharpAsync <EngineViewArgs> Load(AnalyticsEngine engine, Capabilities capabilities, INvtSession nvtSession, OdmSession odmsession, string ctrl = null) { EngineViewArgs args = new EngineViewArgs(); args.nvtSession = nvtSession; args.odmSession = odmsession; args.capabilities = capabilities; args.engine = engine; args.selectedEngineControlToken = ctrl; return(Apm.Iterate(LoadImpl(args)).Select(f => { return args; })); }
public static FSharpAsync <SourceViewArgs> Load(ChannelDescription channelDescr, Capabilities capabilities, INvtSession nvtSession, OdmSession odmsession, string prof = null) { SourceViewArgs args = new SourceViewArgs(); args.nvtSession = nvtSession; args.odmSession = odmsession; args.capabilities = capabilities; args.channelDescr = channelDescr; args.selectedProfileToken = prof; return(Apm.Iterate(LoadImpl(args)).Select(f => { return args; })); }
public async Task Should_Retrieve_Apm_Result() { RetrieveApmRequest request = new RetrieveApmRequest { Locale = Locale.TR.ToString(), ConversationId = "123456789", PaymentId = "1" }; Apm retrieve = await Apm.RetrieveAsync(request, Options); PrintResponse(retrieve); Assert.AreEqual(Status.SUCCESS.ToString(), retrieve.Status); Assert.AreEqual(Locale.TR.ToString(), retrieve.Locale); Assert.AreEqual("123456789", retrieve.ConversationId); }
void NVAAnalyticsClick(NVALinkEventArgs evarg) { ReleaseViewModels(RegionNames.reg_property); ContentColumn column = new ContentColumn(); ShowView(column, "AnalyticsClick", RegionNames.reg_property); column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.analytics); var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column); //TODO: Stub fix for #225 Remove this with plugin functionality ILastChangedModule lmodule = new LastChangedModule(); ctx.RegisterInstance <ILastChangedModule>(lmodule); // StreamInfoHelper strinfo = new StreamInfoHelper(); strinfo.streamInfo = () => { return(Apm.Iterate(LoadStreamInfoNVA(evarg, strinfo))); }; ctx.RegisterInstance <IStreamInfoHelper>(strinfo); Ctxdisp = ctx; //ctx.RegisterInstance<IVideoInfo>(evarg.videoInfo); ctx.RegisterInstance <odm.ui.activities.AnalyticsView.AnalyticType>(odm.ui.activities.AnalyticsView.AnalyticType.ALL); //evarg.controlToken string token = null; if (evarg.control != null) { token = evarg.control.engineConfigToken; } UIdisp = AnalyticsActivity .Run(ctx, token) //evarg.profileToken) .Subscribe(x => { //TODO: handle return from activity }, err => { dbg.Error(err); }); }
void NVAMetadataClick(NVALinkEventArgs evarg) { ReleaseViewModels(RegionNames.reg_property); ContentColumn column = new ContentColumn(); ShowView(column, "MetadataClick", RegionNames.reg_property); column.CreateBinding(ContentColumn.TitleProperty, LinkButtonsStrings.instance, x => x.nvaMetadata); var ctx = CreateActivityContext(RegionNames.reg_property, evarg.session, column); StreamInfoHelper strinfo = new StreamInfoHelper(); strinfo.streamInfo = () => { return(Apm.Iterate(LoadStreamInfoNVA(evarg, strinfo))); }; ctx.RegisterInstance <IStreamInfoHelper>(strinfo); Ctxdisp = ctx; StreamSetup ssetup = new StreamSetup() { transport = new Transport() { protocol = AppDefaults.visualSettings.Transport_Type } }; //EngineControlsView.Start(new EngineControlsView.Model(null, null), container, column); UIdisp = NvaMetadataSettingsActivity .Run(ctx, evarg.control.token, evarg.control.engineConfigToken, ssetup) .ObserveOnCurrentDispatcher() .Subscribe(x => { }, err => { dbg.Error(err); }); }
public async Task Should_Initialize_Apm_Payment() { CreateApmInitializeRequest request = new CreateApmInitializeRequest { Locale = Locale.TR.ToString(), ConversationId = "123456789", Price = "1", PaidPrice = "1.2", Currency = Currency.EUR.ToString(), CountryCode = "DE", PaymentChannel = PaymentChannel.WEB.ToString(), PaymentGroup = PaymentGroup.PRODUCT.ToString(), AccountHolderName = "success", MerchantCallbackUrl = "https://www.merchant.com/callback", MerchantErrorUrl = "https://www.merchant.com/error", MerchantNotificationUrl = "https://www.merchant.com/notification", ApmType = ApmType.SOFORT.ToString() }; Buyer buyer = new Buyer { Id = "BY789", Name = "John", Surname = "Doe", GsmNumber = "+905350000000", Email = "*****@*****.**", IdentityNumber = "74300864791", LastLoginDate = "2015-10-05 12:43:35", RegistrationDate = "2013-04-21 15:12:09", RegistrationAddress = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1", Ip = "85.34.78.112", City = "Istanbul", Country = "Turkey", ZipCode = "34732" }; request.Buyer = buyer; Address shippingAddress = new Address { ContactName = "Jane Doe", City = "Istanbul", Country = "Turkey", Description = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1", ZipCode = "34742" }; request.ShippingAddress = shippingAddress; Address billingAddress = new Address { ContactName = "Jane Doe", City = "Istanbul", Country = "Turkey", Description = "Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1", ZipCode = "34742" }; request.BillingAddress = billingAddress; List <BasketItem> basketItems = new List <BasketItem>(); BasketItem firstBasketItem = new BasketItem { Id = "BI101", Name = "Binocular", Category1 = "Collectibles", Category2 = "Accessories", ItemType = BasketItemType.PHYSICAL.ToString(), Price = "0.3" }; basketItems.Add(firstBasketItem); BasketItem secondBasketItem = new BasketItem { Id = "BI102", Name = "Game code", Category1 = "Game", Category2 = "Online Game Items", ItemType = BasketItemType.VIRTUAL.ToString(), Price = "0.5" }; basketItems.Add(secondBasketItem); BasketItem thirdBasketItem = new BasketItem { Id = "BI103", Name = "Usb", Category1 = "Electronics", Category2 = "Usb / Cable", ItemType = BasketItemType.PHYSICAL.ToString(), Price = "0.2" }; basketItems.Add(thirdBasketItem); request.BasketItems = basketItems; var apmInitialize = await Apm.CreateAsync(request, Options); PrintResponse(apmInitialize); Assert.AreEqual(Status.SUCCESS.ToString(), apmInitialize.Status); Assert.AreEqual(Locale.TR.ToString(), apmInitialize.Locale); Assert.AreEqual("123456789", apmInitialize.ConversationId); Assert.IsNotNull(apmInitialize.SystemTime); Assert.IsNull(apmInitialize.ErrorCode); Assert.IsNull(apmInitialize.ErrorMessage); Assert.IsNull(apmInitialize.ErrorGroup); }
public static FSharpAsync <Unit> Show(IUnityContainer container, string text) { return(Apm.Defer(() => { return new InfoActivity(container, text).Run(); }, new DispatcherScheduler(Application.Current.Dispatcher))); }