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); }
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); }