public void Dispose() { if (Interlocked.Decrement(ref refCount) <= 0) { Inner.Clear(); } }
public void Clear() { if (inner != null) { Inner.Clear(); } }
private void Purge() { if (this.compilation is null) { if (RefCount == 0) { Inner.Clear(); } return; } lock (this.gate) { if (this.compilation is null) { return; } if (Interlocked.Decrement(ref RefCount) > 0) { foreach (var tree in this.compilation.SyntaxTrees) { Inner.TryRemove(tree, out _); } } else { Inner.Clear(); } this.compilation = null; } }
public void Clear() { if (inner == null) { inner = this.query.ToList(); } Inner.Clear(); }
public void Clear() { Lock.EnterWriteLock(); try { Inner.Clear(); } catch { Lock.ExitWriteLock(); } }
public static void Main() { MultiHashDictionary <int, string, Inner> mdict = new MultiHashDictionary <int, string, Inner> { { 2, "to" }, { 2, "deux" }, { 2, "two" }, { 20, "tyve" }, { 20, "tyve" }, { 20, "twenty" } }; Console.WriteLine(mdict); Console.WriteLine("mdict.Count is {0}", mdict.Count); Console.WriteLine("mdict.Count (keys) is {0}", ((IDictionary <int, Inner>)mdict).Count); Console.WriteLine("mdict[2].Count is {0}", mdict[2].Count); mdict.Remove(20, "tyve"); mdict.Remove(20, "twenty"); Console.WriteLine(mdict); Console.WriteLine("mdict.Count is {0}", mdict.Count); Inner zwei = new Inner { "zwei" }; mdict[2] = zwei; mdict[-2] = zwei; Console.WriteLine(mdict); Console.WriteLine("mdict.Count is {0}", mdict.Count); zwei.Add("kaksi"); Console.WriteLine(mdict); Console.WriteLine("mdict.Count is {0}", mdict.Count); Inner empty = new Inner(); mdict[0] = empty; Console.WriteLine(mdict); Console.WriteLine("mdict.Count is {0}", mdict.Count); Console.WriteLine("mdict contains key 0: {0}", mdict.Contains(0)); mdict.Remove(-2); Console.WriteLine(mdict); Console.WriteLine("mdict.Count is {0}", mdict.Count); zwei.Remove("kaksi"); Console.WriteLine(mdict); Console.WriteLine("mdict.Count is {0}", mdict.Count); zwei.Clear(); Console.WriteLine(mdict); Console.WriteLine("mdict.Count is {0}", mdict.Count); }
public override bool Clear() { using (var @lock = new MonitorLockScope(SyncRoot, AccessTimeout)) { if ([email protected]) { if (g_traceInfo.IsWarningEnabled) { TraceHelper.TraceWarning(g_traceInfo, "{0} - Clear timed out", Name); } return(false); } return(Inner.Clear()); } }
public override void Clear() { Inner.Clear(); }
/// <inheritdoc cref="SortedSet{T}.Clear"/> public void Clear() { Set.Clear(); Inner.Clear(); }
/// <summary> /// Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1"/>. /// </summary> /// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. </exception> public virtual void Clear() { Inner.Clear(); }
public override void Clear() { m_owner.SetDirty(); Inner.Clear(); }
public void Clear() { Inner.Clear(); }
public override void Clear() { Inner.Clear(); Inner = null; }
/// <summary> /// Очищает вывод, например, окно. /// Надо переопределить в потомке. /// </summary> public override AbstractOutput Clear() { Inner.Clear(); return(this); }
public virtual bool Clear() { return(Inner.Clear()); }