-
-
Save justinyoo/13a0f7179bb2350fe835 to your computer and use it in GitHub Desktop.
CRM 2015 Filtering Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class FilterItemCollection : IFilterItemCollection | |
{ | |
protected FilterItemCollection(string filename) | |
{ | |
this.Initialise(filename); | |
} | |
protected Filter Filter { get; set; } | |
... | |
public bool IsValidEntity(string entityName) | |
{ | |
var isValid = this.Filter | |
.Items | |
.Exists(p => p.Equals(entityName, StringComparison.InvariantCultureIgnoreCase)); | |
return isValid; | |
} | |
protected abstract void OnInitialising(string filename); | |
private void Initialise(string filename) | |
{ | |
this.OnInitialising(filename); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment