157 lines
3.8 KiB
C#
157 lines
3.8 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Google.Protobuf.Collections
|
|
{
|
|
// Token: 0x02000070 RID: 112
|
|
internal sealed class ReadOnlyDictionary<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
|
|
{
|
|
// Token: 0x06000633 RID: 1587 RVA: 0x00015996 File Offset: 0x00013B96
|
|
public ReadOnlyDictionary(IDictionary<TKey, TValue> wrapped)
|
|
{
|
|
this.wrapped = wrapped;
|
|
}
|
|
|
|
// Token: 0x06000634 RID: 1588 RVA: 0x000159A5 File Offset: 0x00013BA5
|
|
public void Add(TKey key, TValue value)
|
|
{
|
|
throw new InvalidOperationException();
|
|
}
|
|
|
|
// Token: 0x06000635 RID: 1589 RVA: 0x000159AC File Offset: 0x00013BAC
|
|
public bool ContainsKey(TKey key)
|
|
{
|
|
return this.wrapped.ContainsKey(key);
|
|
}
|
|
|
|
// Token: 0x170001C0 RID: 448
|
|
// (get) Token: 0x06000636 RID: 1590 RVA: 0x000159BA File Offset: 0x00013BBA
|
|
public ICollection<TKey> Keys
|
|
{
|
|
get
|
|
{
|
|
return this.wrapped.Keys;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000637 RID: 1591 RVA: 0x000159A5 File Offset: 0x00013BA5
|
|
public bool Remove(TKey key)
|
|
{
|
|
throw new InvalidOperationException();
|
|
}
|
|
|
|
// Token: 0x06000638 RID: 1592 RVA: 0x000159C7 File Offset: 0x00013BC7
|
|
public bool TryGetValue(TKey key, out TValue value)
|
|
{
|
|
return this.wrapped.TryGetValue(key, out value);
|
|
}
|
|
|
|
// Token: 0x170001C1 RID: 449
|
|
// (get) Token: 0x06000639 RID: 1593 RVA: 0x000159D6 File Offset: 0x00013BD6
|
|
public ICollection<TValue> Values
|
|
{
|
|
get
|
|
{
|
|
return this.wrapped.Values;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170001C2 RID: 450
|
|
public TValue this[TKey key]
|
|
{
|
|
get
|
|
{
|
|
return this.wrapped[key];
|
|
}
|
|
set
|
|
{
|
|
throw new InvalidOperationException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600063C RID: 1596 RVA: 0x000159A5 File Offset: 0x00013BA5
|
|
public void Add(KeyValuePair<TKey, TValue> item)
|
|
{
|
|
throw new InvalidOperationException();
|
|
}
|
|
|
|
// Token: 0x0600063D RID: 1597 RVA: 0x000159A5 File Offset: 0x00013BA5
|
|
public void Clear()
|
|
{
|
|
throw new InvalidOperationException();
|
|
}
|
|
|
|
// Token: 0x0600063E RID: 1598 RVA: 0x000159F1 File Offset: 0x00013BF1
|
|
public bool Contains(KeyValuePair<TKey, TValue> item)
|
|
{
|
|
return this.wrapped.Contains(item);
|
|
}
|
|
|
|
// Token: 0x0600063F RID: 1599 RVA: 0x000159FF File Offset: 0x00013BFF
|
|
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
|
|
{
|
|
this.wrapped.CopyTo(array, arrayIndex);
|
|
}
|
|
|
|
// Token: 0x170001C3 RID: 451
|
|
// (get) Token: 0x06000640 RID: 1600 RVA: 0x00015A0E File Offset: 0x00013C0E
|
|
public int Count
|
|
{
|
|
get
|
|
{
|
|
return this.wrapped.Count;
|
|
}
|
|
}
|
|
|
|
// Token: 0x170001C4 RID: 452
|
|
// (get) Token: 0x06000641 RID: 1601 RVA: 0x0000324B File Offset: 0x0000144B
|
|
public bool IsReadOnly
|
|
{
|
|
get
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000642 RID: 1602 RVA: 0x000159A5 File Offset: 0x00013BA5
|
|
public bool Remove(KeyValuePair<TKey, TValue> item)
|
|
{
|
|
throw new InvalidOperationException();
|
|
}
|
|
|
|
// Token: 0x06000643 RID: 1603 RVA: 0x00015A1B File Offset: 0x00013C1B
|
|
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
|
|
{
|
|
return this.wrapped.GetEnumerator();
|
|
}
|
|
|
|
// Token: 0x06000644 RID: 1604 RVA: 0x00015A28 File Offset: 0x00013C28
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return this.wrapped.GetEnumerator();
|
|
}
|
|
|
|
// Token: 0x06000645 RID: 1605 RVA: 0x00015A35 File Offset: 0x00013C35
|
|
public override bool Equals(object obj)
|
|
{
|
|
return this.wrapped.Equals(obj);
|
|
}
|
|
|
|
// Token: 0x06000646 RID: 1606 RVA: 0x00015A43 File Offset: 0x00013C43
|
|
public override int GetHashCode()
|
|
{
|
|
return this.wrapped.GetHashCode();
|
|
}
|
|
|
|
// Token: 0x06000647 RID: 1607 RVA: 0x00015A50 File Offset: 0x00013C50
|
|
public override string ToString()
|
|
{
|
|
return this.wrapped.ToString();
|
|
}
|
|
|
|
// Token: 0x04000268 RID: 616
|
|
private readonly IDictionary<TKey, TValue> wrapped;
|
|
}
|
|
}
|