Exemple #1
0
        public BaseProvider(IDateStrategy strategy,
                            InternalTimeStampProvider customTimeStampProvider = null,
                            InternalGuidProvider customGuidProvider           = null)
        {
            if (strategy.NumDateBytes != 4 && strategy.NumDateBytes != 6)
            {
                throw new NotSupportedException("ICombDateTimeStrategy is limited to either 4 or 6 bytes.");
            }

            _dateTimeStrategy         = strategy;
            InternalTimeStampProvider = customTimeStampProvider ?? DefaultTimeStampProvider;
            InternalGuidProvider      = customGuidProvider ?? NoParamGuidImplementProxy.Basic;
        }
 public MsSqlCombProvider(IDateStrategy strategy,
                          InternalTimeStampProvider customTimeStampProvider = null,
                          InternalGuidProvider customGuidProvider           = null)
     : base(strategy, customTimeStampProvider, customGuidProvider)
 {
 }
Exemple #3
0
 public Guid Create(DateTime timestamp) => Create(InternalGuidProvider.Invoke(), timestamp);
Exemple #4
0
 public Guid Create() => Create(InternalGuidProvider.Invoke(), InternalTimeStampProvider.Invoke());