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


C# Common.Add方法代码示例

本文整理汇总了C#中Common.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Common.Add方法的具体用法?C# Common.Add怎么用?C# Common.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Common的用法示例。


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

示例1: CanAddItemsToAnEmptySet

        public void CanAddItemsToAnEmptySet(Common.DataStructures.ISet<string> set)
        {
            Assert.IsTrue(set.Add("apple"));
            Assert.IsFalse(set.Add("apple"));

            Assert.IsTrue(set.Contains("apple"));
            Assert.IsFalse(set.Contains("banana"));
        }
开发者ID:ungood,项目名称:puzzles,代码行数:8,代码来源:SetTests.cs

示例2: AddInteraction

        public override void AddInteraction(Common.InteractionInjectorList interactions)
        {
            interactions.Replace<ShowerOutdoor, ShowerOutdoor.TakeShower.Definition>(ShowerOutdoor.TakeShower.Singleton);

            // The other interactions are added by ShowerWoohoo itself
            interactions.Add<IShowerable>(ShowerWoohoo.SafeSingleton);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:TakeShowerOutdoorEx.cs

示例3: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<SchoolRabbitHole>(Singleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:4,代码来源:RabbitholeTakeChildOutOfAfterschoolClassEx.cs

示例4: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<PingPongTable>(Singleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:4,代码来源:PlayJuicePongEx.cs

示例5: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<Computer>(Singleton);
     interactions.AddNoDupTest<Computer>(RandomSingleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:5,代码来源:CyberWoohoo.cs

示例6: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<AncientPortal>(Singleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:4,代码来源:AncientPortalTimeTravelWithEx.cs

示例7: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<Computer>(Singleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:4,代码来源:ComputerSignUpForAfterschoolClassEx.cs

示例8: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<Sim>(Chat.Singleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:4,代码来源:FixToddlerChat.cs

示例9: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<TrainingDummy>(Singleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:4,代码来源:MartialArtsTrain.cs

示例10: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<ShowVenue>(Singleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:4,代码来源:AttendShowEx.cs

示例11: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<TimeMachine>(Singleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:4,代码来源:TimeMachineTimeTravelWithEx.cs

示例12: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<Sim>(AskToJoinSkinnyDipping.Singleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:4,代码来源:SkinnyDipAskToJoin.cs

示例13: bCount_Click

        private async void bCount_Click(object sender, RoutedEventArgs e)
        {
            Dv = new Divided();
            Cm = new Common();
            PbWork.Value = 0;
            var unit = Convert.ToInt32(LNumberOfProc.Content);
            var alpha = Convert.ToInt32(LAlpha.Content);
            PbWork.Visibility = Visibility.Visible;

            if (RbDv.IsChecked != null && (bool)RbDv.IsChecked)
                switch ((string)LType.Content)
                {
                    case "Transposition":
                        DoPbDv();
                        print_Matrix(await Dv.Transpose(_matrixA, unit), TbMxRes);
                        break;
                    case "Addition":
                        DoPbDv();
                        print_Matrix(await Dv.Add(_matrixA, _matrixB, unit), TbMxRes);
                        break;
                    case "Multiplication":
                        DoPbDv();
                        print_Matrix(await Dv.Multiplicate(_matrixA, _matrixB, unit, alpha), TbMxRes);
                        break;
                }
            else
                switch ((string)LType.Content)
                {
                    case "Transposition":
                        DoPbCm();
                        print_Matrix(await Cm.Transpose(_matrixA, unit), TbMxRes);
                        break;
                    case "Addition":
                        DoPbCm();
                        print_Matrix(await Cm.Add(_matrixA, _matrixB, unit), TbMxRes);
                        break;
                    case "Multiplication":
                        DoPbCm();
                        print_Matrix(await Cm.Multiplicate(_matrixA, _matrixB, unit, alpha), TbMxRes);
                        break;
                }
            LTime.Content = (Dv.Time > Cm.Time) ? Dv.Time.ToString() : Cm.Time.ToString();
        }
开发者ID:MaxBondarchuk,项目名称:T7_Computer_Systems_Lab1,代码行数:43,代码来源:MainWindow.xaml.cs

示例14: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {
     interactions.Add<UberToilet>(PrivacyInteraction.Singleton);
     interactions.Replace<UberToilet, UberToilet.UseToilet.Definition>(Singleton);
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:5,代码来源:UseUberToiletEx.cs

示例15: AddInteraction

 public void AddInteraction(Common.InteractionInjectorList interactions)
 {            
     interactions.Add<CraftersConsignment>(BuyFoodSingleton);
 }
开发者ID:Chain-Reaction,项目名称:NRaas,代码行数:4,代码来源:PurchaseItemEx.cs


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