/// <summary> /// Returns True if the table refers that view /// </summary> /// <param name="viewName"></param> /// <returns></returns> internal protected bool IsViewReferenced(string viewName) { if (string.IsNullOrEmpty(viewName)) { return(false); } if (!string.IsNullOrEmpty(ViewName) && ViewName.Equals(viewName, StringComparison.OrdinalIgnoreCase)) { return(true); } // Check partition map if (string.IsNullOrEmpty(PartitionOnProperty) || PartitionsToViewMap == null) { return(false); } KeyValuePair <string, string> entry = PartitionsToViewMap.FirstOrDefault(x => x.Value.Equals(viewName, StringComparison.OrdinalIgnoreCase)); if (entry.Equals(default(KeyValuePair <string, string>))) { return(false); } return(!string.IsNullOrEmpty(entry.Key)); }
private ValueTuple <bool, SampleTreeViewAdapter> getSampleTreeViewAdapter(ViewName _viewName) { var tmp = allItemRec(this).FirstOrDefault(x => _viewName.Equals(x.SampleViewName)); return((tmp == null) ? (false, null) : (true, tmp)); }