コード例 #1
0
        public void TestRemoveFromSingleSemibinding()
        {
            semibinding.constraint = BindingConstraintType.ONE;

            ClassWithConstructorParameters o = new ClassWithConstructorParameters(42, "abc");

            semibinding.Add(o);

            ClassWithConstructorParameters value = semibinding.value as ClassWithConstructorParameters;

            Assert.AreEqual(o, value);
            Assert.AreEqual(42, value.intValue);

            semibinding.Remove(o);

            Assert.IsNull(semibinding.value);
        }
コード例 #2
0
 /// Remove the promise to supply this binding to Type type
 public IInjectionBinding Unsupply(Type type)
 {
     supplyList.Remove(type);
     return(this);
 }
コード例 #3
0
 virtual public void RemoveName(object o)
 {
     _name.Remove(o);
 }
コード例 #4
0
 virtual public void RemoveValue(object o)
 {
     _value.Remove(o);
 }
コード例 #5
0
 virtual public void RemoveKey(object o)
 {
     _key.Remove(o);
 }