示例#1
0
        public PolicyRuleImpl WithBlobTypeToFilterFor(BlobTypes blobType)
        {
            List <String> blobTypesToFilterFor = this.inner.Definition.Filters.BlobTypes as List <String>;

            if (blobTypesToFilterFor == null)
            {
                blobTypesToFilterFor = new List <String>();
            }
            if (blobTypesToFilterFor.Contains(blobType.ToString()))
            {
                return(this);
            }
            blobTypesToFilterFor.Add(blobType.ToString());
            this.inner.Definition.Filters.BlobTypes = blobTypesToFilterFor;
            return(this);
        }
示例#2
0
        public PolicyRule.Update.IUpdate WithBlobTypeToFilterForRemoved(BlobTypes blobType)
        {
            List <String> blobTypesToFilterFor = this.inner.Definition.Filters.BlobTypes as List <String>;

            blobTypesToFilterFor.Remove(blobType.ToString());
            this.inner.Definition.Filters.BlobTypes = blobTypesToFilterFor;
            return(this);
        }