當前位置: 首頁>>代碼示例>>C#>>正文


C# BasicTypes.ADBBaseObject類代碼示例

本文整理匯總了C#中sones.GraphDB.TypeManagement.BasicTypes.ADBBaseObject的典型用法代碼示例。如果您正苦於以下問題:C# ADBBaseObject類的具體用法?C# ADBBaseObject怎麽用?C# ADBBaseObject使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ADBBaseObject類屬於sones.GraphDB.TypeManagement.BasicTypes命名空間,在下文中一共展示了ADBBaseObject類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的sones.GraphDB.TypeManagement.BasicTypes.ADBBaseObject類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。