• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# BasicTypes.ADBBaseObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中sones.GraphDB.TypeManagement.BasicTypes.ADBBaseObject的典型用法代码示例。如果您正苦于以下问题:C# ADBBaseObject类的具体用法?C# ADBBaseObject怎么用?C# ADBBaseObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ADBBaseObject类属于sones.GraphDB.TypeManagement.BasicTypes命名空间,在下文中一共展示了ADBBaseObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ParameterValue

 /// <summary>
 /// A single parameter
 /// </summary>
 /// <param name="myParameterName">The name of the parameter. Currently this is not used.</param>
 /// <param name="myParameterDBType">The DBType of the parameter</param>
 /// <param name="myVariableNumOfParams">True if this parameter occurs 1 or more time. This have to be the last parameter!</param>
 public ParameterValue(String myParameterName, ADBBaseObject myParameterDBType, Boolean myVariableNumOfParams)
     : this()
 {
     Name                = myParameterName;
     DBType              = myParameterDBType;
     VariableNumOfParams = myVariableNumOfParams;
 }
开发者ID:TheByte,项目名称:sones,代码行数:13,代码来源:ParameterValue.cs


示例2: IndexSingleOperation

        public override IEnumerable<ObjectUUID> IndexSingleOperation(AAttributeIndex myIndex, ADBBaseObject myOperationValue, AttributeUUID myAttributeUUID, TypesOfBinaryExpression typeOfBinExpr, DBContext dbContext)
        {
            IndexKey lookup = new IndexKey(myAttributeUUID, myOperationValue, myIndex.IndexKeyDefinition);
            var currentType = dbContext.DBTypeManager.GetTypeByUUID(myIndex.IndexRelatedTypeUUID);

            var result = myIndex.Contains(lookup, currentType, dbContext);
            if (result.Value)
            {
                var interestingUUIDs = myIndex.GetValues(lookup, currentType, dbContext);

                foreach (var aIndexValue in myIndex.GetAllValues(currentType, dbContext))
                {
                    foreach (var aUUID in aIndexValue)
                    {
                        if (!interestingUUIDs.Contains(aUUID))
                        {
                            yield return aUUID;
                        }
                    }
                }
            }
            else
            {
                foreach (var aIndexValue in myIndex.GetKeyValues(currentType, dbContext).Select(kv => kv.Value))
                {
                    foreach (var aUUID in aIndexValue)
                    {
                        yield return aUUID;
                    }
                }
            }

            yield break;
        }
开发者ID:Vadi,项目名称:sones,代码行数:34,代码来源:NotInOperator.cs


示例3: SetRefDefinition

        public SetRefDefinition(Structures.TupleDefinition tupleDefinition, ADBBaseObject[] myParameters)
        {
            System.Diagnostics.Debug.Assert(tupleDefinition != null);

            this.TupleDefinition = tupleDefinition;
            this.Parameters = myParameters;
        }
开发者ID:TheByte,项目名称:sones,代码行数:7,代码来源:SetRefDefinition.cs


示例4: IndexKey

 /// <summary>
 /// Adds a single ADBBaseObject to the IndexKex
 /// </summary>
 /// <param name="myAttributeUUID">AttributeUUID corresponding to the ADBBaseObject</param>
 /// <param name="myIndexKeyPayload">The ADBBaseObject that is going to be added</param>
 /// <param name="myIndexDefinition">The corresponding IndexKeyDefinition</param>
 public IndexKey(AttributeUUID myAttributeUUID, ADBBaseObject myIndexKeyPayload, IndexKeyDefinition myIndexDefinition)
 {
     if (!myIndexDefinition.IndexKeyAttributeUUIDs.Contains(myAttributeUUID))
     {
         throw new GraphDBException(new Error_IndexKeyCreationError(myAttributeUUID, myIndexKeyPayload, myIndexDefinition));
     }
     else
     {
         AddAAKey(myAttributeUUID, myIndexKeyPayload);
     }
 }
开发者ID:ipbi,项目名称:sones,代码行数:17,代码来源:IndexKey.cs


示例5: IndexSingleOperation

        public override IEnumerable<ObjectUUID> IndexSingleOperation(AAttributeIndex myIndex, ADBBaseObject myOperationValue, AttributeUUID myAttributeUUID, TypesOfBinaryExpression typeOfBinExpr, DBContext dbContext)
        {
            var myIndeyKey = new IndexKey(myAttributeUUID, myOperationValue, myIndex.IndexKeyDefinition);
            var currentType = dbContext.DBTypeManager.GetTypeByUUID(myIndex.IndexRelatedTypeUUID);

            if (myIndex.Contains(myIndeyKey, currentType, dbContext))
            {
                foreach (var aUUID in myIndex.GetValues(myIndeyKey, currentType, dbContext))
                {
                    yield return aUUID;
                }
            }

            yield break;
        }
开发者ID:TheByte,项目名称:sones,代码行数:15,代码来源:EqualsOperator.cs


示例6: 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);
        }
开发者ID:Vadi,项目名称:sones,代码行数:41,代码来源:EdgeTypeCounted.cs


示例7: IndexSingleOperation

        public virtual IEnumerable<ObjectUUID> IndexSingleOperation(AAttributeIndex myIndex, ADBBaseObject myOperationValue, AttributeUUID myAttributeUUID, TypesOfBinaryExpression typeOfBinExpr, DBContext dbContext)
        {
            foreach (var keyValPair in myIndex.GetKeyValues(dbContext.DBTypeManager.GetTypeByUUID(myIndex.IndexRelatedTypeUUID), dbContext))
            {
                var res = Compare(keyValPair.Key.IndexKeyValues[0], myOperationValue);

                if (res.Failed())
                {
                    throw new GraphDBException(res.PushIError(new Error_InvalidIndexOperation(myIndex.IndexName, keyValPair.Key.IndexKeyValues[0].Value, myOperationValue.Value)).IErrors);
                }

                if (res.Value)
                {
                    foreach (var aUUID in keyValPair.Value)
                    {
                        yield return aUUID;
                    }
                }
            }

            yield break;
        }
开发者ID:Vadi,项目名称:sones,代码行数:22,代码来源:ABinaryCompareOperator.cs


示例8: Sub

 public override void Sub(ADBBaseObject myGraphObject)
 {
 }
开发者ID:ipbi,项目名称:sones,代码行数:3,代码来源:DBType.cs


示例9: Contains

 /// <summary>
 /// Check for a containing element
 /// </summary>
 /// <param name="myValue"></param>
 /// <returns></returns>
 public override bool Contains(ADBBaseObject myValue)
 {
     return _Objects.Contains((ADBBaseObject)myValue);
 }
开发者ID:ipbi,项目名称:sones,代码行数:9,代码来源:EdgeTypeListOfBaseObjects.cs


示例10: Add

 /// <summary>
 /// Adds a new value with some optional parameters
 /// </summary>
 /// <param name="myValue"></param>
 /// <param name="myParameters"></param>
 public override void Add(ADBBaseObject myValue, params ADBBaseObject[] myParameters)
 {
     _Objects.Add(myValue);
 }
开发者ID:ipbi,项目名称:sones,代码行数:9,代码来源:EdgeTypeListOfBaseObjects.cs


示例11: Remove

 /// <summary>
 /// Remove a value
 /// </summary>
 /// <param name="myValue"></param>
 /// <returns></returns>
 public override Boolean Remove(ADBBaseObject myValue)
 {
     return _Objects.Remove((ADBBaseObject)myValue);
 }
开发者ID:ipbi,项目名称:sones,代码行数:9,代码来源:EdgeTypeListOfBaseObjects.cs


示例12: ConvertToBestMatchingTypeReverse

        private static Boolean ConvertToBestMatchingTypeReverse(ref ADBBaseObject myDBBaseObjectB, ref ADBBaseObject myDBBaseObjectA)
        {
            #region Both are not unknown

            if ((myDBBaseObjectA.Type != BasicType.Unknown) && (myDBBaseObjectB.Type != BasicType.Unknown))
            {

                #region Types matching, we can leave

                if (myDBBaseObjectA.Type == myDBBaseObjectB.Type)
                {
                    return true;
                }

                #endregion

                #region DBList and DBReference are not matchable with other types

                else if (myDBBaseObjectA is DBEdge || myDBBaseObjectA is DBReference || myDBBaseObjectB is DBEdge || myDBBaseObjectB is DBReference)
                {
                    return false;
                }

                #endregion

                #region The types does not match - so try to convert the right-handed to the left handed type

                else if (myDBBaseObjectA is DBUInt64)
                {
                    //
                    if (DBUInt64.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return true;
                    }
                    return false;
                }

                else if (myDBBaseObjectA is DBInt64)
                {
                    //
                    if (DBInt64.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return true;
                    }
                    // do not change to ConvertToBestMatchingType(ref myDBBaseObjectB, ref myDBBaseObjectA)
                    return false;
                }

                else if (myDBBaseObjectA is DBDouble)
                {
                    //
                    if (DBDouble.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return true;
                    }
                    return false;
                }

                else if (myDBBaseObjectA is DBDateTime)
                {
                    //
                    if (DBDateTime.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return true;
                    }
                    return false;
                }

                else if (myDBBaseObjectA is DBBoolean)
                {
                    //
                    if (DBDouble.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return true;
                    }
                    return false;
                }

                else if (myDBBaseObjectA is DBString)
                {
                    //
                    if (DBString.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return true;
                    }
                    return false;
                }

                #endregion

                // we couldnt find a matching type for both are not unknown
                return false;

            }
//.........这里部分代码省略.........
开发者ID:TheByte,项目名称:sones,代码行数:101,代码来源:GraphDBTypeMapper.cs


示例13: Remove

 /// <summary>
 /// Remove a value
 /// </summary>
 /// <param name="myValue"></param>
 /// <returns></returns>
 public abstract Boolean Remove(ADBBaseObject myValue);
开发者ID:ipbi,项目名称:sones,代码行数:6,代码来源:ASetOfBaseEdgeType.cs


示例14: Sub

 public override ADBBaseObject Sub(ADBBaseObject myGraphObjectA, ADBBaseObject myGraphObjectB)
 {
     throw new NotImplementedException();
 }
开发者ID:ipbi,项目名称:sones,代码行数:4,代码来源:DBNumber.cs


示例15: Error_EdgeParameterTypeMismatch

 public Error_EdgeParameterTypeMismatch(ADBBaseObject currentType, params ADBBaseObject[] expectedTypes)
 {
     CurrentType = currentType;
     ExpectedTypes = expectedTypes;
 }
开发者ID:TheByte,项目名称:sones,代码行数:5,代码来源:Error_EdgeParameterTypeMismatch.cs


示例16: Error_IndexKeyCreationError

 public Error_IndexKeyCreationError(AttributeUUID myAttributeUUID, ADBBaseObject myIndexKeyPayload, IndexKeyDefinition myIndexDefinition)
 {
     AttributeUUID = myAttributeUUID;
     IndexKeyPayload = myIndexKeyPayload;
     IndexDefinition = myIndexDefinition;
 }
开发者ID:TheByte,项目名称:sones,代码行数:6,代码来源:Error_IndexKeyCreationError.cs


示例17: Contains

 /// <summary>
 /// Check for a containing element
 /// </summary>
 /// <param name="myValue"></param>
 /// <returns></returns>
 public abstract Boolean Contains(ADBBaseObject myValue);
开发者ID:ipbi,项目名称:sones,代码行数:6,代码来源:ASetOfBaseEdgeType.cs


示例18: Add

 /// <summary>
 /// Adds a new value with some optional parameters
 /// </summary>
 /// <param name="myValue"></param>
 /// <param name="myParameters"></param>
 public abstract void Add(ADBBaseObject myValue, params ADBBaseObject[] myParameters);
开发者ID:ipbi,项目名称:sones,代码行数:6,代码来源:ASetOfBaseEdgeType.cs


示例19: Sub

 public override void Sub(ADBBaseObject myGraphObject)
 {
     _Value -= Convert.ToDouble(myGraphObject.Value);
 }
开发者ID:TheByte,项目名称:sones,代码行数:4,代码来源:DBDouble.cs


示例20: ConvertToBestMatchingType

        public static Exceptional<Boolean> ConvertToBestMatchingType(ref ADBBaseObject myDBBaseObjectA, ref ADBBaseObject myDBBaseObjectB)
        {
            #region Both are not unknown

            if ((myDBBaseObjectA.Type != BasicType.Unknown) && (myDBBaseObjectB.Type != BasicType.Unknown))
            {

                #region Types matching, we can leave

                if (myDBBaseObjectA.Type == myDBBaseObjectB.Type)
                {
                    return new Exceptional<Boolean>(true);
                }

                #endregion

                #region DBList and DBReference are not matchable with other types

                else if (myDBBaseObjectA is DBEdge || myDBBaseObjectB is DBEdge)
                {
                    return new Exceptional<Boolean>(false);
                }

                #endregion

                #region The types does not match - so try to convert the right-handed to the left handed type

                else if (myDBBaseObjectA is DBUInt64)
                {
                    //
                    if (DBUInt64.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return new Exceptional<Boolean>(true);
                    }
                    return new Exceptional<Boolean>(ConvertToBestMatchingTypeReverse(ref myDBBaseObjectA, ref myDBBaseObjectB));
                }

                else if (myDBBaseObjectA is DBInt64)
                {
                    //
                    if (DBInt64.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return new Exceptional<Boolean>(true);
                    }
                    return new Exceptional<Boolean>(ConvertToBestMatchingTypeReverse(ref myDBBaseObjectA, ref myDBBaseObjectB));
                }

                else if (myDBBaseObjectA is DBInt32)
                {
                    //
                    if (DBInt32.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return new Exceptional<Boolean>(true);
                    }
                    return new Exceptional<Boolean>(ConvertToBestMatchingTypeReverse(ref myDBBaseObjectA, ref myDBBaseObjectB));
                }

                else if (myDBBaseObjectA is DBDouble)
                {
                    //
                    if (DBDouble.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return new Exceptional<Boolean>(true);
                    }
                    return new Exceptional<Boolean>(ConvertToBestMatchingTypeReverse(ref myDBBaseObjectA, ref myDBBaseObjectB));
                }

                else if (myDBBaseObjectA is DBDateTime)
                {
                    //
                    if (DBDateTime.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return new Exceptional<Boolean>(true);
                    }
                    return new Exceptional<Boolean>(ConvertToBestMatchingTypeReverse(ref myDBBaseObjectA, ref myDBBaseObjectB));
                }

                else if (myDBBaseObjectA is DBBoolean)
                {
                    //
                    if (DBBoolean.IsValid(myDBBaseObjectB.Value))
                    {
                        myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
                        return new Exceptional<Boolean>(true);
                    }
                    return new Exceptional<Boolean>(ConvertToBestMatchingTypeReverse(ref myDBBaseObjectA, ref myDBBaseObjectB));
                }

                #endregion

                // we couldnt find a matching type for both are not unknown
                return new Exceptional<bool>(new Error_NotImplemented(new StackTrace(true), String.Format("no type conversion implemented for {0} and {1}", myDBBaseObjectA.GetType(), myDBBaseObjectB.GetType())));

            }

//.........这里部分代码省略.........
开发者ID:TheByte,项目名称:sones,代码行数:101,代码来源:GraphDBTypeMapper.cs



注:本文中的sones.GraphDB.TypeManagement.BasicTypes.ADBBaseObject类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Plugin.GQLPluginManager类代码示例发布时间:2022-05-26
下一篇:
C# TypeManagement.GraphDBType类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap