当前位置: 首页>>代码示例>>C#>>正文


C# IClock类代码示例

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


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


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