summaryrefslogtreecommitdiff
path: root/csharp/src/Ice/SliceChecksums.cs
blob: 9c6004026437fdee9512a6e7012ae377544c9605 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// **********************************************************************
//
// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

namespace Ice
{

    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Reflection;

    public sealed class SliceChecksums
    {
        public static Dictionary<string, string> checksums = new Dictionary<string, string>();

#if !COMPACT && !SILVERLIGHT
        static SliceChecksums()
        {
            Type[] types = IceInternal.AssemblyUtil.findTypesWithPrefix("IceInternal.SliceChecksums");
            foreach(Type t in types)
            {
                FieldInfo f = t.GetField("map", BindingFlags.Public | BindingFlags.Static);
                Hashtable map = (Hashtable)f.GetValue(null);
                foreach(DictionaryEntry entry in map)
                {
                    checksums.Add((string)entry.Key, (string)entry.Value);
                }
            }
        }
#endif
    }

}