Add source files
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace cakeslice
|
||||
{
|
||||
// Token: 0x02000114 RID: 276
|
||||
public class LinkedSetGlow<T> : IEnumerable<T>, IEnumerable
|
||||
{
|
||||
// Token: 0x0600168A RID: 5770 RVA: 0x0019F286 File Offset: 0x0019D486
|
||||
public LinkedSetGlow()
|
||||
{
|
||||
this.list = new LinkedList<T>();
|
||||
this.dictionary = new Dictionary<T, LinkedListNode<T>>();
|
||||
}
|
||||
|
||||
// Token: 0x0600168B RID: 5771 RVA: 0x0019F2A4 File Offset: 0x0019D4A4
|
||||
public LinkedSetGlow(IEqualityComparer<T> comparer)
|
||||
{
|
||||
this.list = new LinkedList<T>();
|
||||
this.dictionary = new Dictionary<T, LinkedListNode<T>>(comparer);
|
||||
}
|
||||
|
||||
// Token: 0x0600168C RID: 5772 RVA: 0x0019F2C4 File Offset: 0x0019D4C4
|
||||
public bool Add(T t)
|
||||
{
|
||||
if (this.dictionary.ContainsKey(t))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
LinkedListNode<T> linkedListNode = this.list.AddLast(t);
|
||||
this.dictionary.Add(t, linkedListNode);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x0600168D RID: 5773 RVA: 0x0019F2FC File Offset: 0x0019D4FC
|
||||
public bool Remove(T t)
|
||||
{
|
||||
LinkedListNode<T> linkedListNode;
|
||||
if (this.dictionary.TryGetValue(t, out linkedListNode))
|
||||
{
|
||||
this.dictionary.Remove(t);
|
||||
this.list.Remove(linkedListNode);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x0600168E RID: 5774 RVA: 0x0019F335 File Offset: 0x0019D535
|
||||
public void Clear()
|
||||
{
|
||||
this.list.Clear();
|
||||
this.dictionary.Clear();
|
||||
}
|
||||
|
||||
// Token: 0x0600168F RID: 5775 RVA: 0x0019F34D File Offset: 0x0019D54D
|
||||
public bool Contains(T t)
|
||||
{
|
||||
return this.dictionary.ContainsKey(t);
|
||||
}
|
||||
|
||||
// Token: 0x1700005E RID: 94
|
||||
// (get) Token: 0x06001690 RID: 5776 RVA: 0x0019F35B File Offset: 0x0019D55B
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001691 RID: 5777 RVA: 0x0019F368 File Offset: 0x0019D568
|
||||
public IEnumerator<T> GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06001692 RID: 5778 RVA: 0x0019F37A File Offset: 0x0019D57A
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x0400269D RID: 9885
|
||||
private LinkedList<T> list;
|
||||
|
||||
// Token: 0x0400269E RID: 9886
|
||||
private Dictionary<T, LinkedListNode<T>> dictionary;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user