本文整理汇总了C#中DBObjectStream.ContainsUndefinedAttribute方法的典型用法代码示例。如果您正苦于以下问题:C# DBObjectStream.ContainsUndefinedAttribute方法的具体用法?C# DBObjectStream.ContainsUndefinedAttribute怎么用?C# DBObjectStream.ContainsUndefinedAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBObjectStream
的用法示例。
在下文中一共展示了DBObjectStream.ContainsUndefinedAttribute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyAssignUndefinedAttribute
private Exceptional<Tuple<String, TypeAttribute, IObject>> ApplyAssignUndefinedAttribute(DBContext myDBContext, DBObjectStream myDBObjectStream, GraphDBType myGraphDBType)
{
Dictionary<String, Tuple<TypeAttribute, IObject>> attrsForResult = new Dictionary<String, Tuple<TypeAttribute, IObject>>();
#region undefined attributes
var newValue = GetValueForAttribute(myDBObjectStream, myDBContext, myGraphDBType);
if (newValue.Failed())
{
return new Exceptional<Tuple<string, TypeAttribute, IObject>>(newValue);
}
if (myDBObjectStream.ContainsUndefinedAttribute(AttributeIDChain.UndefinedAttribute, myDBContext.DBObjectManager))
{
var removeResult =myDBObjectStream.RemoveUndefinedAttribute(AttributeIDChain.UndefinedAttribute, myDBContext.DBObjectManager);
if (removeResult.Failed())
{
return new Exceptional<Tuple<string, TypeAttribute, IObject>>(removeResult);
}
}
//TODO: change this to a more handling thing than KeyValuePair
var addExcept = myDBContext.DBObjectManager.AddUndefinedAttribute(AttributeIDChain.UndefinedAttribute, newValue.Value, myDBObjectStream);
if (addExcept.Failed())
{
return new Exceptional<Tuple<String, TypeAttribute, IObject>>(addExcept);
}
//sthChanged = true;
attrsForResult.Add(AttributeIDChain.UndefinedAttribute, new Tuple<TypeAttribute, IObject>(null, newValue.Value));
#endregion
return new Exceptional<Tuple<String, TypeAttribute, IObject>>(new Tuple<String, TypeAttribute, IObject>(AttributeIDChain.UndefinedAttribute, AttributeIDChain.LastAttribute, newValue.Value));
}