本文整理汇总了C#中IConceptInfo.GetKeywordOrTypeName方法的典型用法代码示例。如果您正苦于以下问题:C# IConceptInfo.GetKeywordOrTypeName方法的具体用法?C# IConceptInfo.GetKeywordOrTypeName怎么用?C# IConceptInfo.GetKeywordOrTypeName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IConceptInfo
的用法示例。
在下文中一共展示了IConceptInfo.GetKeywordOrTypeName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckIfPropertyBelongsToDataStructure
public static void CheckIfPropertyBelongsToDataStructure(PropertyInfo property, DataStructureInfo dataStructure, IConceptInfo errorContext)
{
if (property.DataStructure != dataStructure)
throw new Exception(String.Format(
"Invalid use of " + errorContext.GetKeywordOrTypeName() + ": Property {0}.{1}.{2} is not in data structure {3}.{4}.",
property.DataStructure.Module.Name,
property.DataStructure.Name,
property.Name,
dataStructure.Module.Name,
dataStructure.Name));
}
示例2: GetDependsOnWriteableDataStructure
private static void GetDependsOnWriteableDataStructure(DataStructureInfo dataStructure, List<DataStructureInfo> dependencies, IEnumerable<IConceptInfo> allConcepts, IConceptInfo errorContext, HashSet<string> done)
{
var conceptKey = dataStructure.GetKey();
if (done.Contains(conceptKey))
return;
done.Add(conceptKey);
if (dataStructure is EntityInfo)
dependencies.Add(dataStructure);
else if (dataStructure is SqlQueryableInfo)
{
var deps = allConcepts.OfType<SqlDependsOnDataStructureInfo>().Where(dep => dep.Dependent == dataStructure).ToArray();
foreach (var dep in deps)
GetDependsOnWriteableDataStructure(dep.DependsOn, dependencies, allConcepts, errorContext, done);
}
else
throw new DslSyntaxException(errorContext.GetKeywordOrTypeName()
+ " is not supported on dependency type '" + dataStructure.GetKeywordOrTypeName() + "'. "
+ errorContext.GetUserDescription() + " depends on " + dataStructure.GetUserDescription() + ".");
}