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


C# Setup类代码示例

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


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

示例1: AppsSetup

        protected override void AppsSetup(Setup setup)
        {
            base.AppsSetup(setup);

            var englishLocale = new Locales(this.Session).EnglishGreatBritain;
            var dutchLocale = new Locales(this.Session).DutchNetherlands;

            new VatRatePurchaseKindBuilder(this.Session)
                .WithName("Goods")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Goods").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Goederen").WithLocale(dutchLocale).Build())
                .WithUniqueId(GoodsId).Build();

            new VatRatePurchaseKindBuilder(this.Session)
                .WithName("Services")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Services").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Diensten").WithLocale(dutchLocale).Build())
                .WithUniqueId(ServicesId).Build();

            new VatRatePurchaseKindBuilder(this.Session)
                .WithName("Investments")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Investments").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Investeringen").WithLocale(dutchLocale).Build())
                .WithUniqueId(InvestmentsId).Build();
        }
开发者ID:Allors,项目名称:apps,代码行数:25,代码来源:VatRatePurchaseKinds.cs

示例2: RunTests

        public List<TestResult> RunTests(Setup setup, IList<Test> tests, Teardown teardown)
        {
            var results = new List<TestResult>();

            foreach (var test in tests)
            {
                var result = new TestResult();
                try
                {
                    result.TestName = test.Method.Name;
                    setup.Invoke();
                    test.Invoke();
                    result.Success = true;

                }
                catch(Exception exception)
                {
                    result.Success = false;
                    result.Result = exception.Message;
                }
                finally
                {
                    results.Add(result);
                }                
            }

            return results;
        }
开发者ID:bobtjanitor,项目名称:bob-the-janitor-sample-code,代码行数:28,代码来源:TestEngine.cs

示例3: BaseSetup

 protected override void BaseSetup(Setup config)
 {
     new OrderObjectStateBuilder(this.Session).WithUniqueId(InitialId).WithName("Initial").Build();
     new OrderObjectStateBuilder(this.Session).WithUniqueId(ConfirmedId).WithName("Confirmed").Build();
     new OrderObjectStateBuilder(this.Session).WithUniqueId(ClosedId).WithName("Closed").Build();
     new OrderObjectStateBuilder(this.Session).WithUniqueId(CancelledId).WithName("Cancelled").Build();
 }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:OrderObjectStates.cs

示例4: ConfigureApplicationContainer

        protected override void ConfigureApplicationContainer(ILifetimeScope existingContainer)
        {
            var setup = new Setup((IContainer)existingContainer);

            // defaults
            setup.WithGuidGenerator();
            setup.WithThreadStaticTenantContext();
            setup.WithMongo("MongoConnectionReadModel");
            setup.RegisterReadModelRepositories();

            // web specific
            var builder = new ContainerBuilder();
            builder.RegisterType<NancyUserMapper>().As<IUserMapper>();
            builder.RegisterType<StaticContentResolverForInMemory>().As<IStaticContentResolver>();
            builder.RegisterType<ExcelService>().As<IExcelService>();
            builder.Update(setup.Container.ComponentRegistry);

            // bus
            setup.WithInMemoryBus();
            setup.RegisterReadModelHandlers();

            // eventstore
            setup.WithMongoEventStore("MongoConnectionEventStore",
                new AuthorizationPipelineHook(setup.Container),
                new MessageDispatcher(setup.Container),
                false);

            // start the bus
            setup.Container.Resolve<IServiceBus>().Start(ConfigurationManager.AppSettings["serviceBusEndpoint"]);
        }
开发者ID:kcornelis,项目名称:FreelanceManager.NET,代码行数:30,代码来源:NancyTestBootstrapper.cs

示例5: App

        /// <summary>
        /// Constructor for the Application object.
        /// </summary>
        public App()
        {
            // Global handler for uncaught exceptions. 
            UnhandledException += Application_UnhandledException;

            // Standard Silverlight initialization
            InitializeComponent();

            // Phone-specific initialization
            InitializePhoneApplication();

            // Show graphics profiling information while debugging.
            if (System.Diagnostics.Debugger.IsAttached)
            {
                // Display the current frame rate counters.
                Application.Current.Host.Settings.EnableFrameRateCounter = true;

                // Show the areas of the app that are being redrawn in each frame.
                //Application.Current.Host.Settings.EnableRedrawRegions = true;

                // Enable non-production analysis visualization mode, 
                // which shows areas of a page that are handed off to GPU with a colored overlay.
                //Application.Current.Host.Settings.EnableCacheVisualization = true;

                // Disable the application idle detection by setting the UserIdleDetectionMode property of the
                // application's PhoneApplicationService object to Disabled.
                // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
                // and consume battery power when the user is not using the phone.
                PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
            }

            var setup = new Setup(RootFrame);
            setup.Initialize();
        }
开发者ID:darkice-matt-crombie,项目名称:MvxSpinnerTest,代码行数:37,代码来源:App.xaml.cs

示例6: AppsSetup

        protected override void AppsSetup(Setup setup)
        {
            base.AppsSetup(setup);

            var englishLocale = new Locales(this.Session).EnglishGreatBritain;
            var dutchLocale = new Locales(this.Session).DutchNetherlands;

            new PurchaseInvoiceTypeBuilder(this.Session)
                .WithName("Purchase invoice")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Purchase invoice").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Aankoop factuur").WithLocale(dutchLocale).Build())
                .WithUniqueId(PurchaseInvoiceId)
                .Build();

            new PurchaseInvoiceTypeBuilder(this.Session)
                .WithName("Customer return")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Customer return").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Crediet nota retour").WithLocale(dutchLocale).Build())
                .WithUniqueId(CustomerReturnId)
                .Build();

            new PurchaseInvoiceTypeBuilder(this.Session)
                .WithName("Commission")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Commission").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Commissie").WithLocale(dutchLocale).Build())
                .WithUniqueId(CommissionId)
                .Build();

            new PurchaseInvoiceTypeBuilder(this.Session)
                .WithName("Payroll")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Payroll").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Salaris").WithLocale(dutchLocale).Build())
                .WithUniqueId(PayrollId)
                .Build();
        }
开发者ID:Allors,项目名称:apps,代码行数:35,代码来源:PurchaseInvoiceTypes.cs

示例7: SetProject

        private void SetProject(Setup.Project project)
        {
            if (project != null)
            {
                try
                {
                    project.Load();
                    this.openDialog.InitialDirectory = project.InstallPath;
                    this.saveKnownFileListDialog.InitialDirectory = project.ListsPath;
                }
                catch (Exception e)
                {
                    MessageBox.Show(
                        "There was an error while loading project data." +
                        Environment.NewLine + Environment.NewLine +
                        e.ToString() +
                        Environment.NewLine + Environment.NewLine +
                        "(You can press Ctrl+C to copy the contents of this dialog)",
                        "Error",
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Error);
                    project = null;
                }
            }

            if (project != this.Manager.ActiveProject)
            {
                this.Manager.ActiveProject = project;
            }

            this.projectComboBox.SelectedItem = project;
        }
开发者ID:tgp1994,项目名称:Gibbed.Visceral,代码行数:32,代码来源:Viewer.cs

示例8: AppsSetup

        protected override void AppsSetup(Setup setup)
        {
            base.AppsSetup(setup);

            var englishLocale = new Locales(this.Session).EnglishGreatBritain;
            var durchLocale = new Locales(this.Session).DutchNetherlands;

            new CommunicationEventObjectStateBuilder(this.Session)
                .WithName("Scheduled")
                .WithUniqueId(ScheduledId)
                .Build();

            new CommunicationEventObjectStateBuilder(this.Session)
                .WithName("In Progress")
                .WithUniqueId(InProgressId)
                .Build();

            new CommunicationEventObjectStateBuilder(this.Session)
                .WithName("Completed")
                .WithUniqueId(CompletedId)
                .Build();

            new CommunicationEventObjectStateBuilder(this.Session)
                .WithName("Cancelled")
                .WithUniqueId(CancelledId)
                .Build();
        }
开发者ID:Allors,项目名称:apps,代码行数:27,代码来源:CommunicationEventObjectStates.cs

示例9: BaseSetup

        protected override void BaseSetup(Setup config)
        {
            base.BaseSetup(config);

            new PersonBuilder(this.Session).WithUserName(Users.GuestUserName).Build();
            new PersonBuilder(this.Session).WithUserName(Users.AdministratorUserName).Build();
        }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:Persons.cs

示例10: AppsSetup

        protected override void AppsSetup(Setup setup)
        {
            base.AppsSetup(setup);

            var englishLocale = new Locales(this.Session).EnglishGreatBritain;
            var dutchLocale = new Locales(this.Session).DutchNetherlands;

            new OrganisationUnitBuilder(this.Session)
                .WithName("Department")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Department").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Departement").WithLocale(dutchLocale).Build())
                .WithUniqueId(DepartmentId)
                .Build();

            new OrganisationUnitBuilder(this.Session)
                .WithName("Division")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Division").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Divisie").WithLocale(dutchLocale).Build())
                .WithUniqueId(DivisionId)
                .Build();

            new OrganisationUnitBuilder(this.Session)
                .WithName("Subsidiary")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Subsidiary").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Dochtermaatschappij").WithLocale(dutchLocale).Build())
                .WithUniqueId(SubsidiaryId)
                .Build();
        }
开发者ID:Allors,项目名称:apps,代码行数:28,代码来源:OrganisationUnits.cs

示例11: AppsSetup

        protected override void AppsSetup(Setup setup)
        {
            base.AppsSetup(setup);

            var englishLocale = new Locales(this.Session).EnglishGreatBritain;
            var dutchLocale = new Locales(this.Session).DutchNetherlands;

            new DeliverableTypeBuilder(this.Session)
                .WithName("Project Plan")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Project Plan").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Projectplan").WithLocale(dutchLocale).Build())
                .WithUniqueId(ProjectPlanId)
                .Build();

            new DeliverableTypeBuilder(this.Session)
                .WithName("Presentation")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Presentation").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Presentatie").WithLocale(dutchLocale).Build())
                .WithUniqueId(PresentationId)
                .Build();

            new DeliverableTypeBuilder(this.Session)
                .WithName("Report")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Report").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Rapport").WithLocale(dutchLocale).Build())
                .WithUniqueId(ReportId)
                .Build();

            new DeliverableTypeBuilder(this.Session)
                .WithName("Market Analysis")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Market Analysis").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Markt analyse").WithLocale(dutchLocale).Build())
                .WithUniqueId(MarketAnalysisId)
                .Build();
        }
开发者ID:Allors,项目名称:apps,代码行数:35,代码来源:DeliverableTypes.cs

示例12: AppsSetup

        protected override void AppsSetup(Setup setup)
        {
            base.AppsSetup(setup);

            var englishLocale = new Locales(this.Session).EnglishGreatBritain;
            var dutchLocale = new Locales(this.Session).DutchNetherlands;

            new EmploymentTerminationReasonBuilder(this.Session)
                .WithName("Insubordination")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Insubordination").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Weigering van bevel").WithLocale(dutchLocale).Build())
                .WithUniqueId(InsubordinationId)
                .Build();

            new EmploymentTerminationReasonBuilder(this.Session)
                .WithName("Accepted New Job")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Accepted New Job").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Nieuwe job aangenomen").WithLocale(dutchLocale).Build())
                .WithUniqueId(AcceptedNewJobId)
                .Build();

            new EmploymentTerminationReasonBuilder(this.Session)
                .WithName("Non Performance")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Non Performance").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Slechte performantie").WithLocale(dutchLocale).Build())
                .WithUniqueId(NonPerformanceId)
                .Build();

            new EmploymentTerminationReasonBuilder(this.Session)
                .WithName("Moved")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Moved").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Verhuis").WithLocale(dutchLocale).Build())
                .WithUniqueId(MovedId)
                .Build();
        }
开发者ID:Allors,项目名称:apps,代码行数:35,代码来源:EmploymentTerminationReasons.cs

示例13: AppsSetup

        protected override void AppsSetup(Setup setup)
        {
            base.AppsSetup(setup);

            var englishLocale = new Locales(this.Session).EnglishGreatBritain;
            var dutchLocale = new Locales(this.Session).DutchNetherlands;

            new OrdinalBuilder(this.Session)
                .WithName("First")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("First").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Eerste").WithLocale(dutchLocale).Build())
                .WithUniqueId(FirstId)
                .Build();

            new OrdinalBuilder(this.Session)
                .WithName("Second")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Second").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Tweede").WithLocale(dutchLocale).Build())
                .WithUniqueId(SecondId)
                .Build();

            new OrdinalBuilder(this.Session)
                .WithName("Third")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Third").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Derde").WithLocale(dutchLocale).Build())
                .WithUniqueId(ThirdId)
                .Build();
        }
开发者ID:Allors,项目名称:apps,代码行数:28,代码来源:Ordinals.cs

示例14: AppsSetup

        protected override void AppsSetup(Setup setup)
        {
            base.AppsSetup(setup);

            var englishLocale = new Locales(this.Session).EnglishGreatBritain;
            var dutchLocale = new Locales(this.Session).DutchNetherlands;

            new SkillRatingBuilder(this.Session)
                .WithName("Poor")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Poor").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Slecht").WithLocale(dutchLocale).Build())
                .WithUniqueId(PoorId)
                .Build();

            new SkillRatingBuilder(this.Session)
                .WithName("Fair")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Fair").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Matig").WithLocale(dutchLocale).Build())
                .WithUniqueId(FairId)
                .Build();

            new SkillRatingBuilder(this.Session)
                .WithName("Good")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Good").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Goed").WithLocale(dutchLocale).Build())
                .WithUniqueId(GoodId)
                .Build();

            new SkillRatingBuilder(this.Session)
                .WithName("Excellent")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Excellent").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Uitstekend").WithLocale(dutchLocale).Build())
                .WithUniqueId(ExcellentId)
                .Build();
        }
开发者ID:Allors,项目名称:apps,代码行数:35,代码来源:SkillRatings.cs

示例15: AppsSetup

        protected override void AppsSetup(Setup setup)
        {
            base.AppsSetup(setup);

            var englishLocale = new Locales(this.Session).EnglishGreatBritain;
            var dutchLocale = new Locales(this.Session).DutchNetherlands;

            new DebitCreditConstantBuilder(this.Session)
                .WithName("FiFo")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("FiFo").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("FiFo").WithLocale(dutchLocale).Build())
                .WithUniqueId(FiFoId).Build();

            new DebitCreditConstantBuilder(this.Session)
                .WithName("LiFo")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("LiFo").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("LiFo").WithLocale(dutchLocale).Build())
                .WithUniqueId(LiFoId)
                .Build();

            new DebitCreditConstantBuilder(this.Session)
                .WithName("Average price")
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Average price").WithLocale(englishLocale).Build())
                .WithLocalisedName(new LocalisedTextBuilder(this.Session).WithText("Gemiddelde prijs").WithLocale(dutchLocale).Build())
                .WithUniqueId(AverageId)
                .Build();
        }
开发者ID:Allors,项目名称:apps,代码行数:27,代码来源:CostOfGoodsSoldMethods.cs


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