• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IClock类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IClock的典型用法代码示例。如果您正苦于以下问题:C# IClock类的具体用法?C# IClock怎么用?C# IClock使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IClock类属于命名空间,在下文中一共展示了IClock类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: DefaultVirtualPathMonitor

 public DefaultVirtualPathMonitor(IClock clock, IVirtualPathProvider virtualPathProvider)
 {
     _clock = clock;
     _virtualPathProvider = virtualPathProvider;
     _thunk = new Thunk(this);
     Logger = NullLogger.Instance;
 }
开发者ID:l1183479157,项目名称:RabbitHub,代码行数:7,代码来源:DefaultVirtualPathMonitor.cs


示例2: FrmCajaResumida

 public FrmCajaResumida(IFormFactory formFactory, IGestionAdministrativaUow uow, IReporteNegocio reporteNegocio, IClock clock)
 {
     Uow = uow;
     _reporteNegocio = reporteNegocio;
     _clock = clock;
     InitializeComponent();
 }
开发者ID:silviaeaguilar,项目名称:SistemaGestion,代码行数:7,代码来源:FrmCajaResumida.cs


示例3: ContentHub

 public ContentHub(Work<IContentManager> workContentManager,
     Work<IAuthenticationService> workAuthenticationService,
     IClock clock) {
     _workContentManager = workContentManager;
     _workAuthenticationService = workAuthenticationService;
     _clock = clock;
 }
开发者ID:Jetski5822,项目名称:NGM.OperationalTransformation,代码行数:7,代码来源:ContentHub.cs


示例4: CreateAccountForm

 public CreateAccountForm(ParkingDatabase db, IClock clock, IMailer mailer)
 {
     Database = db;
     FormClock = clock;
     Mailer = mailer;
     InitializeComponent();
 }
开发者ID:jtan189,项目名称:ParkingManagement,代码行数:7,代码来源:CreateAccountForm.cs


示例5: RecordPhonecall

 public RecordPhonecall(IPayAsYouGoAccountRepository payAsYouGoAccountRepository,
                    IDocumentSession unitOfWork, IClock clock)
 {
     _payAsYouGoAccountRepository = payAsYouGoAccountRepository;
     _unitOfWork = unitOfWork;
     _clock = clock;
 }
开发者ID:elbandit,项目名称:PPPDDD,代码行数:7,代码来源:RecordPhonecall.cs


示例6: GetInstance

        public static CommandMetrics GetInstance(string name,  CommandProperties properties, IClock clock)
        {
            Contract.Assert(!String.IsNullOrEmpty(name));
            Contract.Assert(properties != null);

            return _metrics.GetOrAdd(name, n => new CommandMetrics(n, properties, clock));
        }
开发者ID:geffzhang,项目名称:JellyFish.Commands,代码行数:7,代码来源:CommandMetrics.cs


示例7: MultiClampCommander

        public MultiClampCommander(uint serialNumber, uint channel, IClock clock)
        {
            SerialNumber = serialNumber;
            Channel = channel;
            Clock = clock;

            UInt32 lParam = MulticlampInterop.MCTG_Pack700BSignalIDs(this.SerialNumber, this.Channel); // Pack the above two into an UInt32
            int result = Win32Interop.PostMessage(Win32Interop.HWND_BROADCAST, MulticlampInterop.MCTG_OPEN_MESSAGE, (IntPtr)Win32Interop.MessageEvents.WindowHandle, (IntPtr)lParam);

            Win32Interop.MessageEvents.WatchMessage(Win32Interop.WM_COPYDATA, (sender, evtArgs) =>
            {
                // WM_COPYDATA LPARAM is a pointer to a COPYDATASTRUCT structure
                Win32Interop.COPYDATASTRUCT cds;
                cds = (Win32Interop.COPYDATASTRUCT)
                    Marshal.PtrToStructure(evtArgs.Message.LParam, typeof(Win32Interop.COPYDATASTRUCT));

                // WM_COPYDATA structure (COPYDATASTRUCT)
                // dwData -- RegisterWindowMessage(MCTG_REQUEST_MESSAGE_STR)
                // cbData -- size (in bytes) of the MC_TELEGRAPH_DATA structure being sent
                // lpData -- MC_TELEGRAPH_DATA*
                MulticlampInterop.MC_TELEGRAPH_DATA mtd;
                mtd = (MulticlampInterop.MC_TELEGRAPH_DATA)Marshal.PtrToStructure(cds.lpData, typeof(MulticlampInterop.MC_TELEGRAPH_DATA));
                var md = new MulticlampInterop.MulticlampData(mtd);

                OnParametersChanged(md);
            });
        }
开发者ID:physion,项目名称:symphony-core,代码行数:27,代码来源:MulticlampDevice.cs


示例8: FillLastMonthData

        // fill the database with fake data for last month, using a test clock
        public static void FillLastMonthData(ParkingDatabase database, IClock testClock)
        {
            try
            {
                // fill with database with fake data
                for (int i = 0; i < 80; i++)
                {
                    CustomerAccount testAccount = new CustomerAccount(RandomString(), RandomString(), "555-555-5555",
                        RandomString() + "@tester.com", "password");
                    Billing.CreditCard.CreditCardType randomCardType = (Billing.CreditCard.CreditCardType)random.Next(3);
                    Billing.CreditCard testCard = new Billing.CreditCard(1234123412349876, Billing.CreditCard.CreditCardType.MASTERCARD);
                    Accounts.Vehicle testVehicle = new Accounts.Vehicle(RandomString() + " " + RandomString(),
                        RandomString());
                    DateTime startDate = new DateTime(2012, 11, 25, 10, 0, 0); // 11-25-12 @ 10a
                    DateTime testResDate = RandomTime(startDate);
                    database.AddAccount(testAccount);
                    database.AddCreditCard(testCard, testAccount.CustomerID);
                    database.AddVehicle(testVehicle, testAccount.CustomerID);
                    ParkingReservation testReservation = new ParkingReservation(testAccount, testVehicle,
                        testResDate, 120);

                    // generate a random transaction date in the past
                    int hours = random.Next(1, 500);
                    TimeSpan timeSpan = new TimeSpan(hours, 0, 0);
                    DateTime transactionDate = testResDate.Subtract(timeSpan);

                    // add reservation (and transaction) to database
                    database.AddReservation(testReservation, testCard.CardID, transactionDate);
                }
            }
            catch (Exception)
            { } // confict when adding reservation (ignore)
        }
开发者ID:jtan189,项目名称:ParkingManagement,代码行数:34,代码来源:AdminProgramTest.cs


示例9: Post

 public Post(string username, IList<string> messages, IUserRepository userRepository, IClock clock)
 {
     Username = username;
     Messages = messages;
     _userRepository = userRepository;
     _clock = clock;
 }
开发者ID:asierba,项目名称:barker,代码行数:7,代码来源:Post.cs


示例10: PaypalApiService

 public PaypalApiService(
     IPaypalSettingsService settingsService,
     IClock clock) {
     _settingsService = settingsService;
     _clock = clock;
     T = NullLocalizer.Instance;
 }
开发者ID:lfurzewaddock,项目名称:OShop.PayPal,代码行数:7,代码来源:PaypalApiService.cs


示例11: Init

        public void Init() {
            var builder = new ContainerBuilder();

            builder.RegisterType<MembershipService>().As<IMembershipService>();
            builder.RegisterType<UserService>().As<IUserService>();
            builder.RegisterInstance(_clock = new StubClock()).As<IClock>();
            builder.RegisterType<DefaultContentQuery>().As<IContentQuery>();
            builder.RegisterType<DefaultContentManager>().As<IContentManager>();
            builder.RegisterType(typeof(SettingsFormatter)).As<ISettingsFormatter>();
            builder.RegisterType<ContentDefinitionManager>().As<IContentDefinitionManager>();
            builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
            builder.RegisterType<UserPartHandler>().As<IContentHandler>();
            builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
            builder.RegisterType<OrchardServices>().As<IOrchardServices>();
            builder.RegisterAutoMocking(MockBehavior.Loose);
            builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
            builder.RegisterInstance(new Mock<IMessageEventHandler>().Object);
            builder.RegisterType<DefaultMessageManager>().As<IMessageManager>();
            builder.RegisterInstance(_channel = new MessagingChannelStub()).As<IMessagingChannel>();
            builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
            builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
            builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
            builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();

            builder.RegisterType<DefaultEncryptionService>().As<IEncryptionService>();
            builder.RegisterInstance(ShellSettingsUtility.CreateEncryptionEnabled());

            _session = _sessionFactory.OpenSession();
            builder.RegisterInstance(new TestSessionLocator(_session)).As<ISessionLocator>();
            _container = builder.Build();
            _membershipService = _container.Resolve<IMembershipService>();
            _userService = _container.Resolve<IUserService>();
        }
开发者ID:seifipour,项目名称:exams4doctors,代码行数:33,代码来源:UserServiceTests.cs


示例12: Index

        public ActionResult Index(IClock clock, IDocumentSession session)
        {
            if (clock == null) throw new ArgumentNullException("clock");
            ViewBag.Message = "Welcome to Highway Christian Church!";

            return View();
        }
开发者ID:highwaychurch,项目名称:web,代码行数:7,代码来源:HomeController.cs


示例13: FrmVentasReservadasListado

        public FrmVentasReservadasListado(IClock clock, IFormFactory formFactory, IMessageBoxDisplayService messageBoxDisplayService, ILaPazUow uow,
            IVentaReservadaNegocio ventaReservadaNegocio,
                             IFormRegistry formRegistry)
        {
            Uow = uow;

            SortColumn = "FechaAlta";
            SortDirection = "DESC";

            SortColumnMappings = new Dictionary<string, string>();
            //SortColumnMappings["TipoDocumentoDi"] = "TiposDocumentosIdentidad.Abreviatura";

            FormFactory = formFactory;
            Uow = uow;
            FormRegistry = formRegistry;

            _clock = clock;
            _messageBoxDisplayService = messageBoxDisplayService;
            _ventaReservadaNegocio = ventaReservadaNegocio;
            InitializeComponent();

            InicializarPaginador();

            //Fix para centrar columnas.
            this.GrillaFacturasReservadas.CellFormatting += this.Grilla_CellFormatting;
            MainGrid = GrillaFacturasReservadas;
            this.MainPager = FacturaPager;
            this.Spinner = ucProgressSpinner1;
            
        }
开发者ID:pragmasolutions,项目名称:Libreria,代码行数:30,代码来源:FrmVentasReservadasListado.cs


示例14: BuildHeaderWriter

 internal BuildHeaderWriter(IClock clock, IBuildEnvironment buildEnvironment, IOutput output, ICmdArguments cmdArguments)
 {
     _clock = clock;
     _buildEnvironment = buildEnvironment;
     _output = output;
     _cmdArguments = cmdArguments;
 }
开发者ID:vetterd,项目名称:CSBuild,代码行数:7,代码来源:BuildHeaderWriter.cs


示例15: AdvancedSitemapService

 public AdvancedSitemapService(
     IRepository<SitemapRouteRecord> routeRepository, 
     IRepository<SitemapSettingsRecord> settingsRepository,
     IRepository<SitemapCustomRouteRecord> customRouteRepository,
     IContentManager contentManager,
     ICacheManager cacheManager,
     ISignals signals,
     IClock clock,
     IContentDefinitionManager contentDefinitionManager,
     IEnumerable<ISitemapRouteFilter> routeFilters,
     IEnumerable<ISitemapRouteProvider> routeProviders, 
     ISiteService siteService, 
     IEnumerable<ISpecializedSitemapProvider> specializedSitemapProviders)
 {
     _routeRepository = routeRepository;
     _settingsRepository = settingsRepository;
     _customRouteRepository = customRouteRepository;
     _contentManager = contentManager;
     _cacheManager = cacheManager;
     _signals = signals;
     _clock = clock;
     _contentDefinitionManager = contentDefinitionManager;
     _routeFilters = routeFilters;
     _routeProviders = routeProviders;
     _siteService = siteService;
     _specializedSitemapProviders = specializedSitemapProviders;
 }
开发者ID:jeffolmstead,项目名称:Orchard-SiteMap,代码行数:27,代码来源:AdvancedSitemapService.cs


示例16: BidOnAuction

 public BidOnAuction(IAuctionRepository auctionRepository, IBidHistoryRepository bidHistoryRepository, IUnitOfWork unitOfWork, IClock clock)
 {
     _auctionRepository = auctionRepository;
     _bidHistoryRepository = bidHistoryRepository;
     _unitOfWork = unitOfWork;
     _clock = clock;
 }
开发者ID:elbandit,项目名称:PPPDDD,代码行数:7,代码来源:BidOnAuction.cs


示例17: CASClient

        public CASClient(
            ShellSettings settings, 
            ITicketValidatorFactory ticketValidatorFactory,
            IRequestEvaluator requestEvaluator,
            IClock clock,
            IUrlUtil urlUtil,
            IAuthenticationService authenticationService,
            ICasServices casServices) {
            _settings = settings;
            _ticketValidatorFactory = ticketValidatorFactory;
            _requestEvaluator = requestEvaluator;
            _clock = clock;
            _urlUtil = urlUtil;
            _authenticationService = authenticationService;
            _casServices = casServices;

            _xmlNamespaceManager = new XmlNamespaceManager(_xmlNameTable);
            _xmlNamespaceManager.AddNamespace("cas", "http://www.yale.edu/tp/cas");
            _xmlNamespaceManager.AddNamespace("saml", "urn: oasis:names:tc:SAML:1.0:assertion");
            _xmlNamespaceManager.AddNamespace("saml2", "urn: oasis:names:tc:SAML:1.0:assertion");
            _xmlNamespaceManager.AddNamespace("samlp", "urn: oasis:names:tc:SAML:1.0:protocol");

            Logger = NullLogger.Instance;
            T = NullLocalizer.Instance;
        }
开发者ID:Jetski5822,项目名称:NGM.CasClient,代码行数:25,代码来源:CASClient.cs


示例18: AddOccurrenceDatesConditions

        /// <summary>
        /// Filters the by occurrence start date between now and 90 days from now.
        /// </summary>
        /// <param name="objectSet">The object set.</param>
        /// <param name="startDate">The start date.</param>
        /// <param name="endDate">The end date.</param>
        /// <param name="clock">The clock.</param>
        /// <returns>The modified query.</returns>
        public static IQueryable<EventCacheView> AddOccurrenceDatesConditions(this IQueryable<EventCacheView> objectSet, DateTime? startDate, DateTime? endDate, IClock clock)
        {
            if (!startDate.HasValue)
            {
                startDate = clock.Now;
            }

            if (!endDate.HasValue)
            {

                return objectSet.Where(e => e.Occurrences.Count() > 0 &&
                                        e.Occurrences.Any(o => (o.OccurrenceDates.Count() > 0 && o.OccurrenceDates.All(d => d.StartDate >= startDate)) ||
                                                                (o.OccurrenceDates.Count() == 0))
                                      );

            }
            else
            {
                endDate = endDate.Value.Date.AddDays(1);
            }

            return objectSet.Where(e => e.Occurrences.Count() > 0 &&
                e.Occurrences.Any(o => (o.OccurrenceDates.Count() > 0 &&
                                        o.OccurrenceDates.All(d => d.StartDate >= startDate && d.StartDate <= endDate))));
        }
开发者ID:rickeygalloway,项目名称:Test,代码行数:33,代码来源:EventSearchQueryExtensions.cs


示例19: DatabaseLock

 public DatabaseLock(
     ILifetimeScope lifetimeScope,
     IClock clock)
 {
     _lifetimeScope = lifetimeScope;
     _clock = clock;
 }
开发者ID:hqmirror,项目名称:Piedone.HelpfulLibraries,代码行数:7,代码来源:DatabaseLock.cs


示例20: CookieCultureSelector

 public CookieCultureSelector(IHttpContextAccessor httpContextAccessor,
     IClock clock,
     ShellSettings shellSettings) {
     _httpContextAccessor = httpContextAccessor;
     _clock = clock;
     _shellSettings = shellSettings;
 }
开发者ID:anycall,项目名称:Orchard,代码行数:7,代码来源:CookieCultureSelector.cs



注:本文中的IClock类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ICloningContext类代码示例发布时间:2022-05-24
下一篇:
C# IClientMessage类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap