Exemplo n.º 1
0
        public RawdataInfo GetFreeRawdataInfo(int rawLength)
        {
            Where w = new Where("IsFree", OperationType.Equal, true);

            w.StorageEngine     = this.storageEngine;
            w.ParentSqoTypeInfo = this.GetSqoTypeInfo();
            w.ParentType.Add(w.ParentSqoTypeInfo.Type);
            Where w1 = new Where("Length", OperationType.GreaterThanOrEqual, rawLength);

            w1.StorageEngine     = storageEngine;
            w1.ParentSqoTypeInfo = this.GetSqoTypeInfo();
            w1.ParentType.Add(w1.ParentSqoTypeInfo.Type);
            And and = new And();

            and.Add(w, w1);

            List <int> oids = and.GetOIDs();

            if (oids.Count > 0)
            {
                return(this.GetRawdataInfo(oids[0]));
            }

            return(null);
        }