Esempio n. 1
0
 public BundleDelta(IBundleMetadata bundleMetadata, BundleDeltaType deltaType)
 {
     AssertUtility.ArgumentNotNull(bundleMetadata, "bundleMetadata");
     AssertUtility.EnumDefined(typeof(BundleDeltaType), deltaType, "deltaType");
     this.Bundle = bundleMetadata;
     this.Type   = deltaType;
 }
Esempio n. 2
0
        public IBundleDelta[] GetChanges(BundleDeltaType deltaType, bool exact)
        {
            List <IBundleDelta> list = new List <IBundleDelta>();

            for (int i = 0; i < this._changes.Count; i++)
            {
                if (!exact)
                {
                    if ((this._changes[i].Type & deltaType) != BundleDeltaType.Added)
                    {
                        list.Add(this._changes[i]);
                    }
                }
                else if (this._changes[i].Type == deltaType)
                {
                    list.Add(this._changes[i]);
                }
            }
            if (list.Count != 0)
            {
                return(list.ToArray());
            }
            return(null);
        }