public override Exceptional<FuncParameter> ExecFunc(DBContext dbContext, params FuncParameter[] myParams) { var result = new Exceptional<FuncParameter>(); if (!(CallingObject is EdgeTypeWeighted)) { return result.PushIErrorT(new Error_FunctionParameterTypeMismatch(typeof(EdgeTypeWeighted), CallingObject.GetType())); } result.Value = new FuncParameter(((EdgeTypeWeighted)CallingObject).GetMaxWeight()); return result; }
public override Exceptional<FuncParameter> ExecFunc(DBContext dbContext, params FuncParameter[] myParams) { var pResult = new Exceptional<FuncParameter>(); if (CallingObject is IListOrSetEdgeType) { pResult.Value = new FuncParameter(new DBUInt64(((IListOrSetEdgeType)CallingObject).Count())); } else if (CallingObject is ASingleReferenceEdgeType) { pResult.Value = new FuncParameter(new DBUInt64(1)); } else if (CallingObject is IEnumerable<ObjectUUID>) { pResult.Value = new FuncParameter(new DBUInt64((CallingObject as IEnumerable<ObjectUUID>).LongCount())); } else { return pResult.PushIErrorT(new Error_FunctionParameterTypeMismatch(typeof(IEdgeType), CallingObject.GetType())); } return pResult; }