Beispiel #1
0
        public ObjectIdType Explode(CompositeKeyType cKey, out PropIdType bot)
        {
            bot = (PropIdType)(cKey & _botMask);

            ObjectIdType result = (cKey >> _botFieldLen) & _topMask;

            return(result);
        }
Beispiel #2
0
        //public object AccessToken => WR_AccessToken;
        //public WeakReference<IPropBagInternal> WR_AccessToken { get; }

        #endregion

        #region Public Methods

        public CompositeKeyType Fuse(ObjectIdType top, PropIdType bot)
        {
            CompositeKeyType result = top;

            result  = result << _botFieldLen;
            result += bot;
            return(result);
        }
        SimpleExKey GetCompKey(IPropBag propBag, PropIdType propId)
        {
            ObjectIdType     objectId = GetAndCheckObjectRef(propBag);
            CompositeKeyType cKey     = _compKeyManager.JoinComp(objectId, propId);
            SimpleExKey      exKey    = new SimpleExKey(cKey, _clientAccessToken, objectId, propId);

            return(exKey);
        }
Beispiel #4
0
 public SimpleExKey(CompositeKeyType cKey) : this()
 {
     System.Diagnostics.Debug.Assert(cKey != 0, "The value 0 is reserved to indicate an empty Key. To create an empty key, use the parameterless constructor.");
     CKey = cKey;
 }
Beispiel #5
0
        public bool Verify(CompositeKeyType cKey, ObjectIdType top, PropIdType bot)
        {
            ObjectIdType testTop = Explode(cKey, out PropIdType testBot);

            return(testTop == top && testBot == bot);
        }
Beispiel #6
0
        public bool Verify(CompositeKeyType cKey, ObjectIdType top)
        {
            ObjectIdType testTop = (cKey >> _botFieldLen) & _topMask;

            return(testTop == top);
        }