Пример #1
0
 public Type GetDynamicClass(IEnumerable<DynamicProperty> properties)
 {
     Type type2;
     this.rwLock.AcquireReaderLock(-1);
     try
     {
         Type type;
         System.Linq.Dynamic.Signature key = new System.Linq.Dynamic.Signature(properties);
         if (!this.classes.TryGetValue(key, out type))
         {
             type = this.CreateDynamicClass(key.properties);
             this.classes.Add(key, type);
         }
         type2 = type;
     }
     finally
     {
         this.rwLock.ReleaseReaderLock();
     }
     return type2;
 }
Пример #2
0
        public Type GetDynamicClass(IEnumerable <DynamicProperty> properties)
        {
            Type type2;

            this.rwLock.AcquireReaderLock(-1);
            try
            {
                Type type;
                System.Linq.Dynamic.Signature key = new System.Linq.Dynamic.Signature(properties);
                if (!this.classes.TryGetValue(key, out type))
                {
                    type = this.CreateDynamicClass(key.properties);
                    this.classes.Add(key, type);
                }
                type2 = type;
            }
            finally
            {
                this.rwLock.ReleaseReaderLock();
            }
            return(type2);
        }