public IndexHint(IndexHintAction hintAction, IndexHintType hintType, IndexHintScope hintScope, IList<string> indexList) { if (hintAction == IndexHintAction.None) { throw new ArgumentException("index hint hintAction is null"); } if (hintType == IndexHintType.None) { throw new ArgumentException("index hint hintType is null"); } if (hintScope == IndexHintScope.None) { throw new ArgumentException("index hint hintScope is null"); } HintAction = hintAction; IndexType = hintType; HintScope = hintScope; if (indexList == null || indexList.IsEmpty()) { IndexList = new List<string>(0); } else if (indexList is List<string>) { IndexList = indexList; } else { IndexList = new List<string>(indexList); } }
public IndexHint(IndexHintAction hintAction, IndexHintType hintType, IndexHintScope hintScope, IList <string> indexList) { if (hintAction == IndexHintAction.None) { throw new ArgumentException("index hint hintAction is null"); } if (hintType == IndexHintType.None) { throw new ArgumentException("index hint hintType is null"); } if (hintScope == IndexHintScope.None) { throw new ArgumentException("index hint hintScope is null"); } HintAction = hintAction; IndexType = hintType; HintScope = hintScope; if (indexList == null || indexList.IsEmpty()) { IndexList = new List <string>(0); } else if (indexList is List <string> ) { IndexList = indexList; } else { IndexList = new List <string>(indexList); } }