本文整理匯總了C#中sones.GraphDB.TypeManagement.BasicTypes.ADBBaseObject.SetValue方法的典型用法代碼示例。如果您正苦於以下問題:C# ADBBaseObject.SetValue方法的具體用法?C# ADBBaseObject.SetValue怎麽用?C# ADBBaseObject.SetValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sones.GraphDB.TypeManagement.BasicTypes.ADBBaseObject
的用法示例。
在下文中一共展示了ADBBaseObject.SetValue方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ApplyParams
public override void ApplyParams(params EdgeTypeParamDefinition[] myParams)
{
if (myParams.Count() == 0)
throw new GraphDBException(new Error_EdgeParameterCountMismatch(EdgeTypeName, 0, 1));
// The first parameter has to be the type
if (myParams[0].Type != ParamType.GraphType)
{
throw new GraphDBException(new Error_DataTypeDoesNotMatch(myParams[0].Type.ToString(), "BaseType like 'Integer', 'Double, etc"));
}
else
{
_CountBy = myParams[0].Param as ADBBaseObject;
}
_Count = _CountBy.Clone();
_Count.SetValue(DBObjectInitializeType.Default);
#region Get default node if exists
if (myParams.Any(p => p.Type == ParamType.DefaultValueDef))
{
var def = (from p in myParams where p.Type == ParamType.DefaultValueDef select p).First();
if (_CountBy.IsValidValue(def.Param))
{
_CountBy.SetValue(def.Param);
}
else
{
throw new GraphDBException(new Error_DataTypeDoesNotMatch(_CountBy.ObjectName, def.Param.GetType().Name));
}
}
else
{
_CountBy.SetValue(1);
}
#endregion
CalcEstimatedSize(this);
}