本文整理汇总了C#中ITimeProvider类的典型用法代码示例。如果您正苦于以下问题:C# ITimeProvider类的具体用法?C# ITimeProvider怎么用?C# ITimeProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITimeProvider类属于命名空间,在下文中一共展示了ITimeProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Init
public void Init(Func< bool > shouldPauseCb, ITimeProvider time, WeaponConfig config, Rect levelBounds, int shotDirection)
{
base.Init( shouldPauseCb, time, config, levelBounds );
PrefabPoolManager.Prepare( ShotPrefabLink, 8);
ShotDirection = shotDirection;
}
开发者ID:forwolk,项目名称:HamburgTest,代码行数:7,代码来源:ProjectileWeapon.cs
示例2: BrowserExecutionContextCreator
public BrowserExecutionContextCreator(IBrowserStepExecutionStrategyFactory stepExecutionStrategyFactory,
IWebDriverFactory webDriverFactory, ITimeProvider timeProvider)
{
_stepExecutionStrategyFactory = stepExecutionStrategyFactory;
_webDriverFactory = webDriverFactory;
_timeProvider = timeProvider;
}
开发者ID:AcklenAvenue,项目名称:Pepino,代码行数:7,代码来源:BrowserExecutionContextCreator.cs
示例3: Init
public virtual void Init(Func<bool> shouldPauseCb, ITimeProvider time, WeaponConfig config, Rect levelBounds)
{
base.Init( shouldPauseCb, time);
Config = config;
LevelBounds = levelBounds;
ShotFiredTimeStamp = Time.Time;
}
开发者ID:forwolk,项目名称:HamburgTest,代码行数:7,代码来源:BaseWeapon.cs
示例4: SecureCookieProvider
public SecureCookieProvider(ITimeProvider timeProvider)
{
string key = ConfigurationManager.AppSettings.Get("CookieKey");
string salt = ConfigurationManager.AppSettings.Get("CookieSalt");
crypto = CryptoFactory.Rijndael(key, salt);
this.timeProvider = timeProvider;
}
开发者ID:Zyprexia,项目名称:SolidMvp,代码行数:7,代码来源:SecureCookieProvider.cs
示例5: EvalDailyTrigger
public static bool EvalDailyTrigger(this IDailyScheduledTask task, ITimeProvider timeProvider)
{
if (task.RepeatIntervalInDays <= 0 || ((Int32)(timeProvider.Time.Date - task.StartTime.Date).TotalDays % task.RepeatIntervalInDays != 0))
return false;
return TimeHelpers.AreTimesEqualToTheSecond(timeProvider.Time, task.StartTime);
}
开发者ID:m19brandon,项目名称:zVirtualScenes,代码行数:7,代码来源:DailyTaskExtensionMethods.cs
示例6: Create
public static IReaderStrategy Create(
ISourceDefinitionConfigurator sources, ITimeProvider timeProvider, IPrincipal runAs)
{
var builder = new Builder();
sources.ConfigureSourceProcessingStrategy(builder);
return builder.Build(timeProvider, runAs);
}
开发者ID:jjvdangelo,项目名称:EventStore,代码行数:7,代码来源:ReaderStrategy.cs
示例7: MainWindow
public MainWindow(ITimeProvider provider)
{
LogTimeCommand = new DelegateCommand( ActionLogTime );
_provider = provider;
DataContext = this;
Directory.CreateDirectory( "Work" );
var doc = XDocument.Load( "config.xml" );
_breakElements = doc.XPathSelectElements("//Break").ToList();
var catList = doc.XPathSelectElements("//Category").Select(e => e.Value).ToList();
Cats = new ObservableCollection< string >(catList);
#if DEBUG
for ( var i = 0; i < 10; ++i )
{
Cats.Add( "Project "+i );
}
#endif
InitializeComponent();
_dumpBreaks();
list.IsEnabled = false;
// Disable updater for now, fake time
/* {
startTime.Text = "8:00";
_doNotUpdate = true;
}*/
//_doNotUpdate = false;
_updater = Task.Run( () =>
{
while ( true )
{
if ( DoNotUpdate == false )
{
startTime.Dispatcher.Invoke( () => startTime.Text = DateTime.Now.ToString( "HH:mm:ss" ) );
}
//startTime.Dispatcher.Invoke(() => startTime.Text = SystemClock.Instance.Now.ToString("HH:mm", null));
Thread.Sleep( 1000 );
}
} ).ContinueWith( ErrorFunc );
}
开发者ID:Seikilos,项目名称:TimeTracker,代码行数:60,代码来源:MainWindow.xaml.cs
示例8: SystemInformationProvider
public SystemInformationProvider(ITimeProvider timeProvider, IMachineNameProvider machineNameProvider, ISystemPerformanceDataProvider systemPerformanceDataProvider, IHttpStatusCodeCheckResultProvider httpStatusCodeCheckResultProvider)
{
if (timeProvider == null)
{
throw new ArgumentNullException("timeProvider");
}
if (machineNameProvider == null)
{
throw new ArgumentNullException("machineNameProvider");
}
if (systemPerformanceDataProvider == null)
{
throw new ArgumentNullException("systemPerformanceDataProvider");
}
if (httpStatusCodeCheckResultProvider == null)
{
throw new ArgumentNullException("httpStatusCodeCheckResultProvider");
}
this.timeProvider = timeProvider;
this.machineNameProvider = machineNameProvider;
this.systemPerformanceDataProvider = systemPerformanceDataProvider;
this.httpStatusCodeCheckResultProvider = httpStatusCodeCheckResultProvider;
}
开发者ID:andreaskoch,项目名称:SignalKo-SystemMonitor,代码行数:27,代码来源:SystemInformationProvider.cs
示例9: ReaderSubscriptionBase
protected ReaderSubscriptionBase(
IPublisher publisher,
Guid subscriptionId,
CheckpointTag @from,
IReaderStrategy readerStrategy,
ITimeProvider timeProvider,
long? checkpointUnhandledBytesThreshold,
int? checkpointProcessedEventsThreshold,
bool stopOnEof,
int? stopAfterNEvents)
{
if (publisher == null) throw new ArgumentNullException("publisher");
if (readerStrategy == null) throw new ArgumentNullException("readerStrategy");
if (timeProvider == null) throw new ArgumentNullException("timeProvider");
if (checkpointProcessedEventsThreshold > 0 && stopAfterNEvents > 0)
throw new ArgumentException("checkpointProcessedEventsThreshold > 0 && stopAfterNEvents > 0");
_publisher = publisher;
_readerStrategy = readerStrategy;
_timeProvider = timeProvider;
_checkpointUnhandledBytesThreshold = checkpointUnhandledBytesThreshold;
_checkpointProcessedEventsThreshold = checkpointProcessedEventsThreshold;
_stopOnEof = stopOnEof;
_stopAfterNEvents = stopAfterNEvents;
_subscriptionId = subscriptionId;
_lastPassedOrCheckpointedEventPosition = null;
_eventFilter = readerStrategy.EventFilter;
_positionTagger = readerStrategy.PositionTagger;
_positionTracker = new PositionTracker(_positionTagger);
_positionTracker.UpdateByCheckpointTagInitial(@from);
}
开发者ID:danieldeb,项目名称:EventStore,代码行数:33,代码来源:ReaderSubscriptionBase.cs
示例10: CommandCreator
protected CommandCreator(IOutputManager outputManager, ITimeProvider timeProvider, IMessagesRepository messagesRepository, IFollowingRepository followingRepository)
{
OutputManager = outputManager;
TimeProvider = timeProvider;
MessagesRepository = messagesRepository;
FollowingRepository = followingRepository;
}
开发者ID:micheledicosmo,项目名称:retrotwitter,代码行数:7,代码来源:CommandCreators.cs
示例11: EvalWeeklyTrigger
public static bool EvalWeeklyTrigger(this IWeeklyScheduledTask task, ITimeProvider timeProvider)
{
if (task.RepeatIntervalInWeeks <= 0 || (((Int32)(timeProvider.Time.Date - task.StartTime.Date).TotalDays / 7) % task.RepeatIntervalInWeeks != 0)) return false;
var dayOfWeek = (int)timeProvider.Time.DayOfWeek;
var daysOfWeek = (DaysOfWeek)(1 << dayOfWeek);
return task.DaysOfWeekToActivate.HasFlag(daysOfWeek) && TimeHelpers.AreTimesEqualToTheSecond(timeProvider.Time, task.StartTime);
}
开发者ID:ruisebastiao,项目名称:zVirtualScenes,代码行数:7,代码来源:WeeklyTaskExtensionMethods.cs
示例12: CalculateStoreOmittedOrPartlyCompletedShotPoints
public void CalculateStoreOmittedOrPartlyCompletedShotPoints(DrillingDepartmentId id, ITimeProvider provider)
{
// Check if this was previously done
// Store the data
// TODO - SHOULD THIS BE VISUALISED
// Issue OmittedOrPartlyCompletedShotPointsStored event
}
开发者ID:11646729,项目名称:iSeismic,代码行数:7,代码来源:DrillingDepartmentAggregate.cs
示例13: AddPlannedWorkgroup
public void AddPlannedWorkgroup(DrillingDepartmentId id, RequestId requestId, WorkgroupEntity we, ITimeProvider provider)
{
// Create the Planned Workgroup
DoWork("Create a Planned Workgroup and add to the Drilling Department Structure");
RecordAndRealizeThat(new PlannedWorkgroupAddedToDepartment(id, requestId, we, provider.GetUtcNow()));
}
开发者ID:11646729,项目名称:iSeismic,代码行数:7,代码来源:DrillingDepartmentAggregate.cs
示例14: CreateProcessingPhases
public override sealed IProjectionProcessingPhase[] CreateProcessingPhases(
IPublisher publisher, Guid projectionCorrelationId, PartitionStateCache partitionStateCache,
Action updateStatistics, CoreProjection coreProjection, ProjectionNamesBuilder namingBuilder,
ITimeProvider timeProvider, IODispatcher ioDispatcher,
CoreProjectionCheckpointWriter coreProjectionCheckpointWriter)
{
var definesFold = _sourceDefinition.DefinesFold;
var readerStrategy = CreateReaderStrategy(timeProvider);
var zeroCheckpointTag = readerStrategy.PositionTagger.MakeZeroCheckpointTag();
var checkpointManager = CreateCheckpointManager(
projectionCorrelationId, publisher, ioDispatcher, namingBuilder, coreProjectionCheckpointWriter,
definesFold, readerStrategy);
var resultWriter = CreateFirstPhaseResultWriter(
checkpointManager as IEmittedEventWriter, zeroCheckpointTag, namingBuilder);
var firstPhase = CreateFirstProcessingPhase(
publisher, projectionCorrelationId, partitionStateCache, updateStatistics, coreProjection,
_subscriptionDispatcher, zeroCheckpointTag, checkpointManager, readerStrategy, resultWriter);
return CreateProjectionProcessingPhases(
publisher, projectionCorrelationId, namingBuilder, partitionStateCache, coreProjection, ioDispatcher,
firstPhase);
}
开发者ID:jjoergensen,项目名称:EventStore,代码行数:28,代码来源:DefaultProjectionProcessingStrategy.cs
示例15: CreateProcessingPhases
public override IProjectionProcessingPhase[] CreateProcessingPhases(
IPublisher publisher, Guid projectionCorrelationId, PartitionStateCache partitionStateCache,
Action updateStatistics, CoreProjection coreProjection, ProjectionNamesBuilder namingBuilder,
ITimeProvider timeProvider, IODispatcher ioDispatcher,
CoreProjectionCheckpointWriter coreProjectionCheckpointWriter)
{
return new IProjectionProcessingPhase[] {_phase1, _phase2};
}
开发者ID:kijanawoodard,项目名称:EventStore,代码行数:8,代码来源:specification_with_multi_phase_core_projection.cs
示例16: ArchiveAction
public void ArchiveAction(ActionId actionId, ITimeProvider time)
{
var action = GetActionOrThrow(actionId);
if (!action.Archived)
{
Apply(new ActionArchived(_aggState.Id, actionId, action.Project, time.GetUtcNow()));
}
}
开发者ID:beingtheworst,项目名称:btw-gtd,代码行数:8,代码来源:TrustedSystemAggregate.cs
示例17: Create
public static CheckpointStrategy Create(
ISourceDefinitionConfigurator sources, ProjectionConfig config, ITimeProvider timeProvider)
{
var builder = new Builder();
sources.ConfigureSourceProcessingStrategy(builder);
return builder.Build(
config, config.RunAs, Processing.ReaderStrategy.Create(sources, timeProvider, config.RunAs));
}
开发者ID:jjvdangelo,项目名称:EventStore,代码行数:8,代码来源:CheckpointStrategy.cs
示例18: Register
public void Register(
TFChunkDb db, QueuedHandler mainQueue, ISubscriber mainBus, TimerService timerService,
ITimeProvider timeProvider, IHttpForwarder httpForwarder, HttpService[] httpServices, IPublisher networkSendService)
{
_projections = new EventStore.Projections.Core.Projections(
db, mainQueue, mainBus, timerService, timeProvider, httpForwarder, httpServices, networkSendService,
projectionWorkerThreadCount: _projectionWorkerThreadCount, runProjections: _runProjections);
}
开发者ID:jjvdangelo,项目名称:EventStore,代码行数:8,代码来源:Projections.cs
示例19: QueueListener
public QueueListener(IQueueListenerConfiguration config, IQueue queue, IScenarioRunner scenarioRunner, IProgressReporter progressReporter, ITimeProvider timeProvider)
{
_config = config;
_queue = queue;
_scenarioRunner = scenarioRunner;
_progressReporter = progressReporter;
_timeProvider = timeProvider;
}
开发者ID:AcklenAvenue,项目名称:Pepino,代码行数:8,代码来源:QueueListener.cs
示例20: TransactionFileEventReader
public TransactionFileEventReader(IPublisher publisher, Guid distibutionPointCorrelationId, EventPosition @from, ITimeProvider timeProvider, bool stopOnEof = false, bool deliverEndOfTFPosition = true)
: base(publisher, distibutionPointCorrelationId, stopOnEof)
{
if (publisher == null) throw new ArgumentNullException("publisher");
_from = @from;
_deliverEndOfTfPosition = deliverEndOfTFPosition;
_timeProvider = timeProvider;
}
开发者ID:base31,项目名称:geteventstore_EventStore,代码行数:8,代码来源:TransactionFileEventReader.cs
注:本文中的ITimeProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论