public Prestamo(DateTime fechaSolicitud, Libro libro, string nombreUsuario) { DateTime?fechaMax = null; if (IsbnSuma(libro.Isbn) > 30) { fechaMax = DatetimeExtensions.SumarDiaslaborales(fechaSolicitud, 15); } this.FechaSolicitud = fechaSolicitud; this.Libro = libro; this.FechaEntregaMaxima = fechaMax; this.NombreUsuario = nombreUsuario; }
//[TestMethod] public void AddressTimestampedConfirmed() { var factory = ServiceProvider.GetRequiredService <IBlockchainServiceFactory>(); var blockchainService = factory.GetService("btctest"); var fundingKey = blockchainService.DerivationStrategy.KeyFromString(FundingKeyWIF); var key = new Key(fundingKey); var address = key.PubKey.GetAddress(Network.TestNet); Console.WriteLine(address.ToString()); var result = blockchainService.GetTimestamp(fundingKey); Assert.IsTrue(result.Confirmations > 0, "No confirmations on: " + address); Console.WriteLine($"Number of confirmations: {result.Confirmations}"); Console.WriteLine($"Address time: {DatetimeExtensions.FromUnixTime(result.Time)}"); }
protected WorkflowView CreateView(WorkflowContainer container) { var type = Type.GetType(container.Type); if (type == null) { return(null); } var view = new WorkflowView { DatabaseID = container.DatabaseID, Title = type.GetDisplayName(), Description = type.GetDescription(), State = container.State, Active = container.Active, Tag = container.Tag, Data = container.Data, NextExecution = DatetimeExtensions.FromUnixTime(container.NextExecution) }; return(view); }