• Documentation
  • Knowledgebase
Show / Hide Table of Contents
  • ConsoleTestApp
    • AppContext
    • Program
    • TestService
    • UserTestTrigger
  • ConsoleTestApp.Domain
    • IListAsyncTestService
    • ISeedService
    • ITestService
  • ConsoleTestApp.Infrastructure
    • AppContextFactory
  • ConsoleTestApp.Misc
    • AppConfigurationExtensions
    • CountryCodeEnumGenerator
  • ConsoleTestApp.Models
    • IFrontendModel
    • MvcModel
  • ConsoleTestApp.Service
    • AppUserService
    • ListAsyncTestService
    • SeedService
    • TenantConsoleResolver
  • PTS
    • ApplicationConfiguration
    • ArrayHelper
    • AssemblyLoader
    • BooleanResultHelper
    • ByteHelper
    • CharHelper
    • CollectionHelper
    • ConvertibleHelper
    • ConvertibleStructHelper
    • DataLogic
    • DateTimeCollectionHelper
    • DateTimeHelper
    • DateTimeQueryableExtensions
    • DateTimeRangeHelper
    • DateTimeToRangeExtensions
    • DbContextOptionsBuilderServiceHelper
    • DbContextOptionsEntityBindingExtensions
    • DbContextOptionsLoggerExtensions
    • DbContextOptionsServiceHelper
    • DecimalHelper
    • DictionaryHelper
    • EntityAffinityDbContextOptionsExtensions
    • EntityAffinityExtensions
    • EntityEventsDbContextExtensions
    • EntityEventsDbContextOptionsExtensions
    • EntityFrameworkCoreExtensions
    • EntityPropertyTranslationHelper
    • EntityServiceAccessorEventHelper
    • EnumFlagHelper
    • EnumHelper
    • Float64Helper
    • GenericTypeHelper
    • GlobalizationStringExtensions
    • HashSetHelper
    • IConfigurationProvider
    • IncludeContainersDbContextExtenions
    • IncludeQueryable
    • InitializeOnStartAttribute
    • Integer32Helper
    • Integer64Helper
    • ITimeProvider
    • ListHelper
    • ObjectExceptionHelper
    • ObjectHelper
    • RelatedToQueryable
    • RequireQueryable
    • ResultType
    • ServiceCollectionDbServiceExtensions
    • ServiceCollectionDiExtensions
    • ServiceCollectionModuleExtensions
    • ServiceProviderDiExtensions
    • StaticInitializer
    • StreamHelper
    • StreetAddress
    • StringArrayHelper
    • StringHelper
    • StructHelper
    • SystemTime
    • TenancyDbContextOptionsExtensions
    • ThenIncludeQueryable
    • ThenRequireQueryable
    • Time
    • TimeHelper
    • TimeRange
    • TimeSpanHelper
    • TypeCodeHelper
    • TypeHelper
    • UnsignedInteger32Helper
    • UriHelper
    • UtcTimeProvider
  • PTS.BusinessCore.Apex.Common
    • ApexCore
  • PTS.BusinessCore.Apex.Domain
    • IApexCore
  • PTS.BusinessCore.Bravo.Domain
    • IBravoCore
  • PTS.BusinessCore.Colossus.Domain
    • IColossusCore
  • PTS.BusinessCore.Dyno.Domain
    • IDynoCore
  • PTS.BusinessCore.Enigma.Domain
    • IEnigmaCore
  • PTS.Chronometry
    • AvailabilityStatus
    • ITimeRestricted
    • RepeatPeriod
    • RepeatPeriodHelper
    • TimeInterval
    • WeekPart
  • PTS.Collections
    • CollectionConvertor
    • CollectionQueryableExtensions
    • ConcurrentHashSet<T>
    • IPagedList
    • IPagedList<T>
    • MultiDictionary<TKey1, TKey2, TValue>
    • PagedList<T>
    • PartitionedHashSet
    • PartitionedHashSet<Tkey, TValue>
    • PartitionedList<Tkey, TValue>
    • PartitionedList<Tkey1, TKey2, TValue>
  • PTS.Concurrency
    • ExecutionCallContextProvider
    • ILogicalDataContainer
    • LocalDataContainer
    • StaticDictionary<TKey, TValue>
    • WeakReferenceTable<TKey, TValue>
  • PTS.DataStructures
    • Dto
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8, T9>
    • Dto<T1, T2, T3, T4, T5, T6, T7, T8>
    • Dto<T1, T2, T3, T4, T5, T6, T7>
    • Dto<T1, T2, T3, T4, T5, T6>
    • Dto<T1, T2, T3, T4, T5>
    • Dto<T1, T2, T3, T4>
    • Dto<T1, T2, T3>
    • Dto<T1, T2>
    • Dto<T1>
    • IDto
    • IHasPrimaryItem<T1>
    • ILot
    • Lot<TKey, TValue>
    • Pile<TValue>
  • PTS.DependencyInjection
    • IParentServiceProvider
    • ISeedWork
    • ISeedWork<TService>
    • IServiceProviderAccessor
    • IStartupDependency
  • PTS.DependencyInjection.Common
    • ParentServiceProvider
    • ServiceProviderAccessor
  • PTS.Diagnostics
    • LogAction
    • LogCategory
    • NoticeStatus
    • NoticeType
    • NoticeTypeHelper
    • RuntimeLogs
    • SystemMessage
    • SystemMessageList
  • PTS.DomainFramework.Common
    • AggregateRootService<TAggregateRoot, TAggregate>
    • SingleRepositoryService<TEntity>
    • TriggerHandler<TEntity>
    • UnitOfWorkService
  • PTS.DomainFramework.Domain
    • IDomainAggregateRoot
    • IDomainExtension
    • IDomainRoot
    • IRepository
    • IRepository<TEntity>
    • IRepositoryFactory
    • ITriggerHandler
    • ITriggerHandler<TEntity>
    • IUnitOfWork
    • RepositoryAction
    • ServiceCollectionTriggerExtensions
    • TriggerEvent
  • PTS.DomainFramework.Infrastructure
    • IHasDbContext
    • Repository
    • Repository<TEntity>
    • RepositoryFactory
    • UnitOfWork
  • PTS.EntityLayer
    • EntityAction
    • GuidKeyGenerator
  • PTS.EntityLayer.Affinity
    • EntityAffinityProvider
    • EntityAffinityService
    • IEntityAffinityService
  • PTS.EntityLayer.Binding
    • EntityAutoBinder
    • EntityBinder
    • EntityBinding<TEntity>
    • EntityBindingBinder
    • EntityBindingService
    • EntityClassBinder
    • EntityInterfaceBinder
    • IEntityBinder
    • IEntityBinding
    • IEntityBindingService
    • OverrideAttribute
    • SkipAttribute
    • TypeBinder
  • PTS.EntityLayer.Events
    • EntityEvent
    • EntityEventBinder
    • EntityEventCache
    • EntityEventHandler
    • EntityEventHandler<TEntity>
    • EntityEventSender<TValue>
    • EntityEventService
    • IEntityEventSender
    • IEntityEventService
    • PropertyState
    • SkipAttribute
  • PTS.EntityLayer.Extensibility
    • DbContextOptionsServiceCollectionExtension
    • DbContextOptionsServiceCollectionExtensionInfo
    • EntityService
    • EntityServiceCollection
    • EntityServiceScope
    • ExtensibleDbContext
    • IEntityServiceAccessor
    • IEntityServiceAccessor<TEntity>
    • IEntityServiceCollection
    • IEntityServiceProvider
    • IEntityServiceScope
    • IModelBuilderService
    • ModelBuilderService
  • PTS.EntityLayer.Logging
    • ConsoleLogger
    • QueryLoggerProvider
  • PTS.EntityLayer.Tenancy
    • AssignedTenant
    • ITenancyService
    • ITenantResolver
    • ParentScopeTenantResolver
    • TenancyService
    • TenantBinder
    • TenantBinding<TEntity>
  • PTS.Files
    • FileData
    • FileHelper
  • PTS.Globalization
    • CountryCode
    • CountryCodeHelper
    • CountryLocale
    • CountryLocaleProvider
    • CultureInfoHelper
    • CultureInfoProvider
    • CurrencyCode
    • CurrencyCodeHelper
    • DateFormat
    • DateFormatDefinition
    • DateFormatHelper
    • IanaAttribute
    • IbanHelper
    • LanguageCode
    • LanguageCodeHelper
    • LanguageCodeProvider
    • PhoneFormatDefinition
    • PhoneFormatHelper
    • PhoneFormatProvider
    • RegionInfoHelper
    • TimeZoneCode
    • TimeZoneCodeHelper
    • TimeZoneDateTimeHelper
    • TimeZoneTimeHelper
  • PTS.Includers
    • IIncluderExpressionService
    • IncludeOptions
    • Includer
    • Includer<TPrimary, TRigt>
    • Includer<TPrimary>
    • IncluderExpressionStaticProvider
    • IncluderParameters
    • RelatedIncluder<TPrimary, TLeft, TRigt>
    • ThenIncluder<TPrimary, TLeft, TRigt>
  • PTS.Includers.Infrastructure
    • ForeignKeyMap
    • ForeignKeyService
    • IForeignKeyService
    • IncludeExpressionBuilder
    • IncludeExpressionService
  • PTS.Modules._ModuleTemplate.Domain
    • Entity
  • PTS.Modules._ModuleTemplate.Ifrastructure
    • EntityBinding
  • PTS.Modules.Accounts.Domain
    • Account
    • IAccountService
  • PTS.Modules.Albums.Domain
    • IAlbumService
  • PTS.Modules.Classifications.Common
    • ClassificationService
  • PTS.Modules.Classifications.Domain
    • Classification
    • FilterOption
    • IClassificationsService
  • PTS.Modules.Classifications.Infrastructure
    • ClassificationBinding
  • PTS.Modules.Comments.Domain
    • ICommentService
  • PTS.Modules.CommerceComponent
    • CommissionMethod
    • DocumentStatus
    • IAmount
    • ICommerceComponentService
    • IDeclaration
    • IStatement
    • ITaxRecord
    • ITaxSubject
    • ITrader
    • TraderType
    • VatRegistrationType
    • VatSource
    • VatType
  • PTS.Modules.CommerceComponent.Common
    • CommerceComponentService
  • PTS.Modules.Contracts.Domain
    • ContractSignature
    • ContractStatus
    • ContractType
    • IContractService
  • PTS.Modules.DateTimeRangeComponent
    • DateTimeRange
  • PTS.Modules.Devices.Common
    • DeviceService
  • PTS.Modules.Devices.Domain
    • Application
    • Device
    • DeviceApp
    • IApplicationData
    • IDeviceData
    • IDeviceService
    • PlatformType
  • PTS.Modules.Devices.Extensions
    • ApplicationExtensions
    • DeviceExtensions
  • PTS.Modules.Devices.Infrastructure
    • ApplicationBinding
    • DeviceAppBinding
    • DeviceBinding
  • PTS.Modules.DistributionComponent
    • GdsRole
    • IGdsRecord
  • PTS.Modules.Domain
    • IBusinessComponent
    • IBusinessCore
    • IHasModule<TModule>
  • PTS.Modules.DynamicContents.Domain
    • DynamicContent
    • DynamicContentType
    • IDynamicContentService
  • PTS.Modules.DynamicContents.Infrastructure
    • DynamicContentBinding
  • PTS.Modules.DynamicTexts.Common
    • DynamicTextService
  • PTS.Modules.DynamicTexts.Domain
    • DynamicText
    • IDynamicTexts
    • TextType
  • PTS.Modules.DynamicTexts.Infrastructure
    • DynamicTextBinding
  • PTS.Modules.DynamicTexts.Tests.IntegrationTests
    • CultureInfoTests
    • FormattingTests
  • PTS.Modules.EntityTranslationComponent
    • EntityTranslation<TEntity>
    • IEntityPropertyTranslation<TEntity>
    • IEntityTranslationService<TBaseEntity, TTranslation>
    • IPropertyTranslation
    • PropertyTranslation
    • PropertyTranslationCollection
    • PropertyTranslationKey
  • PTS.Modules.EntityTranslationComponent.Common
    • EntityTranslationService<TBaseEntity, TTranslation>
  • PTS.Modules.EntityTranslationComponent.Infrastructure
    • EntityTranslationBinding<TEntity, TTranslation>
  • PTS.Modules.Events.Common
    • EventMemberTriggerService
    • EventTriggerService
  • PTS.Modules.Events.Domain
    • Event
    • EventMember
    • EventMemberStatus
    • EventRole
    • EventState
    • EventTime
    • EventTimeStatus
    • EventTimeType
    • EventType
    • IEventService
    • Privacy
  • PTS.Modules.Events.Infrastructure
    • EventBinding
    • EventMemberBinding
    • EventTimeBinding
  • PTS.Modules.Files.Domain
    • File
    • FileLink
    • FileRecordType
    • FileStatus
  • PTS.Modules.Files.Infrastructure
    • FileBinding
    • FileLinkBinding
  • PTS.Modules.Gds.Domain
    • RequestStatus
    • SyncStatus
    • TypeMeta
  • PTS.Modules.Hostnames.Common
    • HostnameService
  • PTS.Modules.Hostnames.Domain
    • Hostname
    • HostnameStatus
    • IHostnameService
  • PTS.Modules.Hostnames.Infrastructure
    • HostnameBinding
  • PTS.Modules.Hostnames.Tests.IntegrationTests
    • CaseSensitivityTests
  • PTS.Modules.Identities.Common
    • IdentityService
  • PTS.Modules.Identities.Domain
    • Identity
    • IdentityLocale
    • IIdentityService
  • PTS.Modules.Identities.Infrastructure
    • IdentityBinding
    • IdentityLocaleBinding
  • PTS.Modules.IdentitySettingExtension
    • SettingService
  • PTS.Modules.IdentitySettingExtension.Common
    • SettingTriggerService
  • PTS.Modules.IdentitySettingExtension.Domain
    • ISettingService
    • Setting
    • SettingType
  • PTS.Modules.IdentitySettingExtension.Infrastructure
    • SettingBinding
  • PTS.Modules.IdentityTokenExtension.Common
    • TokenService
    • TokenTrigger
  • PTS.Modules.IdentityTokenExtension.Domain
    • ITokenService
    • Token
    • TokenStatus
    • TokenType
    • TokenValueGenerator
  • PTS.Modules.IdentityTokenExtension.Infrastructure
    • TokenEntityBinding
  • PTS.Modules.IdentityTranslationExtension
    • IdentityTranslationService
  • PTS.Modules.IdentityTranslationExtension.Domain
    • IdentityTranslation
    • IIdentityTranslationService
  • PTS.Modules.IdentityTranslationExtension.Infrastructure
    • IdentityTranslationBinding
  • PTS.Modules.Instances.Domain
    • DataServer
    • DataServerLink
    • DataServerLinkType
    • DataServerPlatform
    • DataServerStatus
    • Instance
    • InstanceIdentityLink
    • InstanceLinkType
    • InstanceStatus
    • OnboardingStatus
  • PTS.Modules.Instances.Infrastructure
    • DataServerBinding
    • DataServerLinkBinding
    • InstanceBinding
    • InstanceIdentityLinkBinding
  • PTS.Modules.InternationalComponent
    • ILocale
    • Locale
    • LocalizedText
  • PTS.Modules.Invoices.Common
    • InvoiceService
  • PTS.Modules.Invoices.Domain
    • IInvoiceService
    • Invoice
    • InvoiceBillingInfo
    • InvoiceBillingInfoType
    • InvoiceItem
    • InvoiceStatus
  • PTS.Modules.Invoices.Infrastructure
    • InvoiceBillingInfoBinding
    • InvoiceBinding
    • InvoiceItemBinding
  • PTS.Modules.Invoices.Tests.IntegrationTests
    • InvoiceItemsMoneyCalculationsTests
  • PTS.Modules.Invoices.Tests.UnitTests
    • InvoiceCalculationUnitTests
  • PTS.Modules.LinkComponent
    • DistinctLink<TSource, TTarget, TDiscriminator>
    • IDistinctLink<TSource, TTarget, TDiscriminator>
    • ILink<TSource, TTarget>
    • Link<TSource, TTarget>
    • LinkStatus
    • LinkUpdateModel
  • PTS.Modules.LinkComponent.Infrastructure
    • DistinctLinkBindingHelper<TSource, TTarget, TDiscriminator>
  • PTS.Modules.Logins.Common
    • LoginService
  • PTS.Modules.Logins.Domain
    • ILoginService
    • Login
  • PTS.Modules.Logins.Infrastructure
    • LoginBinding
  • PTS.Modules.Logins.Tests.IntegrationTests
    • UsernameUniquenessTests
  • PTS.Modules.Logins.Tests.UnitTests
    • PasswordHashingUnitTests
  • PTS.Modules.LogPictureAggregate.Domain
    • SystemLogPicture
    • SystemLogPictureType
  • PTS.Modules.LogPictureAggregate.Infrastructure
    • SystemLogPictureBinding
  • PTS.Modules.Logs.Domain
    • FollowUpStatus
    • LogAction
    • LogCategory
    • LogType
    • SystemLog
  • PTS.Modules.Logs.Infrastructure
    • SystemLogBinding
  • PTS.Modules.MerchandiseComponent
    • DeliveryStatus
    • IMerchandiseComponent
    • ItemComposition
    • ItemType
    • RentalStatus
    • SaleStatus
  • PTS.Modules.Messages.Common
    • ConversationMessageTriggerService
    • ConversationTriggerService
  • PTS.Modules.Messages.Domain
    • Conversation
    • ConversationMember
    • ConversationMemberStatus
    • ConversationMessage
    • ConversationStatus
    • MemberStatus
    • MessageStatus
    • MessageType
    • ReadStatus
  • PTS.Modules.Messages.Infrastructure
    • ConversationBinding
    • ConversationMemberBinding
    • ConversationMessageBinding
  • PTS.Modules.Notifications.Common
    • NotificationPayloadTriggerService
    • NotificationProfileLinkTriggerService
    • NotificationService
    • NotificationTriggerService
  • PTS.Modules.Notifications.Domain
    • INotificationService
    • Notification
    • NotificationAttachment
    • NotificationAttachmentType
    • NotificationPayload
    • NotificationPayloadType
    • NotificationProfileLink
    • NotificationProfileLinkType
    • NotificationStatus
    • NotificationTemplate
    • NotificationTemplateGroup
    • NotificationTemplateGroupTiming
    • NotificationTemplateItem
    • NotificationType
    • ReadStatus
  • PTS.Modules.Notifications.Infrastructure
    • NotificationAttachmentBinding
    • NotificationBinding
    • NotificationPayloadBinding
    • NotificationProfileLinkBinding
    • NotificationTemplateBinding
    • NotificationTemplateGroupBinding
    • NotificationTemplateGroupTimingBinding
    • NotificationTemplateItemBinding
  • PTS.Modules.OrderItemEventAggregate.Domain
    • OrderItemEvent
    • OrderItemEventType
  • PTS.Modules.OrderItemEventAggregate.Infrastructure
    • OrderItemEventBinding
  • PTS.Modules.OrderNotificationAggregate.Domain
    • OrderNotification
  • PTS.Modules.OrderNotificationAggregate.Infrastructure
    • OrderNotificationBinding
  • PTS.Modules.Orders.Common
    • OrderService
  • PTS.Modules.Orders.Domain
    • IOrderService
    • MarketingSource
    • Order
    • OrderInvoicingMethod
    • OrderInvoicingStatus
    • OrderItem
    • OrderItemPricing
    • OrderItemStatus
    • OrderItemType
    • OrderStatus
    • OrderType
    • PriceUnitCalculationMethod
  • PTS.Modules.Orders.Infrastructure
    • OrderBinding
    • OrderItemBinding
    • OrderItemPricingBinding
  • PTS.Modules.OrderTransactionAggregate.Common
    • OrderTransactionService
  • PTS.Modules.OrderTransactionAggregate.Domain
    • IOrderTransactionService
    • OrderTransaction
    • OrderTransactionAggregateRoot
  • PTS.Modules.OrderTransactionAggregate.Infrastructure
    • OrderTransactionAggregateRootBinding
    • OrderTransactionBinding
  • PTS.Modules.PaymentComponent
    • PaymentMethod
    • PaymentStatus
    • RefundStatus
  • PTS.Modules.PhysicalAddresses.Domain
    • IHasCoordinates
    • IPhysicalAddress
    • IPlacesService
    • LocationType
    • MailingAddressType
    • PhysicalAddress
  • PTS.Modules.PhysicalAddresses.Infrastructure
    • PhysicalAddressBinding
  • PTS.Modules.Pictures
    • IPictureService
  • PTS.Modules.Pictures.Common
    • PictureService
  • PTS.Modules.Pictures.Domain
    • Picture
  • PTS.Modules.Pictures.Infrastructure
    • PictureBinding
  • PTS.Modules.ProductPriceEventAggregate.Domain
    • ProductPriceEvent
  • PTS.Modules.ProductPriceEventAggregate.Infrastructure
    • ProductPriceEventBinding
  • PTS.Modules.Products.Common
    • ProductService
  • PTS.Modules.Products.Domain
    • IPriceCalculationProvider
    • IPriceModel
    • IProductService
    • PriceChargeType
    • PriceCommission
    • PriceLevel
    • PriceModel
    • PriceOrigin
    • PricePeriod
    • PriceStatus
    • PriceType
    • PriceUnit
    • Product
    • ProductPrice
  • PTS.Modules.Products.Infrastructure
    • ProductBinding
    • ProductPriceBinding
  • PTS.Modules.ProfileAddressAggregate.Common
    • ProfileAddressService
  • PTS.Modules.ProfileAddressAggregate.Domain
    • IProfileAddressService
    • ProfileAddress
  • PTS.Modules.ProfileAddressAggregate.Infrastructure
    • ProfileAddressBinding
  • PTS.Modules.ProfileAliasExtension.Common
    • ProfileAliasService
    • ProfileAliasTrigger
  • PTS.Modules.ProfileAliasExtension.Domain
    • IProfileAliasService
    • ProfileAlias
  • PTS.Modules.ProfileAliasExtension.Infrastructure
    • ProfileAliasBinding
  • PTS.Modules.ProfileClassificationAggregate
    • ProfileClassificationService
  • PTS.Modules.ProfileClassificationAggregate.Domain
    • IProfileClassificationAggregateService
    • ProfileClassification
    • ValueType
  • PTS.Modules.ProfileClassificationAggregate.Infrastructure
    • ProfileClassificationBinding
  • PTS.Modules.ProfilePictureAggregate.Common
    • ProfilePictureService
  • PTS.Modules.ProfilePictureAggregate.Domain
    • IProfilePictureService
    • PictureType
    • ProfilePicture
  • PTS.Modules.ProfilePictureAggregate.Infrastructure
    • ProfilePictureBinding
  • PTS.Modules.ProfilePostClassificationAggregate.Common
    • ProfilePostClassificationService
    • ProfilePostClassificationTrigger
  • PTS.Modules.ProfilePostClassificationAggregate.Domain
    • IProfilePostClassificationService
    • ProfilePostClassification
  • PTS.Modules.ProfilePostClassificationAggregate.Infrastructure
    • ProfilePostClassificationBinding
  • PTS.Modules.ProfilePostExtension.Domain
    • ProfilePost
  • PTS.Modules.ProfilePostExtension.Infrastructure
    • ProfilePostBinding
  • PTS.Modules.Profiles.Common
    • ProfileLinkTriggerService
    • ProfileService
  • PTS.Modules.Profiles.Domain
    • Contact
    • ContactType
    • IProfileService
    • Profile
    • ProfileLink
    • ProfileLinkType
    • ProfileTypeLink
    • ProfileTypeLinkStatus
    • VerificationStatus
  • PTS.Modules.Profiles.Infrastructure
    • ContactBinding
    • ProfileBinding
    • ProfileLinkBinding
    • ProfileTypeLinkBinding
  • PTS.Modules.ProfileSeoExtension
    • ISeoData
  • PTS.Modules.ProfileSeoExtension.Common
    • ProfileSeoService
  • PTS.Modules.ProfileSeoExtension.Domain
    • IProfileSeoService
    • ProfileSeo
    • ProfileSeoExtensions
  • PTS.Modules.ProfileSeoExtension.Infrastructure
    • ProfileSeoBinding
  • PTS.Modules.ResultComponent
    • IResult
    • IValueResult<TValue>
    • Result
    • ResultSet
    • ValueResult<TValue>
  • PTS.Modules.StockItems.Common
    • StockItemTriggerService
  • PTS.Modules.StockItems.Domain
    • ItemProperty
    • MaintenanceStatus
    • ProductionStatus
    • PurchasingStatus
    • RentItemType
    • RepairStatus
    • StockItem
    • StockStatus
    • WearStatus
  • PTS.Modules.StockItems.Infrastructure
    • StockItemBinding
  • PTS.Modules.TenancyComponent
    • InstanceRole
  • PTS.Modules.Tests.Builders
    • IBuilder<T>
  • PTS.Modules.Tests.Builders.Accounts
    • AccountBuilder
    • IAccountBuilder
  • PTS.Modules.Tests.Builders.DynamicTexts
    • DynamicTextBuilder
    • IDynamicTextBuilder
  • PTS.Modules.Tests.Builders.Hostnames
    • HostnameBuilder
    • IHostnameBuilder
  • PTS.Modules.Tests.Infrastructure
    • ConnectionStringProvider
    • TestingDbContext
    • TestingDbContextFactory
    • TestingInMemoryUnitOfWork
    • TestingUnitOfWork
    • TestingUnitOfWorkFactory
  • PTS.Modules.Tests.Infrastructure.Extensions
    • IRepositoryExtensions
  • PTS.Modules.TimeComponent
    • Frequency
  • PTS.Modules.Transactions.Common
    • MoneyAccountActivityTriggerService
    • MoneyAccountTriggerService
    • TransactionService
    • TransactionTriggerService
  • PTS.Modules.Transactions.Domain
    • BalanceType
    • CaptureStatus
    • ITransactionService
    • MoneyAccount
    • MoneyAccountActivity
    • MoneyAccountStatus
    • MoneyAccountType
    • MoneyActivityType
    • PaymentProviderStatus
    • PaymentProviderType
    • RecurringTransaction
    • RecurringTransactionStatus
    • RefundStatus
    • Transaction
    • TransactionCodes
    • TransactionInfo
    • TransactionInfoType
    • TransactionMethod
    • TransactionStatus
    • TransactionType
  • PTS.Modules.Transactions.Infrastructure
    • MoneyAccountActivityBinding
    • MoneyAccountBinding
    • RecurringTransactionBinding
    • TransactionBinding
    • TransactionInfoBinding
  • PTS.Modules.Translations.Common
    • TranslationService
  • PTS.Modules.Translations.Domain
    • ITranslationService
    • TranslatedEntity<TEntity>
    • TranslatedProperty
    • Translation
  • PTS.Modules.Translations.Infrastructure
    • TranslationBinding
  • PTS.Modules.UrlRedirects.Common
    • UrlRedirectTriggerService
  • PTS.Modules.UrlRedirects.Domain
    • UrlRedirect
  • PTS.Modules.UrlRedirects.Infrastructure
    • UrlRedirectBinding
  • PTS.Modules.Users
    • Gender
  • PTS.Modules.Users.Common
    • UserService
    • UserTriggerService
  • PTS.Modules.Users.Domain
    • IUserService
    • User
    • UserStatus
  • PTS.Numbers
    • NumericBaseConvertor
  • PTS.Numbers.UnitTests
    • NumericBaseConvertorTests
  • PTS.Physics
    • MeasurementCultureAttribute
    • MeasurementTypeAttribute
    • PhysicalProperty
    • PhysicalUnit
    • PhysicalUnitCulture
  • PTS.Physics.UnitTests
    • UniqueEnumValuesTest
  • PTS.Randomization
    • Randomizer
    • RandomSequenceComponents
  • PTS.Records
    • IHasGuid
    • IIdRecord
    • IOwnedRecord
    • SequentialGuid
    • State
  • PTS.Reflection
    • CustomAttributeHelper
    • GenericMethodInfoHelper
    • GenericTypeHelper
    • ObjectFactory
    • ReflectionTypeHelper
    • TypeMapper
  • PTS.Spatial
    • Pivot<T>
    • Point2D<T>
    • Point3D<T>
    • SpatialHelper
    • Square<T>
  • PTS.Text
    • PersonalNameHelper
    • RandomWord
    • Slugifier
    • Transliterator
  • PTS.Text.UnitTests
    • PersonalNameHelperTests
    • RandomWordTests
    • SlugifierTests
    • TransliteratorTests
  • PTS.Workers
    • IJob
    • Interval
    • Job
    • JobAsync
    • JobManager
    • JobTiming

DateTimeHelper Class

Namespace: PTS
Assembly: PTSframework.dll

Provides a set of static methods for DateTime type.

Syntax
public static class DateTimeHelper
Inheritance
System.Object
DateTimeHelper

Methods

AddDifference(DateTime, DateTime)

Adds time difference of the two time values to give time.

Declaration
public static DateTime AddDifference(this DateTime time, DateTime otherTime)
Parameters
Type Name Description
System.DateTime time

Time to add the difference to.

System.DateTime otherTime

Time to get the difference for.

Returns
Type Description
System.DateTime

DateTime object whose value is the sum of the date and time represented by this instance and difference from the other date and time value.

AddTime(DateTime, Time)

Adds time to instant in time represented as DateTime.

Declaration
public static DateTime AddTime(this DateTime date, Time time)
Parameters
Type Name Description
System.DateTime date

Date to add time to.

Time time

Time that will be added to date.

Returns
Type Description
System.DateTime

DateTime object whose value is the sum of the date and time represented by this instance and the duration of specified time.

AddTime(Nullable<DateTime>, Nullable<Time>)

Adds time to point in time represented as nullable DateTime.

Declaration
public static DateTime AddTime(this DateTime? date, Time? time)
Parameters
Type Name Description
System.Nullable<System.DateTime> date

Date to add time to.

System.Nullable<Time> time

Time that will be added to date.

Returns
Type Description
System.DateTime

DateTime object whose value is the sum of the date and time represented by this instance and the duration of specified time.

AddWeeks(DateTime, Int32)

Gets a new DateTime with specified number of weeks added to given instant in time.

Declaration
public static DateTime AddWeeks(this DateTime time, int weeks)
Parameters
Type Name Description
System.DateTime time

An instant of time to add the weeks to.

System.Int32 weeks

A number of whole weeks. The value parameter can be negative or positive.

Returns
Type Description
System.DateTime

DaysSinceJesus(DateTime)

Gets number of whole days since zero year.

Declaration
public static int DaysSinceJesus(this DateTime date)
Parameters
Type Name Description
System.DateTime date

An instant of time to be represented as number of days since zero year.

Returns
Type Description
System.Int32

Number of days since zero year.

EndOfDay(DateTime)

Gets a new DateTime representing instant at the last second of the day component in given DateTime.

Declaration
public static DateTime EndOfDay(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the last second of the day for.

Returns
Type Description
System.DateTime

Instant at the last second of given day.

EndOfDay(Nullable<DateTime>)

Gets a new DateTime representing instant at the last second of the day component in given nullable DateTime.

Declaration
public static DateTime? EndOfDay(this DateTime? dateTime)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

Instant at the last second of given day if the original value was not null, otherwise null.

Returns
Type Description
System.Nullable<System.DateTime>

Instant at the last second of given day.

EndOfHour(DateTime)

Gets a new DateTime representing instant at the last second of hour component in given DateTime.

Declaration
public static DateTime EndOfHour(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the last second of an hour for.

Returns
Type Description
System.DateTime

Instant at the last second of given hour.

EndOfMonth(DateTime)

Gets a new DateTime representing instant at the last second of month component in given DateTime.

Declaration
public static DateTime EndOfMonth(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the last second of a month for.

Returns
Type Description
System.DateTime

Instant at the last second of given month.

EndOfWeek(DateTime, Boolean)

Gets a new DateTime representing instant at the last second of a week represented in given DateTime.

Declaration
public static DateTime EndOfWeek(this DateTime dateTime, bool weekStartsOnMonday = false)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the last second of a week for.

System.Boolean weekStartsOnMonday

Indicates whether week starts on Monday. If false, then week is assumed to start on Sunday.

Returns
Type Description
System.DateTime

Instant at the last second of given week.

EndOfWeek(Nullable<DateTime>, Boolean)

Gets a new DateTime representing instant at the last second of a week represented in given nullable DateTime.

Declaration
public static DateTime? EndOfWeek(this DateTime? dateTime, bool weekStartsOnMonday = false)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

An instant of time to get the last second of a week for.

System.Boolean weekStartsOnMonday

Indicates whether week starts on Monday. If false, then week is assumed to start on Sunday.

Returns
Type Description
System.Nullable<System.DateTime>

Instant at the last second of given week.

EndOfYear(DateTime)

Gets a new DateTime representing instant at the last second of year component in given DateTime.

Declaration
public static DateTime EndOfYear(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the last second of a year for.

Returns
Type Description
System.DateTime

Instant at the last second of given year.

FromUnixTime(Int64, Boolean)

Converts seconds or milliseconds since epoch to date and time represented as DateTime value.

Declaration
public static DateTime FromUnixTime(long timestamp, bool milliseconds = false)
Parameters
Type Name Description
System.Int64 timestamp

A unix timestamp to convert to DateTime value.

System.Boolean milliseconds

If set to true then the input value represents millisconds, otherwise seconds.

Returns
Type Description
System.DateTime

An instant represented as DateTime value equivalent to given unix timestamp.

IsBetween(DateTime, DateTime, DateTime, Boolean)

Checks whether the value of given DateTime is between start and end values.

Declaration
public static bool IsBetween(this DateTime dateTime, DateTime start, DateTime end, bool inclusiveStart = true)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to check the range for.

System.DateTime start

An instant in time the value must be greater than.

System.DateTime end

An instant in time the value must be lesser than.

System.Boolean inclusiveStart

If true the DateTime value can be equal to start value.

Returns
Type Description
System.Boolean

If the DateTime value is greater then the start value and lesser than end valuse then true, otherwise false.

IsBetweenHours(DateTime, Int32, Int32, Boolean)

Checks whether the hour component of DateTime value is between start and end hours.

Declaration
public static bool IsBetweenHours(this DateTime dateTime, int startHour, int endHour, bool inclusiveStart = true)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to check the hour range for.

System.Int32 startHour

Starting hour the DateTime hour component must superceed.

System.Int32 endHour

Ending hour the DateTime hour component must not exceed.

System.Boolean inclusiveStart

If true then starting hour can be equal to DateTime hour component.

Returns
Type Description
System.Boolean

If DateTime hour component is between the start and end hour then true, otherwise false.

IsEndOfDay(DateTime)

Checks whether the value represents the end of day on given date.

Declaration
public static bool IsEndOfDay(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to check if it represants the end of day.

Returns
Type Description
System.Boolean

If the value represents the last second of given day then true; otherwise false.

IsInThePast(DateTime)

Checks whether given DateTime value is in the past.

Declaration
public static bool IsInThePast(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to determine whether it is in the past or not.

Returns
Type Description
System.Boolean

If the value is in the past then true, otherwise false.

Remarks

The method performs simple evaluation dateTime < SystemTime.Now

IsSameDay(DateTime, DateTime)

Checks whether two DateTime values represent the same day.

Declaration
public static bool IsSameDay(this DateTime dateTime, DateTime otherDate)
Parameters
Type Name Description
System.DateTime dateTime

Value to determine the outcome for.

System.DateTime otherDate

Other value used for comparison.

Returns
Type Description
System.Boolean

If both values represent the same day then true, otherwise false.

Remarks

The method checks for absolute day match inclusive of year and month components.

IsSameHour(DateTime, DateTime)

Checks whether two DateTime values represent the same hour.

Declaration
public static bool IsSameHour(this DateTime dateTime, DateTime otherDate)
Parameters
Type Name Description
System.DateTime dateTime

Value to determine the outcome for.

System.DateTime otherDate

Other value used for comparison.

Returns
Type Description
System.Boolean

If both values represent the same hour then true, otherwise false.

Remarks

The method checks for absolute hour match inclusive of year, month and day components.

IsSameMonth(DateTime, DateTime)

Checks whether two DateTime values represent the same month.

Declaration
public static bool IsSameMonth(this DateTime dateTime, DateTime otherDate)
Parameters
Type Name Description
System.DateTime dateTime

Value to determine the outcome for.

System.DateTime otherDate

Other value used for comparison.

Returns
Type Description
System.Boolean

If both values represent the same month then true, otherwise false.

Remarks

The method checks for absolute month match inclusive of year component.

IsSameWeek(DateTime, DateTime)

Checks whether two DateTime values represent the same week.

Declaration
public static bool IsSameWeek(this DateTime dateTime, DateTime otherDate)
Parameters
Type Name Description
System.DateTime dateTime

Value to determine the outcome for.

System.DateTime otherDate

Other value used for comparison.

Returns
Type Description
System.Boolean

If both values represent the same week then true, otherwise false.

Remarks

The method checks for absolute week number match inclusive of the year component.

IsStartOfDay(DateTime)

Checks whether an instant in time represents the start of a day.

Declaration
public static bool IsStartOfDay(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to check if it represants the start of a day.

Returns
Type Description
System.Boolean

If value represents the first second of given day then true; otherwise false.

IsZeroDate(DateTime)

Checks whether an instant in time represents the zero date.

Declaration
public static bool IsZeroDate(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to check if it represants zero date.

Returns
Type Description
System.Boolean

If value represents the zero date then true; otherwise false.

IsZeroDateOrNull(Nullable<DateTime>)

Checks whether a nullable instant in time is either null or represents the zero date.

Declaration
public static bool IsZeroDateOrNull(this DateTime? dateTime)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

abstractnullable instant of time to check if it is null or represants zero date.

Returns
Type Description
System.Boolean

If value is null or represents the zero date then true; otherwise false.

RoundDown(DateTime, TimeSpan)

Rounds the instant of time to the nearest lesser unit of time represented as TimeSpan.

Declaration
public static DateTime RoundDown(this DateTime dateTime, TimeSpan roundTo)
Parameters
Type Name Description
System.DateTime dateTime

The instant of time to round.

System.TimeSpan roundTo

Unit of time for rounding.

Returns
Type Description
System.DateTime

An instant in time rounded down to nearest lower unit of time.

RoundToNearest(DateTime, TimeSpan)

Rounds the instant of time to the nearest lesser or greater unit of time represented as TimeSpan.

Declaration
public static DateTime RoundToNearest(this DateTime dateTime, TimeSpan roundTo)
Parameters
Type Name Description
System.DateTime dateTime

The instant of time to round.

System.TimeSpan roundTo

Unit of time for rounding.

Returns
Type Description
System.DateTime

An instant in time rounded to nearest lesser or greater unit of time.

RoundUp(DateTime, TimeSpan)

Rounds up.

Declaration
public static DateTime RoundUp(this DateTime dateTime, TimeSpan roundTo)
Parameters
Type Name Description
System.DateTime dateTime

The date time.

System.TimeSpan roundTo

The round to. Fx. TimeSpan.FromMinutes(15).

Returns
Type Description
System.DateTime

SetTime(DateTime, Time)

Sets the hour, minute and second components from Time value.

Declaration
public static DateTime SetTime(this DateTime dateTime, Time time)
Parameters
Type Name Description
System.DateTime dateTime

Value to set the hour, minute and second for.

Time time

Time value to get the time components from.

Returns
Type Description
System.DateTime

A new instant in time with hour, minute and second components assigned from Time value.

SetTime(DateTime, DateTime)

Sets the hour, minute and second components from other DateTime value.

Declaration
public static DateTime SetTime(this DateTime dateTime, DateTime otherDateTime)
Parameters
Type Name Description
System.DateTime dateTime

Value to set the hour, minute and second for.

System.DateTime otherDateTime

Other value to get the time components from.

Returns
Type Description
System.DateTime

A new instant in time with hour, minute and second components assigned from other value.

SetTime(Nullable<DateTime>, Nullable<DateTime>)

Sets the hour, minute and second components from other nullable DateTime value.

Declaration
public static DateTime? SetTime(this DateTime? dateTime, DateTime? otherDateTime)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

Nullable value to set the hour, minute and second for.

System.Nullable<System.DateTime> otherDateTime

Other nullable value to get the time components from.

Returns
Type Description
System.Nullable<System.DateTime>

A new instant in time with hour, minute and second components assigned from other value.

StartOfDay(DateTime)

Gets an instant in time for the first millisecond of a day.

Declaration
public static DateTime StartOfDay(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the first millisecond of a day for.

Returns
Type Description
System.DateTime

Instant in time for the first millisecond of a day.

StartOfDay(Nullable<DateTime>)

Gets an instant in time for the first millisecond of a day.

Declaration
public static DateTime? StartOfDay(this DateTime? dateTime)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

A nullable instant of time to get the first millisecond of a day for.

Returns
Type Description
System.Nullable<System.DateTime>

If given value is not null then instant in time for the first millisecond of a day, otherwise null.

StartOfHour(DateTime)

Gets an instant in time for the first millisecond of an hour.

Declaration
public static DateTime StartOfHour(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the first millisecond of an hour for.

Returns
Type Description
System.DateTime

Instant in time for the first millisecond of an hour.

StartOfHour(Nullable<DateTime>)

Gets an instant in time for the first millisecond of an hour.

Declaration
public static DateTime? StartOfHour(this DateTime? dateTime)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

A nullable instant of time to get the first millisecond of an hour for.

Returns
Type Description
System.Nullable<System.DateTime>

If given value is not null then instant in time for the first millisecond of an hour, otherwise null.

StartOfMinute(DateTime)

Gets an instant in time for the first millisecond of a minute.

Declaration
public static DateTime StartOfMinute(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the first millisecond of a minute for.

Returns
Type Description
System.DateTime

Instant in time for the first millisecond of a minute.

StartOfMinute(Nullable<DateTime>)

Gets an instant in time for the first millisecond of a minute.

Declaration
public static DateTime? StartOfMinute(this DateTime? dateTime)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

A nullable instant of time to get the first millisecond of a minute for.

Returns
Type Description
System.Nullable<System.DateTime>

If given value is not null then instant in time for the first millisecond of a minute, otherwise null.

StartOfMonth(DateTime)

Gets an instant in time for the first millisecond of a month.

Declaration
public static DateTime StartOfMonth(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the first millisecond of a month for.

Returns
Type Description
System.DateTime

Instant in time for the first millisecond of a month.

StartOfMonth(Nullable<DateTime>)

Gets an instant in time for the first millisecond of a month.

Declaration
public static DateTime? StartOfMonth(this DateTime? dateTime)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

A nullable instant of time to get the first millisecond of a month for.

Returns
Type Description
System.Nullable<System.DateTime>

If given value is not null then instant in time for the first millisecond of a month, otherwise null.

StartOfSecond(DateTime)

Gets an instant in time for the first millisecond of a second.

Declaration
public static DateTime StartOfSecond(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the first millisecond of a second for.

Returns
Type Description
System.DateTime

Instant in time for the first millisecond of a second.

StartOfSecond(Nullable<DateTime>)

Gets an instant in time for the first millisecond of a second.

Declaration
public static DateTime? StartOfSecond(this DateTime? dateTime)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

A nullable instant of time to get the first millisecond of a second for.

Returns
Type Description
System.Nullable<System.DateTime>

If given value is not null then instant in time for the first millisecond of a second, otherwise null.

StartOfWeek(DateTime, Boolean)

Gets an instant in time for the first millisecond of a week.

Declaration
public static DateTime StartOfWeek(this DateTime dateTime, bool weekStartsOnMonday = false)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the first millisecond of a week for.

System.Boolean weekStartsOnMonday
Returns
Type Description
System.DateTime

Instant in time for the first millisecond of a week.

StartOfWeek(Nullable<DateTime>, Boolean)

Gets an instant in time for the first millisecond of a week.

Declaration
public static DateTime? StartOfWeek(this DateTime? dateTime, bool weekStartsOnMonday = false)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

A nullable instant of time to get the first millisecond of a week for.

System.Boolean weekStartsOnMonday
Returns
Type Description
System.Nullable<System.DateTime>

If given value is not null then instant in time for the first millisecond of a week, otherwise null.

StartOfYear(DateTime)

Gets an instant in time for the first millisecond of a year.

Declaration
public static DateTime StartOfYear(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the first millisecond of a year for.

Returns
Type Description
System.DateTime

Instant in time for the first millisecond of a year.

StartOfYear(Nullable<DateTime>)

Gets an instant in time for the first millisecond of a year.

Declaration
public static DateTime? StartOfYear(this DateTime? dateTime)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

A nullable instant of time to get the first millisecond of a year for.

Returns
Type Description
System.Nullable<System.DateTime>

If given value is not null then instant in time for the first millisecond of a year, otherwise null.

SubtractDays(DateTime, Int32)

Returns a new DateTime that subtracts the specified number of days from the value of this instance.

Declaration
public static DateTime SubtractDays(this DateTime dateTime, int days)
Parameters
Type Name Description
System.DateTime dateTime

A date and time value to subtract from.

System.Int32 days

Number of days to subtract.

Returns
Type Description
System.DateTime

An instant in time whose value is the remainder of the days subtracted from a date and time.

SubtractHours(DateTime, Int32)

Returns a new DateTime that subtracts the specified number of hours from the value of this instance.

Declaration
public static DateTime SubtractHours(this DateTime dateTime, int hours)
Parameters
Type Name Description
System.DateTime dateTime

A date and time value to subtract from.

System.Int32 hours

Number of hours to subtract.

Returns
Type Description
System.DateTime

An instant in time whose value is the remainder of the hours subtracted from a date and time.

SubtractMinutes(DateTime, Int32)

Returns a new DateTime that subtracts the specified number of minutes from the value of this instance.

Declaration
public static DateTime SubtractMinutes(this DateTime dateTime, int minutes)
Parameters
Type Name Description
System.DateTime dateTime

A date and time value to subtract from.

System.Int32 minutes

Number of minutes to subtract.

Returns
Type Description
System.DateTime

An instant in time whose value is the remainder of the minutes subtracted from a date and time.

SubtractMonths(DateTime, Int32)

Returns a new DateTime that subtracts the specified number of months from the value of this instance.

Declaration
public static DateTime SubtractMonths(this DateTime dateTime, int months)
Parameters
Type Name Description
System.DateTime dateTime

A date and time value to subtract from.

System.Int32 months

Number of months to subtract.

Returns
Type Description
System.DateTime

An instant in time whose value is the remainder of the months subtracted from a date and time.

SubtractSeconds(DateTime, Int32)

Returns a new DateTime that subtracts the specified number of seconds from the value of this instance.

Declaration
public static DateTime SubtractSeconds(this DateTime dateTime, int seconds)
Parameters
Type Name Description
System.DateTime dateTime

A date and time value to subtract from.

System.Int32 seconds

Number of seconds to subtract.

Returns
Type Description
System.DateTime

An instant in time whose value is the remainder of the seconds subtracted from a date and time.

SubtractTime(DateTime, Time)

Returns a new DateTime that subtracts the specified Time from the value of this instance.

Declaration
public static DateTime SubtractTime(this DateTime dateTime, Time time)
Parameters
Type Name Description
System.DateTime dateTime

A date and time value to subtract from.

Time time

A time value to subtract.

Returns
Type Description
System.DateTime

An instant in time whose value is the remainder of the Time subtracted from a date and time.

SubtractTime(Nullable<DateTime>, Time)

Returns a new nullable DateTime that subtracts the specified Time from the value of this instance.

Declaration
public static DateTime? SubtractTime(this DateTime? dateTime, Time time)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

A nullable date and time value to subtract from.

Time time

A time value to subtract.

Returns
Type Description
System.Nullable<System.DateTime>

An instant in time whose value is the remainder of the Time subtracted from a date and time if given value was not null, otherwise null.

SubtractYears(DateTime, Int32)

Returns a new DateTime that subtracts the specified number of years from the value of this instance.

Declaration
public static DateTime SubtractYears(this DateTime dateTime, int years)
Parameters
Type Name Description
System.DateTime dateTime

A date and time value to subtract from.

System.Int32 years

Number of years to subtract.

Returns
Type Description
System.DateTime

An instant in time whose value is the remainder of the years subtracted from a date and time.

ToHourString(DateTime)

Gets the hour component of a DateTime value represented as fixed width string.

Declaration
public static string ToHourString(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

A date and time value to get the hour component as string for.

Returns
Type Description
System.String

A fixed width string representing an hour component of give date and time.

ToIsoDateTime(DateTime)

Gets the date and time represented as iso date and time string.

Declaration
public static string ToIsoDateTime(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

A date and time to get the iso string for.

Returns
Type Description
System.String

A string representing the full date and time value in iso format.

Remarks

The iso format is suitable for API implementations.

ToMinuteString(DateTime)

Gets the minute component of a DateTime value represented as fixed width string.

Declaration
public static string ToMinuteString(this DateTime date)
Parameters
Type Name Description
System.DateTime date
Returns
Type Description
System.String

A fixed width string representing an minute component of give date and time.

ToNextInterval(DateTime, Int32)

Gets an instant in time of the next midnight based interval in milliseconds.

Declaration
public static DateTime ToNextInterval(this DateTime dateTime, int ms)
Parameters
Type Name Description
System.DateTime dateTime

An instant of time to get the next interval instant of time for.

System.Int32 ms

Time interval size in milliseconds.

Returns
Type Description
System.DateTime

An instant in time for the start of the next time interval.

ToSecondString(DateTime)

Gets the second component of a DateTime value represented as fixed width string.

Declaration
public static string ToSecondString(this DateTime date)
Parameters
Type Name Description
System.DateTime date
Returns
Type Description
System.String

A fixed width string representing an second component of give date and time.

ToTime(DateTime)

Gets an hour, minute and second components as Time value.

Declaration
public static Time ToTime(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

A date and time to get the Time from.

Returns
Type Description
Time

A new Time value with the components set from given date and time.

ToTime(Nullable<DateTime>)

Gets an hour, minute and second components as Time value.

Declaration
public static Time? ToTime(this DateTime? dateTime)
Parameters
Type Name Description
System.Nullable<System.DateTime> dateTime

A nullable date and time to get the Time from.

Returns
Type Description
System.Nullable<Time>

A new Time value with the components set from date and time if given value was not null, otherwise null.

ToUnixTime(DateTime, Boolean)

Gets the date and time represented as number of seconds or milliseconds since epoch.

Declaration
public static ulong ToUnixTime(this DateTime dateTime, bool asMilliseconds = false)
Parameters
Type Name Description
System.DateTime dateTime

A date and time value to convert to unix timestamp.

System.Boolean asMilliseconds

If set to true then the returned value represents millisconds, otherwise seconds.

Returns
Type Description
System.UInt64

Number of seconds or milliseconds since epoch.

ToWeekNumber(DateTime)

Gets week number for given instant in time.

Declaration
public static int ToWeekNumber(this DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

The instant in time to get the week number for.

Returns
Type Description
System.Int32

Week number for given instant in time.

Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Back to top Copyright © 2019 PTS Holding LLC