Ejemplo n.º 1
0
        internal Literacy(TypeInfo info, bool ignoreCase)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info");
            }

            TypeInfo       = info;
            Type           = info.Type;
            _CallNewObject = PreNewObject;
            Property       = new ObjectPropertyCollection(ignoreCase);
            foreach (var p in Type.GetProperties(BindingFlags.Public | BindingFlags.Instance))
            {
                if (p.GetIndexParameters().Length == 0) //排除索引器
                {
                    if (!Property.ContainsKey(p.Name))
                    {
                        var a = new ObjectProperty(p);
                        Property.Add(a);
                    }
                }
            }
            ID        = Interlocked.Increment(ref Sequence);
            UID       = Guid.NewGuid();
            TypeCodes = info.TypeCodes;
        }