public void Close() { IDisposable disposable = JitHelpers.UnsafeCast <IDisposable>(this); disposable.Dispose(); }
internal void Clear() { IBindableVector _this = JitHelpers.UnsafeCast <IBindableVector>(this); _this.Clear(); }
internal IBindableIterator First_Stub() { IEnumerable _this = JitHelpers.UnsafeCast <IEnumerable>(this); return(new EnumeratorToIteratorAdapter <object>(new NonGenericToGenericEnumerator(_this.GetEnumerator()))); }
internal void Add <T>(T item) { IVector <T> vector = JitHelpers.UnsafeCast <IVector <T> >(this); vector.Append(item); }
// void Clear() internal void Clear <K, V>() { IDictionary <K, V> _this = JitHelpers.UnsafeCast <IDictionary <K, V> >(this); _this.Clear(); }
// void Append(object value) internal void Append(object value) { IList _this = JitHelpers.UnsafeCast <IList>(this); _this.Add(value); }
// uint Size { get } internal uint Size() { IList _this = JitHelpers.UnsafeCast <IList>(this); return((uint)_this.Count); }
internal IEnumerator <T> GetEnumerator <T>() { return(new SZGenericArrayEnumerator <T>(JitHelpers.UnsafeCast <T[]>(this))); }
private int IndexOf <T>(T value) { return(Array.IndexOf <T>(JitHelpers.UnsafeCast <T[]>(this), value)); }
private bool Contains <T>(T value) { return(Array.IndexOf <T>(JitHelpers.UnsafeCast <T[]>(this), value) != -1); }
internal int get_Count <T>() { return(JitHelpers.UnsafeCast <T[]>(this).Length); }
internal uint GetMany <T>(uint startIndex, T[] items) { IList <T> _this = JitHelpers.UnsafeCast <IList <T> >(this); return(GetManyHelper <T>(_this, startIndex, items)); }
internal void Append <T>(T value) { IList <T> _this = JitHelpers.UnsafeCast <IList <T> >(this); _this.Add(value); }
internal IEnumerator GetEnumerator_Stub() { return((IEnumerator) new IteratorToEnumeratorAdapter <object>((IIterator <object>) new BindableIterableToEnumerableAdapter.NonGenericToGenericIterator(JitHelpers.UnsafeCast <IBindableIterable>((object)this).First()))); }
// uint Size { get } internal uint Size <T>() { IReadOnlyList <T> _this = JitHelpers.UnsafeCast <IReadOnlyList <T> >(this); return((uint)_this.Count); }
internal void Clear() { IBindableVector bindableVector = JitHelpers.UnsafeCast <IBindableVector>(this); bindableVector.Clear(); }
// equals returns true IIF the delegate is not null and has the // same target, method and invocation list as this object public override sealed bool Equals(Object obj) { if (obj == null) { return(false); } if (object.ReferenceEquals(this, obj)) { return(true); } if (!InternalEqualTypes(this, obj)) { return(false); } // Since this is a MulticastDelegate and we know // the types are the same, obj should also be a // MulticastDelegate Debug.Assert(obj is MulticastDelegate, "Shouldn't have failed here since we already checked the types are the same!"); var d = JitHelpers.UnsafeCast <MulticastDelegate>(obj); if (_invocationCount != (IntPtr)0) { // there are 4 kind of delegate kinds that fall into this bucket // 1- Multicast (_invocationList is Object[]) // 2- Secure/Wrapper (_invocationList is Delegate) // 3- Unmanaged FntPtr (_invocationList == null) // 4- Open virtual (_invocationCount == MethodDesc of target, _invocationList == null, LoaderAllocator, or DynamicResolver) if (InvocationListLogicallyNull()) { if (IsUnmanagedFunctionPtr()) { if (!d.IsUnmanagedFunctionPtr()) { return(false); } return(CompareUnmanagedFunctionPtrs(this, d)); } // now we know 'this' is not a special one, so we can work out what the other is if ((d._invocationList as Delegate) != null) { // this is a secure/wrapper delegate so we need to unwrap and check the inner one return(Equals(d._invocationList)); } return(base.Equals(obj)); } else { if ((_invocationList as Delegate) != null) { // this is a secure/wrapper delegate so we need to unwrap and check the inner one return(_invocationList.Equals(obj)); } else { Debug.Assert((_invocationList as Object[]) != null, "empty invocation list on multicast delegate"); return(InvocationListEquals(d)); } } } else { // among the several kind of delegates falling into this bucket one has got a non // empty _invocationList (open static with special sig) // to be equals we need to check that _invocationList matches (both null is fine) // and call the base.Equals() if (!InvocationListLogicallyNull()) { if (!_invocationList.Equals(d._invocationList)) { return(false); } return(base.Equals(d)); } // now we know 'this' is not a special one, so we can work out what the other is if ((d._invocationList as Delegate) != null) { // this is a secure/wrapper delegate so we need to unwrap and check the inner one return(Equals(d._invocationList)); } // now we can call on the base return(base.Equals(d)); } }
internal void Clear <T>() { IVector <T> _this = JitHelpers.UnsafeCast <IVector <T> >(this); _this.Clear(); }
// void Clear() internal void Clear() { IList _this = JitHelpers.UnsafeCast <IList>(this); _this.Clear(); }
public void Close() { JitHelpers.UnsafeCast <IDisposable>((object)this).Dispose(); }
// IBindableVectorView GetView() internal IBindableVectorView GetView() { IList _this = JitHelpers.UnsafeCast <IList>(this); return(new ListToBindableVectorViewAdapter(_this)); }
public void Close() { IDisposable _this = JitHelpers.UnsafeCast <IDisposable>(this); _this.Dispose(); }
internal void Clear <T>() { IVector <T> vector = JitHelpers.UnsafeCast <IVector <T> >(this); vector.Clear(); }
private void Dispose() { IClosable _this = JitHelpers.UnsafeCast <IClosable>(this); _this.Close(); }
// bool HasKey(K key) internal bool HasKey <K, V>(K key) { IDictionary <K, V> _this = JitHelpers.UnsafeCast <IDictionary <K, V> >(this); return(_this.ContainsKey(key)); }
internal IEnumerator GetEnumerator_Stub() { IBindableIterable _this = JitHelpers.UnsafeCast <IBindableIterable>(this); return(new IteratorToEnumeratorAdapter <object>(new NonGenericToGenericIterator(_this.First()))); }
internal IIterator <T> First_Stub <T>() { IEnumerable <T> _this = JitHelpers.UnsafeCast <IEnumerable <T> >(this); return(new EnumeratorToIteratorAdapter <T>(_this.GetEnumerator())); }
internal IEnumerator <T> GetEnumerator_Stub <T>() { IIterable <T> _this = JitHelpers.UnsafeCast <IIterable <T> >(this); return(new IteratorToEnumeratorAdapter <T>(_this.First())); }
// uint Size { get } internal uint Size <K, V>() { IReadOnlyDictionary <K, V> _this = JitHelpers.UnsafeCast <IReadOnlyDictionary <K, V> >(this); return((uint)_this.Count); }
private void Execute(object parameter) { ICommand _this = JitHelpers.UnsafeCast <ICommand>(this); _this.Execute(parameter); }