本文整理汇总了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"));
}
示例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);
}
示例3: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<SchoolRabbitHole>(Singleton);
}
示例4: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<PingPongTable>(Singleton);
}
示例5: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<Computer>(Singleton);
interactions.AddNoDupTest<Computer>(RandomSingleton);
}
示例6: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<AncientPortal>(Singleton);
}
示例7: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<Computer>(Singleton);
}
示例8: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<Sim>(Chat.Singleton);
}
示例9: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<TrainingDummy>(Singleton);
}
示例10: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<ShowVenue>(Singleton);
}
示例11: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<TimeMachine>(Singleton);
}
示例12: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<Sim>(AskToJoinSkinnyDipping.Singleton);
}
示例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();
}
示例14: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<UberToilet>(PrivacyInteraction.Singleton);
interactions.Replace<UberToilet, UberToilet.UseToilet.Definition>(Singleton);
}
示例15: AddInteraction
public void AddInteraction(Common.InteractionInjectorList interactions)
{
interactions.Add<CraftersConsignment>(BuyFoodSingleton);
}