コード例 #1
0
        Remove <T>(System.Collections.Generic.ICollection <T> collection, T entry)
        {
            // Imitate Java List.remove.
            bool hadValue = collection.Contains(entry);

            collection.Remove(entry);
            return(hadValue);
        }
        static StackObject *Remove_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @item = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Collections.Generic.ICollection <System.Int32> instance_of_this_method = (System.Collections.Generic.ICollection <System.Int32>) typeof(System.Collections.Generic.ICollection <System.Int32>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Remove(@item);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }
コード例 #3
0
ファイル: Notifier.cs プロジェクト: jiowchern/Regulus.Remote
 void IObjectAccessible.Remove(object instance)
 {
     _Collection.Remove((T)instance);
 }
コード例 #4
0
 public bool Remove(object @object)
 {
     return(collection.Remove((T)@object));
 }